From f95faffac4d4aeecfc4bfc1f14ecd4cec8ee1a2e Mon Sep 17 00:00:00 2001 From: Jackson Welsh Date: Sun, 19 May 2024 23:16:18 -0700 Subject: [PATCH] Add aarch64 builds to release workflow (#64) --- .github/workflows/release.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 27c48bc..4104108 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,6 +34,11 @@ jobs: target: x86_64-unknown-linux-gnu label: linux-x86_64 + - host: linux + os: ubuntu-22.04 + target: aarch64-unknown-linux-gnu + label: linux-aarch64 + - host: windows os: windows-latest target: x86_64-pc-windows-msvc @@ -71,6 +76,14 @@ jobs: override: true profile: minimal + # No GHA runner for arm so need to cross-compile on x86 + - name: Install arm build prerequisites + if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }} + run: | + sudo apt-get -y update + sudo apt-get -y install gcc-aarch64-linux-gnu + echo 'RUSTFLAGS=-C linker=aarch64-linux-gnu-gcc' >> "$GITHUB_ENV" + - name: Build Release run: cargo build --release --locked --verbose --target ${{ matrix.target }} env: @@ -82,6 +95,9 @@ jobs: # make binaries more portable. OPENSSL_STATIC: 1 + # When building for arm, provide the linker for aarch64. + RUSTFLAGS: ${{ env.RUSTFLAGS }} + - name: Create Release Archive shell: bash run: |