Skip to content

Commit 32fef2c

Browse files
committed
e62d0da3924996eedbfee8aeb591d4a79236550ei686
1 parent 3005c8d commit 32fef2c

File tree

2 files changed

+18
-90
lines changed

2 files changed

+18
-90
lines changed

.github/workflows/ci.yaml

Lines changed: 13 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ jobs:
3737
- target: x86_64-pc-windows-msvc
3838
run_tests: YES
3939
- target: x86_64-pc-windows-gnu
40+
arch: x86_64
4041
mingwdir: mingw64
4142
gcc: x86_64-w64-mingw32-gcc
42-
gcc_package: mingw-w64-x86_64-gcc
4343
steps:
4444
- uses: actions/checkout@v4
4545
# v2 defaults to a shallow checkout, but we need at least to the previous tag
@@ -58,34 +58,16 @@ jobs:
5858
New-Item "${env:USERPROFILE}\.cargo\git" -ItemType Directory -Force
5959
shell: powershell
6060
- name: Install mingw
61-
uses: msys2/setup-msys2@v2
61+
uses: bwoodsend/setup-winlibs-action@v1
6262
if: matrix.mingwdir != ''
6363
with:
64-
msystem: ${{ matrix.mingwdir }}
65-
install: ${{ matrix.gcc_package }}
66-
- name: Add mingw tools to path
67-
shell: python
68-
if: matrix.mingwdir != ''
69-
run: |
70-
import os
71-
paths = [
72-
r'C:\msys64\${{ matrix.mingwdir }}\bin',
73-
r'C:\msys64\usr\bin',
74-
]
75-
excluded = {
76-
r'C:\mingw64\bin',
77-
}
78-
with open(os.environ["GITHUB_PATH"], "r+") as fp:
79-
lines = fp.readlines()
80-
lines = paths + [l for l in lines if l not in excluded]
81-
fp.seek(0)
82-
fp.writelines(lines)
64+
architecture: ${{ matrix.arch }}
8365
- name: Verify mingw gcc installation
8466
shell: powershell
8567
if: matrix.mingwdir != ''
8668
run: |
87-
choco uninstall -y strawberryperl
8869
Get-Command ${{ matrix.gcc }}
70+
${{ matrix.gcc }} --version
8971
- name: Set PATH
9072
run: |
9173
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
@@ -197,9 +179,9 @@ jobs:
197179
- target: x86_64-pc-windows-msvc
198180
run_tests: YES
199181
- target: x86_64-pc-windows-gnu
182+
arch: x86_64
200183
mingwdir: mingw64
201184
gcc: x86_64-w64-mingw32-gcc
202-
gcc_package: mingw-w64-x86_64-gcc
203185
steps:
204186
- uses: actions/checkout@v4
205187
# v2 defaults to a shallow checkout, but we need at least to the previous tag
@@ -218,34 +200,16 @@ jobs:
218200
New-Item "${env:USERPROFILE}\.cargo\git" -ItemType Directory -Force
219201
shell: powershell
220202
- name: Install mingw
221-
uses: msys2/setup-msys2@v2
203+
uses: bwoodsend/setup-winlibs-action@v1
222204
if: matrix.mingwdir != ''
223205
with:
224-
msystem: ${{ matrix.mingwdir }}
225-
install: ${{ matrix.gcc_package }}
226-
- name: Add mingw tools to path
227-
shell: python
228-
if: matrix.mingwdir != ''
229-
run: |
230-
import os
231-
paths = [
232-
r'C:\msys64\${{ matrix.mingwdir }}\bin',
233-
r'C:\msys64\usr\bin',
234-
]
235-
excluded = {
236-
r'C:\mingw64\bin',
237-
}
238-
with open(os.environ["GITHUB_PATH"], "r+") as fp:
239-
lines = fp.readlines()
240-
lines = paths + [l for l in lines if l not in excluded]
241-
fp.seek(0)
242-
fp.writelines(lines)
206+
architecture: ${{ matrix.arch }}
243207
- name: Verify mingw gcc installation
244208
shell: powershell
245209
if: matrix.mingwdir != ''
246210
run: |
247-
choco uninstall -y strawberryperl
248211
Get-Command ${{ matrix.gcc }}
212+
${{ matrix.gcc }} --version
249213
- name: Set PATH
250214
run: |
251215
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
@@ -359,13 +323,13 @@ jobs:
359323
- target: x86_64-pc-windows-msvc
360324
run_tests: YES
361325
- target: x86_64-pc-windows-gnu
326+
arch: x86_64
362327
mingwdir: mingw64
363328
gcc: x86_64-w64-mingw32-gcc
364-
gcc_package: mingw-w64-x86_64-gcc
365329
- target: i686-pc-windows-gnu # skip-pr skip-master
330+
arch: i686 # skip-pr skip-master
366331
mingwdir: mingw32 # skip-pr skip-master
367332
gcc: i686-w64-mingw32-gcc # skip-pr skip-master
368-
gcc_package: mingw-w64-i686-gcc # skip-pr skip-master
369333
steps:
370334
- uses: actions/checkout@v4
371335
# v2 defaults to a shallow checkout, but we need at least to the previous tag
@@ -384,34 +348,16 @@ jobs:
384348
New-Item "${env:USERPROFILE}\.cargo\git" -ItemType Directory -Force
385349
shell: powershell
386350
- name: Install mingw
387-
uses: msys2/setup-msys2@v2
351+
uses: bwoodsend/setup-winlibs-action@v1
388352
if: matrix.mingwdir != ''
389353
with:
390-
msystem: ${{ matrix.mingwdir }}
391-
install: ${{ matrix.gcc_package }}
392-
- name: Add mingw tools to path
393-
shell: python
394-
if: matrix.mingwdir != ''
395-
run: |
396-
import os
397-
paths = [
398-
r'C:\msys64\${{ matrix.mingwdir }}\bin',
399-
r'C:\msys64\usr\bin',
400-
]
401-
excluded = {
402-
r'C:\mingw64\bin',
403-
}
404-
with open(os.environ["GITHUB_PATH"], "r+") as fp:
405-
lines = fp.readlines()
406-
lines = paths + [l for l in lines if l not in excluded]
407-
fp.seek(0)
408-
fp.writelines(lines)
354+
architecture: ${{ matrix.arch }}
409355
- name: Verify mingw gcc installation
410356
shell: powershell
411357
if: matrix.mingwdir != ''
412358
run: |
413-
choco uninstall -y strawberryperl
414359
Get-Command ${{ matrix.gcc }}
360+
${{ matrix.gcc }} --version
415361
- name: Set PATH
416362
run: |
417363
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8

