Add more mingw-w64 build workflows

This commit is contained in:
Cameron Cawley 2022-07-30 21:08:07 +01:00 committed by Sam Lantinga
parent 3bdc10f842
commit 6e9a606a8e
3 changed files with 8 additions and 18 deletions

View File

@ -15,8 +15,11 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
platform: platform:
- { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686, cc: gcc } - { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686 }
- { name: Windows (mingw64+clang), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64, cc: clang } - { name: Windows (mingw64), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64 }
- { name: Windows (clang32), os: windows-latest, shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686 }
- { name: Windows (clang64), os: windows-latest, shell: 'msys2 {0}', msystem: clang64, msys-env: mingw-w64-clang-x86_64 }
- { name: Windows (ucrt64), os: windows-latest, shell: 'msys2 {0}', msystem: ucrt64, msys-env: mingw-w64-ucrt-x86_64 }
- { name: Ubuntu 20.04 (CMake), os: ubuntu-20.04, shell: sh } - { name: Ubuntu 20.04 (CMake), os: ubuntu-20.04, shell: sh }
- { name: Ubuntu 20.04 (autotools), os: ubuntu-20.04, shell: sh, autotools: true } - { name: Ubuntu 20.04 (autotools), os: ubuntu-20.04, shell: sh, autotools: true }
- { name: Ubuntu 22.04 (CMake), os: ubuntu-22.04, shell: sh } - { name: Ubuntu 22.04 (CMake), os: ubuntu-22.04, shell: sh }
@ -31,21 +34,10 @@ jobs:
with: with:
msystem: ${{ matrix.platform.msystem }} msystem: ${{ matrix.platform.msystem }}
install: >- install: >-
${{ matrix.platform.msys-env }}-${{ matrix.platform.cc }} ${{ matrix.platform.msys-env }}-cc
${{ matrix.platform.msys-env }}-cmake ${{ matrix.platform.msys-env }}-cmake
${{ matrix.platform.msys-env }}-ninja ${{ matrix.platform.msys-env }}-ninja
${{ matrix.platform.msys-env }}-pkg-config ${{ matrix.platform.msys-env }}-pkg-config
- name: Configure MSYS2 compiler
if: matrix.platform.shell == 'msys2 {0}'
run: |
if test x${{ matrix.platform.cc}} == xgcc; then
echo "CC=gcc" >> $GITHUB_ENV
echo "CXX=g++" >> $GITHUB_ENV
fi
if test x${{ matrix.platform.cc}} == xclang; then
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
fi
- name: Setup Linux dependencies - name: Setup Linux dependencies
if: runner.os == 'Linux' if: runner.os == 'Linux'
@ -164,12 +156,10 @@ jobs:
cmake --build cmake_config_build --verbose cmake --build cmake_config_build --verbose
- name: Verify sdl2-config - name: Verify sdl2-config
run: | run: |
export CC=${{ matrix.platform.cc || 'gcc' }}
export PATH=${{ env.SDL2_DIR }}/bin:$PATH export PATH=${{ env.SDL2_DIR }}/bin:$PATH
cmake/test/test_sdlconfig.sh cmake/test/test_sdlconfig.sh
- name: Verify sdl2.pc - name: Verify sdl2.pc
run: | run: |
export CC=${{ matrix.platform.cc || 'gcc' }}
export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
cmake/test/test_pkgconfig.sh cmake/test/test_pkgconfig.sh
- name: Distcheck (Autotools) - name: Distcheck (Autotools)

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
if test "x$CC" = "x"; then if test "x$CC" = "x"; then
CC=gcc CC=cc
fi fi
machine="$($CC -dumpmachine)" machine="$($CC -dumpmachine)"

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
if test "x$CC" = "x"; then if test "x$CC" = "x"; then
CC=gcc CC=cc
fi fi
machine="$($CC -dumpmachine)" machine="$($CC -dumpmachine)"