Skip to content

Commit

Permalink
ci: Switch to cross for Linux arm64 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
notheotherben committed Jul 25, 2024
1 parent ad80d22 commit 346e5bb
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,27 +76,32 @@ jobs:
run_on: windows-latest
target: x86_64-pc-windows-msvc
extension: .exe
builder: cargo

# Linux builds
- arch: amd64
run_on: ubuntu-latest
os: linux
target: x86_64-unknown-linux-gnu
test: true
builder: cargo
- arch: "arm64"
os: linux
run_on: ubuntu-latest
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: Get Rust Stable
Expand All @@ -117,8 +122,15 @@ jobs:
with:
name: cargofile

- 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 cross
- name: cargo build
run: cargo build --release --target ${{ matrix.target }}
run: ${{ matrix.builder }} build --release --target ${{ matrix.target }}

- name: Upload GitHub Release Artifacts
uses: SierraSoftworks/[email protected]
Expand Down

0 comments on commit 346e5bb

Please sign in to comment.