Skip to content

Commit dadffd3

Browse files
committed
Compile for aarch64 and i686 targets on CI in addition to x86_64
1 parent 42d5870 commit dadffd3

File tree

1 file changed

+46
-7
lines changed

1 file changed

+46
-7
lines changed

.github/workflows/build.yml

+46-7
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,66 @@ env:
1111

1212
jobs:
1313
build:
14-
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
- TARGET: x86_64-unknown-linux-gnu
19+
OS: ubuntu-latest
20+
- TARGET: aarch64-unknown-linux-gnu
21+
OS: ubuntu-latest
22+
- TARGET: i686-unknown-linux-gnu
23+
OS: ubuntu-latest
24+
25+
runs-on: ${{ matrix.OS }}
26+
env:
27+
TARGET: ${{ matrix.TARGET }}
1528

1629
steps:
1730
- uses: actions/checkout@v2
1831
with:
1932
submodules: 'recursive'
33+
34+
- name: Create Cargo config file
35+
run: |
36+
cat >>~/.cargo/config <<EOF
37+
[target.aarch64-unknown-linux-gnu]
38+
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
39+
[target.i686-unknown-linux-gnu]
40+
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
41+
EOF
42+
43+
- name: Install LLD
44+
run: sudo apt install lld
2045

2146
- name: Install Rust
2247
uses: actions-rs/toolchain@v1
2348
with:
2449
toolchain: nightly
2550
default: true
2651
profile: minimal
27-
28-
- name: Install dependencies
29-
run: |
30-
sudo apt-get install -y acpica-tools
52+
target: ${{ matrix.target }}
53+
components: llvm-tools-preview
3154

3255
- name: Build
33-
run: cargo build --all
34-
56+
run: cargo build --all --target $TARGET
57+
58+
test:
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v2
62+
with:
63+
submodules: 'recursive'
64+
- name: Install Rust
65+
uses: actions-rs/toolchain@v1
66+
with:
67+
toolchain: nightly
68+
default: true
69+
profile: minimal
70+
71+
- name: Install dependencies
72+
run: sudo apt-get install -y acpica-tools
73+
3574
- name: Run tests
3675
run: cargo test --all
3776

0 commit comments

Comments
 (0)