From 5aa7d41bccf797306bb5df38857abd5ad3675a65 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 23 Aug 2026 19:45:37 +0000 Subject: [PATCH] build(ci): Build linux-arm64 on GitHub's native arm64 runners The aarch64 build was the only entry in the matrix that needed `cross`, and paying for it meant installing cargo-binstall and cross on every run, ordered carefully around the cache restore so that binstall didn't skip an install whose binary was never actually materialised. GitHub now hosts arm64 Linux runners, so the target can simply be built natively on `ubuntu-24.04-arm` with the same steps every other entry in the matrix uses. With nothing left to switch on, the `builder` matrix key goes too. Co-Authored-By: Claude --- .github/workflows/rust.yml | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f189a08..a6b921c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -107,7 +107,6 @@ jobs: run_on: windows-latest target: x86_64-pc-windows-msvc extension: .exe - builder: cargo # Linux builds - arch: amd64 @@ -115,24 +114,20 @@ jobs: os: linux target: x86_64-unknown-linux-gnu test: true - builder: cargo - arch: "arm64" os: linux - run_on: ubuntu-latest + run_on: ubuntu-24.04-arm target: aarch64-unknown-linux-gnu - builder: cross # Apple MacOS builds - arch: amd64 run_on: macos-latest os: darwin target: x86_64-apple-darwin - builder: cargo - arch: arm64 run_on: macos-latest os: darwin target: aarch64-apple-darwin - builder: cargo steps: - name: Check out code @@ -145,20 +140,6 @@ jobs: target: ${{ matrix.target }} components: llvm-tools-preview - # Install cross *before* Setup Cache. rust-cache restores cargo's - # install metadata (.crates2.json) but not the cargo bin directory, - # so if the cache runs first, binstall sees cross as "already - # installed", skips it, and the binary is never materialised. Running - # the install against a clean CARGO_HOME (with --force) guarantees the - # binary actually exists. - - name: Install Cross - if: matrix.builder == 'cross' - shell: bash - run: | - curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash - cargo binstall --no-confirm --force cross - echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> "$GITHUB_PATH" - - name: Setup Cache uses: Swatinem/rust-cache@v2 with: @@ -170,7 +151,7 @@ jobs: name: cargofile - name: cargo build - run: ${{ matrix.builder }} build --release --target ${{ matrix.target }} + run: cargo build --release --target ${{ matrix.target }} - name: Upload GitHub Release Artifacts uses: SierraSoftworks/gh-releases@v1.0.10