Skip to content

Commit 2152d9f

Browse files
committed
feat: run tests on ARM targets
1 parent fe5fdd3 commit 2152d9f

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/ci.yml

+16-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ jobs:
2121
- os: ubuntu-latest
2222
target: x86_64-unknown-linux-musl
2323
label: x86_64 musl
24+
- os: ubuntu-latest
25+
target: aarch64-unknown-linux-gnu
26+
label: arm64 gnu
27+
- os: ubuntu-latest
28+
target: aarch64-unknown-linux-musl
29+
label: arm64 musl
2430
- os: windows-latest
2531
target: x86_64-pc-windows-msvc
2632
label: x86_64
@@ -36,8 +42,17 @@ jobs:
3642
if: ${{ runner.os == 'Linux' }}
3743
uses: awalsh128/cache-apt-pkgs-action@v1
3844
with:
39-
packages: musl-tools # provides musl-gcc
45+
packages: musl-tools crossbuild-essential-arm64 crossbuild-essential-armhf # provides musl-gcc and arm64 linker
4046
version: 1.0
47+
- name: Configure linker
48+
if: ${{ runner.os === 'Linux' }}
49+
run: |
50+
cat >>~/.cargo/config <<EOF
51+
[target.aarch64-unknown-linux-gnu]
52+
linker = "aarch64-linux-gnu-gcc"
53+
[target.aarch64-unknown-linux-musl]
54+
linker = "aarch64-linux-gnu-gcc"
55+
EOF
4156
- name: Test
4257
run: cargo test --target=${{ matrix.target }}
4358

0 commit comments

Comments
 (0)