Skip to content

Commit 0dc4e1d

Browse files
authored
fix(cd): alternative rust-lld linker for aarch64-unknown-linux-gnu (#8)
* fix(cd): alternative `rust-lld` linker for `aarch64-unknown-linux-gnu` * chore: should build multiple on ci
1 parent 24fd980 commit 0dc4e1d

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[target.aarch64-unknown-linux-gnu]
2+
linker = "aarch64-linux-gnu-gcc"

.github/workflows/cd.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,12 @@ jobs:
125125
- name: Install Rust Binaries
126126
run: cargo binstall -y --force cargo-tag
127127

128+
- name: Install Linker for ARM64 Linux GNU
129+
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
130+
run: |
131+
sudo apt-get update
132+
sudo apt-get install -y gcc-aarch64-linux-gnu
133+
128134
- name: Retrieve Git Commit SHA
129135
run: echo "GIT_COMMIT_SHA7=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV
130136

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,42 @@ jobs:
2424

2525
- name: Run Tests
2626
run: cargo test --all-features
27+
28+
build-binaries:
29+
name: Build binaries
30+
strategy:
31+
matrix:
32+
include:
33+
- name: linux-x64
34+
os: ubuntu-latest
35+
target: x86_64-unknown-linux-gnu
36+
- name: linux-arm64
37+
os: ubuntu-latest
38+
target: aarch64-unknown-linux-gnu
39+
- name: macos-x64
40+
os: macos-latest
41+
target: x86_64-apple-darwin
42+
- name: macos-arm64
43+
os: macos-latest
44+
target: aarch64-apple-darwin
45+
runs-on: ${{ matrix.os }}
46+
steps:
47+
- name: Checkout
48+
uses: actions/checkout@v6
49+
50+
- name: Setup Rust
51+
uses: dtolnay/rust-toolchain@stable
52+
with:
53+
targets: ${{ matrix.target }}
54+
55+
- name: Setup Rust Cache
56+
uses: Swatinem/rust-cache@v2
57+
58+
- name: Install Linker for ARM64 Linux GNU
59+
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
60+
run: |
61+
sudo apt-get update
62+
sudo apt-get install -y gcc-aarch64-linux-gnu
63+
64+
- name: Build binary
65+
run: cargo build --target ${{ matrix.target }}

0 commit comments

Comments
 (0)