build: build for apple
Build and Release Firmware / firmware (ak4490) (push) Successful in 17s
Build and Release Firmware / firmware (cs4398) (push) Successful in 16s
Build and Release Firmware / firmware (evk) (push) Successful in 16s
Build and Release Firmware / cli (aarch64-unknown-linux-musl) (push) Failing after 51s
Build and Release Firmware / cli (universal2-apple-darwin) (push) Failing after 9s
Build and Release Firmware / cli (x86_64-pc-windows-gnu) (push) Failing after 9s
Build and Release Firmware / cli (x86_64-unknown-linux-musl) (push) Failing after 9s
Build and Release Firmware / release (push) Skipped
Build and Release Firmware / firmware (ak4490) (push) Successful in 17s
Build and Release Firmware / firmware (cs4398) (push) Successful in 16s
Build and Release Firmware / firmware (evk) (push) Successful in 16s
Build and Release Firmware / cli (aarch64-unknown-linux-musl) (push) Failing after 51s
Build and Release Firmware / cli (universal2-apple-darwin) (push) Failing after 9s
Build and Release Firmware / cli (x86_64-pc-windows-gnu) (push) Failing after 9s
Build and Release Firmware / cli (x86_64-unknown-linux-musl) (push) Failing after 9s
Build and Release Firmware / release (push) Skipped
This commit is contained in:
4 files changed
+69
-43
No files matched your search
@@ -69,66 +69,39 @@ jobs:
|
||||
|
||||
cli:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: catthehacker/ubuntu:rust-latest
|
||||
strategy:
|
||||
fail-fast: true
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target:
|
||||
- aarch64-unknown-linux-musl
|
||||
- x86_64-pc-windows-gnu
|
||||
- x86_64-unknown-linux-musl
|
||||
- universal2-apple-darwin
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache rustup
|
||||
# Building and packaging both happen in .gitea/actions/cli-build, whose image the runner
|
||||
# builds from its Dockerfile and keeps in the Docker layer cache. That image carries the
|
||||
# toolchain, zig, the macOS SDK and every target, so none of that is installed per job.
|
||||
- name: Cache cargo registry
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.RUSTUP_HOME }}
|
||||
key: rustup-cli-${{ matrix.target }}-${{ runner.os }}
|
||||
path: .cargo-cache
|
||||
key: cli-registry-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: cli-registry-
|
||||
|
||||
- name: Install Rust Toolchain
|
||||
run: rustup target install ${{ matrix.target }}
|
||||
|
||||
- name: Cache cargo
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: cli-${{ matrix.target }}
|
||||
|
||||
- name: Cache zigbuild install
|
||||
- name: Cache build artifacts
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /opt/zigvenv
|
||||
key: zigbuild-venv-${{ runner.os }}
|
||||
|
||||
# compiled libc/compiler-rt are per target, so these stay keyed on it
|
||||
- name: Cache zig build artifacts
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cache/zig
|
||||
~/.cache/cargo-zigbuild
|
||||
key: zigbuild-cache-${{ matrix.target }}-${{ runner.os }}
|
||||
|
||||
- name: Install cargo-zigbuild Toolchain
|
||||
run: |
|
||||
# venv keeps cargo-zigbuild and ziglang in one relocatable-by-path directory we can cache
|
||||
[ -d /opt/zigvenv ] || python3 -m venv /opt/zigvenv
|
||||
/opt/zigvenv/bin/pip install cargo-zigbuild
|
||||
echo /opt/zigvenv/bin >> "$GITHUB_PATH"
|
||||
path: target
|
||||
key: cli-target-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: cli-target-${{ matrix.target }}-
|
||||
|
||||
- name: Build cli (${{ matrix.target }})
|
||||
working-directory: cli
|
||||
run: cargo zigbuild --release --target ${{ matrix.target }}
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
bin=guac-cli
|
||||
[[ "${{ matrix.target }}" == *windows* ]] && bin=guac-cli.exe
|
||||
mkdir -p dist
|
||||
zip -j "dist/guac-cli-${{ matrix.target }}.zip" "target/${{ matrix.target }}/release/$bin"
|
||||
shell: bash
|
||||
uses: ./.gitea/actions/cli-build
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
|
||||
Reference in new issue
Block a user