Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MinGW CI failures #3618

Merged
merged 1 commit into from
Jul 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 25 additions & 4 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,31 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up MinGW
uses: egor-tensin/setup-mingw@v2
with:
platform: ${{ matrix.architecture }}
- name: Download MinGW 8.1.0
run: |
$headers = @{Authorization = 'Bearer ${{ secrets.GITHUB_TOKEN }}'}
$uri = 'https://nuget.pkg.github.com/falbrechtskirchinger/download/mingw/8.1.0/mingw.8.1.0.nupkg'
Invoke-WebRequest -Uri $uri -Headers $headers -OutFile mingw.8.1.0.nupkg
- name: Uninstall MinGW
continue-on-error: true
run: choco uninstall mingw
# Based on egor-tensin/setup-mingw
- name: Install MinGW 8.1.0
run: |
choco install mingw.8.1.0.nupkg ${{ matrix.architecture == 'x86' && '--x86' || '' }}
$prefix = "${{ matrix.architecture == 'x64' && 'x86_64-w64-mingw32' || 'i686-w64-mingw32' }}"
$mingw = "${{ matrix.architecture == 'x64' && 'mingw64' || 'mingw32' }}"
$mingw_install = Join-Path C: ProgramData chocolatey lib mingw tools install
$mingw_root = Join-Path $mingw_install $mingw
$mingw_bin = Join-Path $mingw_root bin
$mingw_lib = Join-Path $mingw_root $prefix lib
echo $mingw_bin >> $env:GITHUB_PATH
Remove-Item (Join-Path $mingw_lib 'libpthread.dll.a')
Remove-Item (Join-Path $mingw_lib 'libwinpthread.dll.a')
#- name: Set up MinGW
# uses: egor-tensin/setup-mingw@v2
# with:
# platform: ${{ matrix.architecture }}
- name: cmake
run: cmake -S . -B build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On
- name: build
Expand Down