3737 - target : x86_64-pc-windows-msvc
3838 run_tests : YES
3939 - 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
4141 mingwdir : mingw64
42+ gcc : x86_64-w64-mingw32-gcc
4243 steps :
4344 - uses : actions/checkout@v4
4445 # v2 defaults to a shallow checkout, but we need at least to the previous tag
@@ -57,17 +58,16 @@ jobs:
5758 New-Item "${env:USERPROFILE}\.cargo\git" -ItemType Directory -Force
5859 shell : powershell
5960 - 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
6966 shell : powershell
70- if : matrix.mingw != ''
67+ if : matrix.mingwdir != ''
68+ run : |
69+ Get-Command ${{ matrix.gcc }}
70+ ${{ matrix.gcc }} --version
7171 - name : Set PATH
7272 run : |
7373 echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
@@ -123,7 +123,7 @@ jobs:
123123 cargo check --all --all-targets --features test
124124 git ls-files -- '*.rs' | xargs touch
125125 - name : Run cargo clippy
126- if : matrix.mode != 'release' && matrix.mingw == ''
126+ if : matrix.mode != 'release' && matrix.mingwdir == ''
127127 env :
128128 TARGET : ${{ matrix.target }}
129129 run : |
@@ -179,8 +179,9 @@ jobs:
179179 - target : x86_64-pc-windows-msvc
180180 run_tests : YES
181181 - 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
183183 mingwdir : mingw64
184+ gcc : x86_64-w64-mingw32-gcc
184185 steps :
185186 - uses : actions/checkout@v4
186187 # v2 defaults to a shallow checkout, but we need at least to the previous tag
@@ -199,17 +200,16 @@ jobs:
199200 New-Item "${env:USERPROFILE}\.cargo\git" -ItemType Directory -Force
200201 shell : powershell
201202 - 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
211208 shell : powershell
212- if : matrix.mingw != ''
209+ if : matrix.mingwdir != ''
210+ run : |
211+ Get-Command ${{ matrix.gcc }}
212+ ${{ matrix.gcc }} --version
213213 - name : Set PATH
214214 run : |
215215 echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
@@ -265,7 +265,7 @@ jobs:
265265 cargo check --all --all-targets --features test
266266 git ls-files -- '*.rs' | xargs touch
267267 - name : Run cargo clippy
268- if : matrix.mode != 'release' && matrix.mingw == ''
268+ if : matrix.mode != 'release' && matrix.mingwdir == ''
269269 env :
270270 TARGET : ${{ matrix.target }}
271271 run : |
@@ -323,11 +323,13 @@ jobs:
323323 - target : x86_64-pc-windows-msvc
324324 run_tests : YES
325325 - 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
327327 mingwdir : mingw64
328+ gcc : x86_64-w64-mingw32-gcc
328329 - target : i686-pc-windows-gnu # skip-pr skip-master
330+ arch : i686 # skip-pr skip-master
329331 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
331333 steps :
332334 - uses : actions/checkout@v4
333335 # v2 defaults to a shallow checkout, but we need at least to the previous tag
@@ -346,17 +348,16 @@ jobs:
346348 New-Item "${env:USERPROFILE}\.cargo\git" -ItemType Directory -Force
347349 shell : powershell
348350 - 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
358356 shell : powershell
359- if : matrix.mingw != ''
357+ if : matrix.mingwdir != ''
358+ run : |
359+ Get-Command ${{ matrix.gcc }}
360+ ${{ matrix.gcc }} --version
360361 - name : Set PATH
361362 run : |
362363 echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
@@ -412,7 +413,7 @@ jobs:
412413 cargo check --all --all-targets --features test
413414 git ls-files -- '*.rs' | xargs touch
414415 - name : Run cargo clippy
415- if : matrix.mode != 'release' && matrix.mingw == ''
416+ if : matrix.mode != 'release' && matrix.mingwdir == ''
416417 env :
417418 TARGET : ${{ matrix.target }}
418419 run : |
0 commit comments