Skip to content

Commit 1811321

Browse files
committed
try cross
1 parent 0bf2ded commit 1811321

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,30 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
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 }
2727
runs-on: ${{ matrix.os }}
2828
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-
3529
- uses: actions/checkout@v4
3630
with:
3731
submodules: recursive
3832
- name: Install Rust toolchain
3933
uses: dtolnay/rust-toolchain@stable
40-
- name: Build
34+
- name: Build - General
35+
if: ${{ matrix.cross == false }}
4136
run: |
4237
rustup target add ${{ matrix.target }}
4338
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 }}
4444
4545

0 commit comments

Comments
 (0)