37
37
- target : x86_64-pc-windows-msvc
38
38
run_tests : YES
39
39
- target : x86_64-pc-windows-gnu
40
- mingw : https://ci-mirrors.rust-lang.org/rustc/ x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z
40
+ arch : x86_64
41
41
mingwdir : mingw64
42
+ gcc : x86_64-w64-mingw32-gcc
42
43
steps :
43
44
- uses : actions/checkout@v4
44
45
# v2 defaults to a shallow checkout, but we need at least to the previous tag
@@ -57,17 +58,16 @@ jobs:
57
58
New-Item "${env:USERPROFILE}\.cargo\git" -ItemType Directory -Force
58
59
shell : powershell
59
60
- name : Install mingw
60
- run : |
61
- # We retrieve mingw from the Rust CI buckets
62
- # Disable the download progress bar which can cause perf issues
63
- $ProgressPreference = "SilentlyContinue"
64
- Invoke-WebRequest ${{ matrix.mingw }} -OutFile mingw.7z
65
- 7z x -y mingw.7z -oC:\msys64 | Out-Null
66
- del mingw.7z
67
- echo "C:\msys64\usr\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
68
- echo "C:\msys64\${{ matrix.mingwdir }}\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
61
+ uses : bwoodsend/setup-winlibs-action@v1
62
+ if : matrix.mingwdir != ''
63
+ with :
64
+ architecture : ${{ matrix.arch }}
65
+ - name : Verify mingw gcc installation
69
66
shell : powershell
70
- if : matrix.mingw != ''
67
+ if : matrix.mingwdir != ''
68
+ run : |
69
+ Get-Command ${{ matrix.gcc }}
70
+ ${{ matrix.gcc }} --version
71
71
- name : Set PATH
72
72
run : |
73
73
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
@@ -123,7 +123,7 @@ jobs:
123
123
cargo check --all --all-targets --features test
124
124
git ls-files -- '*.rs' | xargs touch
125
125
- name : Run cargo clippy
126
- if : matrix.mode != 'release' && matrix.mingw == ''
126
+ if : matrix.mode != 'release' && matrix.mingwdir == ''
127
127
env :
128
128
TARGET : ${{ matrix.target }}
129
129
run : |
@@ -179,8 +179,9 @@ jobs:
179
179
- target : x86_64-pc-windows-msvc
180
180
run_tests : YES
181
181
- target : x86_64-pc-windows-gnu
182
- mingw : https://ci-mirrors.rust-lang.org/rustc/ x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z
182
+ arch : x86_64
183
183
mingwdir : mingw64
184
+ gcc : x86_64-w64-mingw32-gcc
184
185
steps :
185
186
- uses : actions/checkout@v4
186
187
# v2 defaults to a shallow checkout, but we need at least to the previous tag
@@ -199,17 +200,16 @@ jobs:
199
200
New-Item "${env:USERPROFILE}\.cargo\git" -ItemType Directory -Force
200
201
shell : powershell
201
202
- name : Install mingw
202
- run : |
203
- # We retrieve mingw from the Rust CI buckets
204
- # Disable the download progress bar which can cause perf issues
205
- $ProgressPreference = "SilentlyContinue"
206
- Invoke-WebRequest ${{ matrix.mingw }} -OutFile mingw.7z
207
- 7z x -y mingw.7z -oC:\msys64 | Out-Null
208
- del mingw.7z
209
- echo "C:\msys64\usr\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
210
- echo "C:\msys64\${{ matrix.mingwdir }}\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
203
+ uses : bwoodsend/setup-winlibs-action@v1
204
+ if : matrix.mingwdir != ''
205
+ with :
206
+ architecture : ${{ matrix.arch }}
207
+ - name : Verify mingw gcc installation
211
208
shell : powershell
212
- if : matrix.mingw != ''
209
+ if : matrix.mingwdir != ''
210
+ run : |
211
+ Get-Command ${{ matrix.gcc }}
212
+ ${{ matrix.gcc }} --version
213
213
- name : Set PATH
214
214
run : |
215
215
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
@@ -265,7 +265,7 @@ jobs:
265
265
cargo check --all --all-targets --features test
266
266
git ls-files -- '*.rs' | xargs touch
267
267
- name : Run cargo clippy
268
- if : matrix.mode != 'release' && matrix.mingw == ''
268
+ if : matrix.mode != 'release' && matrix.mingwdir == ''
269
269
env :
270
270
TARGET : ${{ matrix.target }}
271
271
run : |
@@ -323,11 +323,13 @@ jobs:
323
323
- target : x86_64-pc-windows-msvc
324
324
run_tests : YES
325
325
- target : x86_64-pc-windows-gnu
326
- mingw : https://ci-mirrors.rust-lang.org/rustc/ x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z
326
+ arch : x86_64
327
327
mingwdir : mingw64
328
+ gcc : x86_64-w64-mingw32-gcc
328
329
- target : i686-pc-windows-gnu # skip-pr skip-master
330
+ arch : i686 # skip-pr skip-master
329
331
mingwdir : mingw32 # skip-pr skip-master
330
- mingw : https://ci-mirrors.rust-lang.org/rustc/ i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z # skip-pr skip-master
332
+ gcc : i686-w64-mingw32-gcc # skip-pr skip-master
331
333
steps :
332
334
- uses : actions/checkout@v4
333
335
# v2 defaults to a shallow checkout, but we need at least to the previous tag
@@ -346,17 +348,16 @@ jobs:
346
348
New-Item "${env:USERPROFILE}\.cargo\git" -ItemType Directory -Force
347
349
shell : powershell
348
350
- name : Install mingw
349
- run : |
350
- # We retrieve mingw from the Rust CI buckets
351
- # Disable the download progress bar which can cause perf issues
352
- $ProgressPreference = "SilentlyContinue"
353
- Invoke-WebRequest ${{ matrix.mingw }} -OutFile mingw.7z
354
- 7z x -y mingw.7z -oC:\msys64 | Out-Null
355
- del mingw.7z
356
- echo "C:\msys64\usr\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
357
- echo "C:\msys64\${{ matrix.mingwdir }}\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
351
+ uses : bwoodsend/setup-winlibs-action@v1
352
+ if : matrix.mingwdir != ''
353
+ with :
354
+ architecture : ${{ matrix.arch }}
355
+ - name : Verify mingw gcc installation
358
356
shell : powershell
359
- if : matrix.mingw != ''
357
+ if : matrix.mingwdir != ''
358
+ run : |
359
+ Get-Command ${{ matrix.gcc }}
360
+ ${{ matrix.gcc }} --version
360
361
- name : Set PATH
361
362
run : |
362
363
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
@@ -412,7 +413,7 @@ jobs:
412
413
cargo check --all --all-targets --features test
413
414
git ls-files -- '*.rs' | xargs touch
414
415
- name : Run cargo clippy
415
- if : matrix.mode != 'release' && matrix.mingw == ''
416
+ if : matrix.mode != 'release' && matrix.mingwdir == ''
416
417
env :
417
418
TARGET : ${{ matrix.target }}
418
419
run : |
0 commit comments