File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,13 +15,16 @@ jobs:
1515 include :
1616 - os : ubuntu-latest
1717 target : x86_64-unknown-linux-gnu
18+ use_cross : false
1819 - os : ubuntu-latest
1920 target : aarch64-unknown-linux-gnu
20- needs_cross : true
21+ use_cross : true
2122 - os : macos-13
2223 target : x86_64-apple-darwin
24+ use_cross : false
2325 - os : macos-14
2426 target : aarch64-apple-darwin
27+ use_cross : false
2528
2629 runs-on : ${{ matrix.os }}
2730 steps :
@@ -30,17 +33,17 @@ jobs:
3033 with :
3134 targets : ${{ matrix.target }}
3235
33- - name : Install Linux cross toolchain
34- if : matrix.needs_cross
35- run : |
36- sudo apt-get update
37- sudo apt-get install -y gcc-aarch64-linux-gnu
36+ - name : Install cross
37+ if : matrix.use_cross
38+ run : cargo install cross --locked
3839
3940 - name : Build
40- env :
41- CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER : aarch64-linux-gnu-gcc
42- CC_aarch64_unknown_linux_gnu : aarch64-linux-gnu-gcc
43- run : cargo build --locked --release --target ${{ matrix.target }}
41+ run : |
42+ if [ "${{ matrix.use_cross }}" = "true" ]; then
43+ cross build --locked --release --target ${{ matrix.target }}
44+ else
45+ cargo build --locked --release --target ${{ matrix.target }}
46+ fi
4447
4548 - name : Package
4649 run : |
You can’t perform that action at this time.
0 commit comments