Skip to content

Commit 3158a1c

Browse files
author
HeroicKatora
authored
Merge pull request #222 from veluca93/cross-ci
Add a cross-compiling CI for aarch64.
2 parents b7b8fe4 + c305357 commit 3158a1c

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/rust.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,35 @@ jobs:
3737
if: ${{ matrix.command == 'benchmark' && matrix.rust != '1.48.0' }}
3838
env:
3939
FEATURES: ${{ matrix.features }}
40+
41+
cross_compile_aarch64:
42+
runs-on: ubuntu-latest
43+
44+
strategy:
45+
matrix:
46+
rust: [nightly]
47+
features: ["", "rayon"]
48+
49+
steps:
50+
- name: Installing emulator and linker
51+
run: |
52+
sudo apt-get install qemu binfmt-support qemu-user-static gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
53+
54+
- name: Installing Rust toolchain
55+
uses: actions-rs/toolchain@v1
56+
with:
57+
override: true
58+
toolchain: ${{ matrix.rust }}
59+
target: aarch64-unknown-linux-musl
60+
- uses: actions/checkout@v2
61+
- name: build
62+
run: >
63+
cargo build --verbose --no-default-features --target aarch64-unknown-linux-musl --features "$FEATURES"
64+
env:
65+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-linux-gnu-gcc
66+
- name: test
67+
run: >
68+
cargo test --tests --benches --no-default-features --target aarch64-unknown-linux-musl --features "$FEATURES"
69+
env:
70+
FEATURES: ${{ matrix.features }}
71+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-linux-gnu-gcc

0 commit comments

Comments
 (0)