Add MinGW-w64 builds to GitHub Actions

This commit is contained in:
Cameron Cawley 2021-09-20 13:22:20 +01:00 committed by Sam Lantinga
parent 478f9eed28
commit 21c1082786
1 changed files with 24 additions and 5 deletions

View File

@ -6,15 +6,34 @@ jobs:
Build: Build:
name: ${{ matrix.platform.name }} name: ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.os }} runs-on: ${{ matrix.platform.os }}
defaults:
run:
shell: ${{ matrix.platform.shell }}
strategy: strategy:
matrix: matrix:
platform: platform:
- { name: Windows (x64), os: windows-latest, flags: -A x64 } - { name: Windows (x64), os: windows-latest, shell: pwsh, flags: -A x64 }
- { name: Windows (x86), os: windows-latest, flags: -A Win32 } - { name: Windows (x86), os: windows-latest, shell: pwsh, flags: -A Win32 }
- { name: Windows (ARM64), os: windows-latest, flags: -A ARM64 } - { name: Windows (ARM64), os: windows-latest, shell: pwsh, flags: -A ARM64 }
- { name: Linux, os: ubuntu-20.04, flags: -GNinja } - { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686 }
- { name: MacOS, os: macos-latest } - { 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: 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 - name: Setup Linux dependencies
if: runner.os == 'Linux' if: runner.os == 'Linux'
run: | run: |