diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f39a8cdf1..cf5e9379f 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: |