@@ -16,22 +16,19 @@ jobs:
1616 fail-fast : false
1717 matrix :
1818 include :
19+ - os : ubuntu-22.04 # pin to 22.04 for ARM64 due to apt bug in 24.04
20+ target : aarch64-unknown-linux-gnu
21+ asset_name : asr-linux-arm64
1922 - os : ubuntu-latest
2023 target : x86_64-unknown-linux-gnu
2124 asset_name : asr-linux-x86_64
22- - os : ubuntu-latest
23- target : aarch64-unknown-linux-gnu
24- asset_name : asr-linux-arm64
2525 - os : macos-latest
2626 target : aarch64-apple-darwin
2727 asset_name : asr-darwin-arm64
2828 - os : macos-latest
2929 target : x86_64-apple-darwin
3030 asset_name : asr-darwin-x86_64
3131
32- env :
33- CARGO_TERM_COLOR : always
34-
3532 steps :
3633 - name : Checkout repository
3734 uses : actions/checkout@v4
@@ -41,39 +38,32 @@ jobs:
4138 with :
4239 targets : ${{ matrix.target }}
4340
44- # Install the cross‑compilation toolchain and set required environment
4541 - name : Install cross toolchain for Linux ARM64
46- if : matrix.os == 'ubuntu-latest' && matrix. target == 'aarch64-unknown-linux-gnu'
42+ if : matrix.target == 'aarch64-unknown-linux-gnu'
4743 run : |
4844 sudo dpkg --add-architecture arm64
4945 sudo apt-get update
50- # install the AArch64 compiler and libraries
5146 sudo apt-get install -y \
5247 gcc-aarch64-linux-gnu \
5348 libc6-dev-arm64-cross \
5449 libssl-dev:arm64 \
5550 pkg-config \
5651 pkg-config-aarch64-linux-gnu
57- # export environment variables so Cargo's build scripts can find the right tools
5852 echo "CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
5953 echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
6054 echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV
6155 echo "PKG_CONFIG_aarch64_unknown_linux_gnu=aarch64-linux-gnu-pkg-config" >> $GITHUB_ENV
62- # explicitly set OpenSSL search paths
63- echo "OPENSSL_DIR=/usr" >> $GITHUB_ENV
6456 echo "OPENSSL_LIB_DIR=/usr/lib/aarch64-linux-gnu" >> $GITHUB_ENV
6557 echo "OPENSSL_INCLUDE_DIR=/usr/include" >> $GITHUB_ENV
6658
6759 - name : Cache cargo build
68- # Use rust-cache to speed up subsequent builds. A cache miss on the first run is expected.
6960 uses : Swatinem/rust-cache@v2
7061
7162 - name : Build release binary
7263 run : cargo build --release --target ${{ matrix.target }} --locked
7364
7465 - name : Strip binary
75- run : |
76- strip target/${{ matrix.target }}/release/asr || true
66+ run : strip target/${{ matrix.target }}/release/asr || true
7767
7868 - name : Package binary
7969 run : |
@@ -86,22 +76,18 @@ jobs:
8676 name : ${{ matrix.asset_name }}
8777 path : ${{ matrix.asset_name }}
8878 retention-days : 7
89- # Mark this step as non-fatal so a temporary network outage when uploading
90- # does not fail the entire job. A failed upload will still surface in the logs.
91- continue-on-error : true
79+ continue-on-error : true # avoid a runner network blip causing a full failure
9280
9381 create-release :
9482 name : Create GitHub Release
9583 needs : build-release
9684 runs-on : ubuntu-latest
97- # Only run on version tags (vX.Y.Z)
9885 if : startsWith(github.ref, 'refs/tags/v')
9986
10087 steps :
10188 - name : Checkout repository
10289 uses : actions/checkout@v4
10390
104- # Download all generated artifacts and flatten them into a single directory.
10591 - name : Download all artifacts
10692 uses : actions/download-artifact@v4
10793 with :
11298 - name : List release assets
11399 run : ls -lh release-assets/
114100
115- - name : Extract version from tag
101+ - name : Extract version
116102 id : version
117103 run : echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
118104
0 commit comments