Skip to content

Commit

Permalink
Add aarch64 builds to release workflow (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksonwelsh committed May 20, 2024
1 parent cc0ed2b commit f95faff
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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: |
Expand Down

0 comments on commit f95faff

Please sign in to comment.