File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 strategy :
1212 fail-fast : false
1313 matrix :
14- os : [ubuntu-latest, macos-latest]
14+ include :
15+ - os : ubuntu-latest
16+ - os : macos-latest
17+ # cross-compile from Linux to Windows using mingw
18+ - os : ubuntu-latest
19+ env :
20+ TARGET_TRIPLE : x86_64-pc-windows-gnu
1521
1622 steps :
1723 - uses : actions/checkout@v2
@@ -36,13 +42,21 @@ jobs:
3642 path : target
3743 key : ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
3844
45+ - name : Install MinGW toolchain
46+ if : matrix.os == 'ubuntu-latest' && matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
47+ run : |
48+ sudo apt install gcc-mingw-w64-x86-64
49+ rustup target add x86_64-pc-windows-gnu
50+
3951 - name : Prepare dependencies
4052 run : |
4153 git config --global user.email "user@example.com"
4254 git config --global user.name "User"
4355 ./prepare.sh
4456
4557 - name : Test
58+ env :
59+ TARGET_TRIPLE : ${{ matrix.env.TARGET_TRIPLE }}
4660 run : |
4761 # Enable backtraces for easier debugging
4862 export RUST_BACKTRACE=1
Original file line number Diff line number Diff line change 22set -e
33
44rustup component add rust-src rustc-dev llvm-tools-preview
5- rustup target add x86_64-pc-windows-gnu
65./build_sysroot/prepare_sysroot_src.sh
76cargo install hyperfine || echo " Skipping hyperfine install"
87
You can’t perform that action at this time.
0 commit comments