Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! fixup! ci(windows/gnu): install `m…
Browse files Browse the repository at this point in the history
…ingw` via `msys2/setup-msys2`
  • Loading branch information
rami3l committed Jun 3, 2024
1 parent 41d8974 commit 3005c8d
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 16 deletions.
39 changes: 27 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,23 @@ jobs:
if: matrix.mingwdir != ''
run: |
import os
paths = [
r'C:\msys64\${{ matrix.mingwdir }}\bin',
r'C:\msys64\usr\bin',
]
with open(os.environ["GITHUB_PATH"], "a") as f:
for path in paths:
f.write(path + "\n")
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)
- name: Verify mingw gcc installation
shell: powershell
if: matrix.mingwdir != ''
run: |
choco uninstall -y strawberryperl
Get-Command ${{ matrix.gcc }}
- name: Set PATH
run: |
Expand Down Expand Up @@ -223,18 +228,23 @@ jobs:
if: matrix.mingwdir != ''
run: |
import os
paths = [
r'C:\msys64\${{ matrix.mingwdir }}\bin',
r'C:\msys64\usr\bin',
]
with open(os.environ["GITHUB_PATH"], "a") as f:
for path in paths:
f.write(path + "\n")
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)
- name: Verify mingw gcc installation
shell: powershell
if: matrix.mingwdir != ''
run: |
choco uninstall -y strawberryperl
Get-Command ${{ matrix.gcc }}
- name: Set PATH
run: |
Expand Down Expand Up @@ -384,18 +394,23 @@ jobs:
if: matrix.mingwdir != ''
run: |
import os
paths = [
r'C:\msys64\${{ matrix.mingwdir }}\bin',
r'C:\msys64\usr\bin',
]
with open(os.environ["GITHUB_PATH"], "a") as f:
for path in paths:
f.write(path + "\n")
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)
- name: Verify mingw gcc installation
shell: powershell
if: matrix.mingwdir != ''
run: |
choco uninstall -y strawberryperl
Get-Command ${{ matrix.gcc }}
- name: Set PATH
run: |
Expand Down
13 changes: 9 additions & 4 deletions ci/actions-templates/windows-builds-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,23 @@ jobs: # skip-master skip-pr skip-stable
if: matrix.mingwdir != ''
run: |
import os
paths = [
r'C:\msys64\${{ matrix.mingwdir }}\bin',
r'C:\msys64\usr\bin',
]
with open(os.environ["GITHUB_PATH"], "a") as f:
for path in paths:
f.write(path + "\n")
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)
- name: Verify mingw gcc installation
shell: powershell
if: matrix.mingwdir != ''
run: |
choco uninstall -y strawberryperl
Get-Command ${{ matrix.gcc }}
- name: Set PATH
run: |
Expand Down

0 comments on commit 3005c8d

Please sign in to comment.