File tree 2 files changed +16
-2
lines changed
2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 11
11
strategy :
12
12
fail-fast : false
13
13
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
15
21
16
22
steps :
17
23
- uses : actions/checkout@v2
@@ -36,13 +42,21 @@ jobs:
36
42
path : target
37
43
key : ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
38
44
45
+ - name : Install MinGW toolchain and wine
46
+ if : matrix.os == 'ubuntu-latest' && matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
47
+ run : |
48
+ sudo apt-get install -y gcc-mingw-w64-x86-64 wine-stable
49
+ rustup target add x86_64-pc-windows-gnu
50
+
39
51
- name : Prepare dependencies
40
52
run : |
41
53
git config --global user.email "[email protected] "
42
54
git config --global user.name "User"
43
55
./prepare.sh
44
56
45
57
- name : Test
58
+ env :
59
+ TARGET_TRIPLE : ${{ matrix.env.TARGET_TRIPLE }}
46
60
run : |
47
61
# Enable backtraces for easier debugging
48
62
export RUST_BACKTRACE=1
57
71
run : tar cvfJ cg_clif.tar.xz build
58
72
59
73
- name : Upload prebuilt cg_clif
74
+ if : matrix.env.TARGET_TRIPLE != 'x86_64-pc-windows-gnu'
60
75
uses : actions/upload-artifact@v2
61
76
with :
62
77
name : cg_clif-${{ runner.os }}
Original file line number Diff line number Diff line change 2
2
set -e
3
3
4
4
rustup component add rust-src rustc-dev llvm-tools-preview
5
- rustup target add x86_64-pc-windows-gnu
6
5
./build_sysroot/prepare_sysroot_src.sh
7
6
cargo install hyperfine || echo " Skipping hyperfine install"
8
7
You can’t perform that action at this time.
0 commit comments