Skip to content

Commit

Permalink
Try old MinGW script (#3892)
Browse files Browse the repository at this point in the history
* ⚗️ try old MinGW script

* ⚗️ add Clang 13, 14, and 15 for Windows

* 📝 add Clang version to README
  • Loading branch information
nlohmann authored Dec 21, 2022
1 parent a2f0593 commit 4c6cde7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 27 deletions.
33 changes: 6 additions & 27 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,17 @@ concurrency:

jobs:
mingw:
runs-on: windows-latest
runs-on: windows-2019
strategy:
matrix:
architecture: [x64, x86]

steps:
- uses: actions/checkout@v3
- 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: Set up MinGW
uses: egor-tensin/setup-mingw@v2
with:
platform: ${{ matrix.architecture }}
- name: Run CMake
run: cmake -S . -B build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On
- name: Build
Expand Down Expand Up @@ -122,7 +101,7 @@ jobs:
runs-on: windows-2019
strategy:
matrix:
version: [11, 12]
version: [11, 12, 13, 14, 15]

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1172,8 +1172,12 @@ The following compilers are currently used in continuous integration at [AppVeyo
| Clang 11.0.0 with MSVC-like command-line | Windows-10.0.17763 | GitHub Actions |
| Clang 11.0.0 | Ubuntu 20.04.3 LTS | GitHub Actions |
| Clang 12.0.0 | Ubuntu 20.04.3 LTS | GitHub Actions |
| Clang 12.0.0 with GNU-like command-line | Windows-10.0.17763 | GitHub Actions |
| Clang 13.0.0 | Ubuntu 20.04.3 LTS | GitHub Actions |
| Clang 13.0.0 with GNU-like command-line | Windows-10.0.17763 | GitHub Actions |
| Clang 14.0.0 | Ubuntu 20.04.3 LTS | GitHub Actions |
| Clang 14.0.0 with GNU-like command-line | Windows-10.0.17763 | GitHub Actions |
| Clang 15.0.0 with GNU-like command-line | Windows-10.0.17763 | GitHub Actions |
| Clang 15.0.4 | Ubuntu 20.04.3 LTS | GitHub Actions |
| Clang 16.0.0 (16.0.0-++20221031071727+500876226c60-1~exp1~20221031071831.439) | Ubuntu 20.04.3 LTS | GitHub Actions |
| GCC 4.8.5 (Ubuntu 4.8.5-4ubuntu2) | Ubuntu 20.04.3 LTS | GitHub Actions |
Expand Down

0 comments on commit 4c6cde7

Please sign in to comment.