@@ -16,30 +16,30 @@ jobs:
16
16
fail-fast : false
17
17
matrix :
18
18
include :
19
- - { os: ubuntu-20.04, target: x86_64-unknown-linux-gnu, platform: linux-x64 }
20
- - { os: ubuntu-20.04, target: aarch64-unknown-linux-gnu, platform: linux-arm64 }
21
- - { os: ubuntu-20.04, target: x86_64-unknown-linux-musl, platform: linux-musl }
22
- - { os: ubuntu-20.04, target: x86_64-unknown-freebsd, platform: linux-bsd }
23
- - { os: macos-latest, target: x86_64-apple-darwin, platform: darwin-x64 }
24
- - { os: macos-latest, target: aarch64-apple-darwin, platform: darwin-arm64 }
25
- - { os: windows-latest, target: x86_64-pc-windows-msvc, platform: win32-x64 }
26
- - { os: windows-latest, target: i686-pc-windows-msvc, platform: win32-ia32 }
19
+ - { os: ubuntu-20.04, target: x86_64-unknown-linux-gnu, platform: linux-x64, cross: false }
20
+ - { os: ubuntu-20.04, target: aarch64-unknown-linux-gnu, platform: linux-arm64, cross: true }
21
+ - { os: ubuntu-20.04, target: x86_64-unknown-linux-musl, platform: linux-musl, cross: true }
22
+ - { os: ubuntu-20.04, target: x86_64-unknown-freebsd, platform: linux-bsd, cross: true }
23
+ - { os: macos-latest, target: x86_64-apple-darwin, platform: darwin-x64, cross: false }
24
+ - { os: macos-latest, target: aarch64-apple-darwin, platform: darwin-arm64, cross: false }
25
+ - { os: windows-latest, target: x86_64-pc-windows-msvc, platform: win32-x64, cross: false }
26
+ - { os: windows-latest, target: i686-pc-windows-msvc, platform: win32-ia32, cross: false }
27
27
runs-on : ${{ matrix.os }}
28
28
steps :
29
- - name : Install aarch64-linux-gnu
30
- if : ${{ matrix.platform == 'linux-arm64'}}
31
- run : |
32
- sudo apt-get update
33
- sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
34
-
35
29
- uses : actions/checkout@v4
36
30
with :
37
31
submodules : recursive
38
32
- name : Install Rust toolchain
39
33
uses : dtolnay/rust-toolchain@stable
40
- - name : Build
34
+ - name : Build - General
35
+ if : ${{ matrix.cross == false }}
41
36
run : |
42
37
rustup target add ${{ matrix.target }}
43
38
cargo build --release --target ${{ matrix.target }} --target-dir target/${{ matrix.platform }}
39
+ - name : Build - cross
40
+ if : ${{ matrix.cross == true }}
41
+ run : |
42
+ cargo install cross
43
+ cross build --release --target ${{ matrix.target }} --target-dir target/${{ matrix.platform }}
44
44
45
45
0 commit comments