@@ -122,10 +122,21 @@ jobs:
122
122
name : cg_clif-${{ runner.os }}-cross-x86_64-mingw
123
123
path : cg_clif.tar.xz
124
124
125
- build_windows :
126
- runs-on : windows-latest
125
+ windows :
126
+ runs-on : ${{ matrix.os }}
127
127
timeout-minutes : 60
128
128
129
+ strategy :
130
+ fail-fast : false
131
+ matrix :
132
+ include :
133
+ # Native Windows build with MSVC
134
+ - os : windows-latest
135
+ # cross-compile from Windows to Windows MinGW
136
+ - os : windows-latest
137
+ env :
138
+ TARGET_TRIPLE : x86_64-pc-windows-gnu
139
+
129
140
steps :
130
141
- uses : actions/checkout@v3
131
142
@@ -149,29 +160,40 @@ jobs:
149
160
# path: target
150
161
# key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
151
162
163
+ - name : Set MinGW as the default toolchain
164
+ if : matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
165
+ run : rustup set default-host x86_64-pc-windows-gnu
166
+
152
167
- name : Prepare dependencies
153
168
run : |
154
169
git config --global user.email "user@example.com"
155
170
git config --global user.name "User"
156
171
git config --global core.autocrlf false
157
- rustup set default-host x86_64-pc-windows-gnu
158
172
rustc y.rs -o y.exe -g
159
173
./y.exe prepare
160
174
175
+ - name : Build without unstable features
176
+ env :
177
+ TARGET_TRIPLE : ${{ matrix.env.TARGET_TRIPLE }}
178
+ # This is the config rust-lang/rust uses for builds
179
+ run : ./y.rs build --no-unstable-features
180
+
161
181
- name : Build
162
- # name: Test
182
+ run : ./y.rs build --sysroot none
183
+
184
+ - name : Test
163
185
run : |
164
186
# Enable backtraces for easier debugging
165
- # $Env:RUST_BACKTRACE=1
187
+ $Env:RUST_BACKTRACE=1
166
188
167
189
# Reduce amount of benchmark runs as they are slow
168
- # $Env:COMPILE_RUNS=2
169
- # $Env:RUN_RUNS=2
190
+ $Env:COMPILE_RUNS=2
191
+ $Env:RUN_RUNS=2
170
192
171
193
# Enable extra checks
172
- # $Env:CG_CLIF_ENABLE_VERIFIER=1
194
+ $Env:CG_CLIF_ENABLE_VERIFIER=1
173
195
174
- ./y.exe build
196
+ ./y.exe test
175
197
176
198
- name : Package prebuilt cg_clif
177
199
# don't use compression as xzip isn't supported by tar on windows and bzip2 hangs
@@ -180,5 +202,5 @@ jobs:
180
202
- name : Upload prebuilt cg_clif
181
203
uses : actions/upload-artifact@v2
182
204
with :
183
- name : cg_clif-${{ runner.os }}
205
+ name : cg_clif-${{ runner.os }}-${{ matrix.env.TARGET_TRIPLE }}
184
206
path : cg_clif.tar
0 commit comments