File tree Expand file tree Collapse file tree 1 file changed +38
-5
lines changed
Expand file tree Collapse file tree 1 file changed +38
-5
lines changed Original file line number Diff line number Diff line change 1010 CARGO_TERM_COLOR : always
1111
1212jobs :
13- build :
14-
15- runs-on : ubuntu-latest
13+ test :
14+ name : Test on ${{ matrix.target }}
15+ runs-on : ${{ matrix.os }}
16+ strategy :
17+ fail-fast : false
18+ matrix :
19+ include :
20+ - os : ubuntu-latest
21+ target : x86_64-unknown-linux-gnu
22+ - os : ubuntu-latest
23+ target : aarch64-unknown-linux-gnu
1624
1725 steps :
1826 - name : " Checkout"
1927 uses : actions/checkout@v4
20- - name : " Build with Cargo"
21- run : cargo build --verbose
28+
29+ - name : " Setup Rust toolchain"
30+ uses : actions-rust-lang/setup-rust-toolchain@v1
31+ with :
32+ target : ${{ matrix.target }}
33+
34+ - name : " Install cross-compilation tools"
35+ if : matrix.target == 'aarch64-unknown-linux-gnu'
36+ run : |
37+ sudo apt-get update
38+ sudo apt-get install -y gcc-aarch64-linux-gnu
39+
40+ - name : " Configure linker for aarch64"
41+ if : matrix.target == 'aarch64-unknown-linux-gnu'
42+ run : |
43+ mkdir -p .cargo
44+ cat >> .cargo/config.toml << EOF
45+ [target.aarch64-unknown-linux-gnu]
46+ linker = "aarch64-linux-gnu-gcc"
47+ EOF
48+
49+ - name : " Build"
50+ run : cargo build --verbose --target ${{ matrix.target }}
51+
52+ - name : " Run tests"
53+ if : matrix.target == 'x86_64-unknown-linux-gnu'
54+ run : cargo test --verbose --target ${{ matrix.target }}
You can’t perform that action at this time.
0 commit comments