Add MinGW-w64 builds to GitHub Actions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index f39a8cd..cf5e937 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -6,15 +6,34 @@ jobs:
Build:
name: ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.os }}
+
+ defaults:
+ run:
+ shell: ${{ matrix.platform.shell }}
+
strategy:
matrix:
platform:
- - { name: Windows (x64), os: windows-latest, flags: -A x64 }
- - { name: Windows (x86), os: windows-latest, flags: -A Win32 }
- - { name: Windows (ARM64), os: windows-latest, flags: -A ARM64 }
- - { name: Linux, os: ubuntu-20.04, flags: -GNinja }
- - { name: MacOS, os: macos-latest }
+ - { name: Windows (x64), os: windows-latest, shell: pwsh, flags: -A x64 }
+ - { name: Windows (x86), os: windows-latest, shell: pwsh, flags: -A Win32 }
+ - { name: Windows (ARM64), os: windows-latest, shell: pwsh, flags: -A ARM64 }
+ - { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686 }
+ - { name: Windows (mingw64), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64 }
+ - { name: Linux, os: ubuntu-20.04, shell: sh, flags: -GNinja }
+ - { name: MacOS, os: macos-latest, shell: sh }
+
steps:
+ - name: Set up MSYS2
+ if: matrix.platform.shell == 'msys2 {0}'
+ uses: msys2/setup-msys2@v2
+ with:
+ msystem: ${{ matrix.platform.msystem }}
+ install: >-
+ ${{ matrix.platform.msys-env }}-gcc
+ ${{ matrix.platform.msys-env }}-cmake
+ ${{ matrix.platform.msys-env }}-ninja
+ ${{ matrix.platform.msys-env }}-pkg-config
+
- name: Setup Linux dependencies
if: runner.os == 'Linux'
run: |