Skip to content

Commit

Permalink
e62d0da3924996eedbfee8aeb591d4a79236550ei686
Browse files Browse the repository at this point in the history
  • Loading branch information
rami3l committed Jun 3, 2024
1 parent 3005c8d commit 32fef2c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 90 deletions.
80 changes: 13 additions & 67 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ jobs:
- target: x86_64-pc-windows-msvc
run_tests: YES
- target: x86_64-pc-windows-gnu
arch: x86_64
mingwdir: mingw64
gcc: x86_64-w64-mingw32-gcc
gcc_package: mingw-w64-x86_64-gcc
steps:
- uses: actions/checkout@v4
# v2 defaults to a shallow checkout, but we need at least to the previous tag
Expand All @@ -58,34 +58,16 @@ jobs:
New-Item "${env:USERPROFILE}\.cargo\git" -ItemType Directory -Force
shell: powershell
- name: Install mingw
uses: msys2/setup-msys2@v2
uses: bwoodsend/setup-winlibs-action@v1
if: matrix.mingwdir != ''
with:
msystem: ${{ matrix.mingwdir }}
install: ${{ matrix.gcc_package }}
- name: Add mingw tools to path
shell: python
if: matrix.mingwdir != ''
run: |
import os
paths = [
r'C:\msys64\${{ matrix.mingwdir }}\bin',
r'C:\msys64\usr\bin',
]
excluded = {
r'C:\mingw64\bin',
}
with open(os.environ["GITHUB_PATH"], "r+") as fp:
lines = fp.readlines()
lines = paths + [l for l in lines if l not in excluded]
fp.seek(0)
fp.writelines(lines)
architecture: ${{ matrix.arch }}
- name: Verify mingw gcc installation
shell: powershell
if: matrix.mingwdir != ''
run: |
choco uninstall -y strawberryperl
Get-Command ${{ matrix.gcc }}
${{ matrix.gcc }} --version
- name: Set PATH
run: |
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
Expand Down Expand Up @@ -197,9 +179,9 @@ jobs:
- target: x86_64-pc-windows-msvc
run_tests: YES
- target: x86_64-pc-windows-gnu
arch: x86_64
mingwdir: mingw64
gcc: x86_64-w64-mingw32-gcc
gcc_package: mingw-w64-x86_64-gcc
steps:
- uses: actions/checkout@v4
# v2 defaults to a shallow checkout, but we need at least to the previous tag
Expand All @@ -218,34 +200,16 @@ jobs:
New-Item "${env:USERPROFILE}\.cargo\git" -ItemType Directory -Force
shell: powershell
- name: Install mingw
uses: msys2/setup-msys2@v2
uses: bwoodsend/setup-winlibs-action@v1
if: matrix.mingwdir != ''
with:
msystem: ${{ matrix.mingwdir }}
install: ${{ matrix.gcc_package }}
- name: Add mingw tools to path
shell: python
if: matrix.mingwdir != ''
run: |
import os
paths = [
r'C:\msys64\${{ matrix.mingwdir }}\bin',
r'C:\msys64\usr\bin',
]
excluded = {
r'C:\mingw64\bin',
}
with open(os.environ["GITHUB_PATH"], "r+") as fp:
lines = fp.readlines()
lines = paths + [l for l in lines if l not in excluded]
fp.seek(0)
fp.writelines(lines)
architecture: ${{ matrix.arch }}
- name: Verify mingw gcc installation
shell: powershell
if: matrix.mingwdir != ''
run: |
choco uninstall -y strawberryperl
Get-Command ${{ matrix.gcc }}
${{ matrix.gcc }} --version
- name: Set PATH
run: |
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
Expand Down Expand Up @@ -359,13 +323,13 @@ jobs:
- target: x86_64-pc-windows-msvc
run_tests: YES
- target: x86_64-pc-windows-gnu
arch: x86_64
mingwdir: mingw64
gcc: x86_64-w64-mingw32-gcc
gcc_package: mingw-w64-x86_64-gcc
- target: i686-pc-windows-gnu # skip-pr skip-master
arch: i686 # skip-pr skip-master
mingwdir: mingw32 # skip-pr skip-master
gcc: i686-w64-mingw32-gcc # skip-pr skip-master
gcc_package: mingw-w64-i686-gcc # skip-pr skip-master
steps:
- uses: actions/checkout@v4
# v2 defaults to a shallow checkout, but we need at least to the previous tag
Expand All @@ -384,34 +348,16 @@ jobs:
New-Item "${env:USERPROFILE}\.cargo\git" -ItemType Directory -Force
shell: powershell
- name: Install mingw
uses: msys2/setup-msys2@v2
uses: bwoodsend/setup-winlibs-action@v1
if: matrix.mingwdir != ''
with:
msystem: ${{ matrix.mingwdir }}
install: ${{ matrix.gcc_package }}
- name: Add mingw tools to path
shell: python
if: matrix.mingwdir != ''
run: |
import os
paths = [
r'C:\msys64\${{ matrix.mingwdir }}\bin',
r'C:\msys64\usr\bin',
]
excluded = {
r'C:\mingw64\bin',
}
with open(os.environ["GITHUB_PATH"], "r+") as fp:
lines = fp.readlines()
lines = paths + [l for l in lines if l not in excluded]
fp.seek(0)
fp.writelines(lines)
architecture: ${{ matrix.arch }}
- name: Verify mingw gcc installation
shell: powershell
if: matrix.mingwdir != ''
run: |
choco uninstall -y strawberryperl
Get-Command ${{ matrix.gcc }}
${{ matrix.gcc }} --version
- name: Set PATH
run: |
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
Expand Down
28 changes: 5 additions & 23 deletions ci/actions-templates/windows-builds-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ jobs: # skip-master skip-pr skip-stable
- target: x86_64-pc-windows-msvc
run_tests: YES
- target: x86_64-pc-windows-gnu
arch: x86_64
mingwdir: mingw64
gcc: x86_64-w64-mingw32-gcc
gcc_package: mingw-w64-x86_64-gcc
- target: i686-pc-windows-gnu # skip-pr skip-master
arch: i686 # skip-pr skip-master
mingwdir: mingw32 # skip-pr skip-master
gcc: i686-w64-mingw32-gcc # skip-pr skip-master
gcc_package: mingw-w64-i686-gcc # skip-pr skip-master
steps:
- uses: actions/checkout@v4
# v2 defaults to a shallow checkout, but we need at least to the previous tag
Expand All @@ -52,34 +52,16 @@ jobs: # skip-master skip-pr skip-stable
New-Item "${env:USERPROFILE}\.cargo\git" -ItemType Directory -Force
shell: powershell
- name: Install mingw
uses: msys2/setup-msys2@v2
uses: bwoodsend/setup-winlibs-action@v1
if: matrix.mingwdir != ''
with:
msystem: ${{ matrix.mingwdir }}
install: ${{ matrix.gcc_package }}
- name: Add mingw tools to path
shell: python
if: matrix.mingwdir != ''
run: |
import os
paths = [
r'C:\msys64\${{ matrix.mingwdir }}\bin',
r'C:\msys64\usr\bin',
]
excluded = {
r'C:\mingw64\bin',
}
with open(os.environ["GITHUB_PATH"], "r+") as fp:
lines = fp.readlines()
lines = paths + [l for l in lines if l not in excluded]
fp.seek(0)
fp.writelines(lines)
architecture: ${{ matrix.arch }}
- name: Verify mingw gcc installation
shell: powershell
if: matrix.mingwdir != ''
run: |
choco uninstall -y strawberryperl
Get-Command ${{ matrix.gcc }}
${{ matrix.gcc }} --version
- name: Set PATH
run: |
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
Expand Down

0 comments on commit 32fef2c

Please sign in to comment.