ci/actions-templates/windows-builds-template.yaml

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ jobs: # skip-master skip-pr skip-stable
2727
- target: x86_64-pc-windows-msvc
2828
run_tests: YES
2929
- target: x86_64-pc-windows-gnu
30+
arch: x86_64
3031
mingwdir: mingw64
3132
gcc: x86_64-w64-mingw32-gcc
32-
gcc_package: mingw-w64-x86_64-gcc
3333
- target: i686-pc-windows-gnu # skip-pr skip-master
34+
arch: i686 # skip-pr skip-master
3435
mingwdir: mingw32 # skip-pr skip-master
3536
gcc: i686-w64-mingw32-gcc # skip-pr skip-master
36-
gcc_package: mingw-w64-i686-gcc # skip-pr skip-master
3737
steps:
3838
- uses: actions/checkout@v4
3939
# v2 defaults to a shallow checkout, but we need at least to the previous tag
@@ -52,34 +52,16 @@ jobs: # skip-master skip-pr skip-stable
5252
New-Item "${env:USERPROFILE}\.cargo\git" -ItemType Directory -Force
5353
shell: powershell
5454
- name: Install mingw
55-
uses: msys2/setup-msys2@v2
55+
uses: bwoodsend/setup-winlibs-action@v1
5656
if: matrix.mingwdir != ''
5757
with:
58-
msystem: ${{ matrix.mingwdir }}
59-
install: ${{ matrix.gcc_package }}
60-
- name: Add mingw tools to path
61-
shell: python
62-
if: matrix.mingwdir != ''
63-
run: |
64-
import os
65-
paths = [
66-
r'C:\msys64\${{ matrix.mingwdir }}\bin',
67-
r'C:\msys64\usr\bin',
68-
]
69-
excluded = {
70-
r'C:\mingw64\bin',
71-
}
72-
with open(os.environ["GITHUB_PATH"], "r+") as fp:
73-
lines = fp.readlines()
74-
lines = paths + [l for l in lines if l not in excluded]
75-
fp.seek(0)
76-
fp.writelines(lines)
58+
architecture: ${{ matrix.arch }}
7759
- name: Verify mingw gcc installation
7860
shell: powershell
7961
if: matrix.mingwdir != ''
8062
run: |
81-
choco uninstall -y strawberryperl
8263
Get-Command ${{ matrix.gcc }}
64+
${{ matrix.gcc }} --version
8365
- name: Set PATH
8466
run: |
8567
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8

0 commit comments

Comments
 (0)