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
matrix:
platform:
- { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686, cc: gcc }
- { name: Windows (mingw64+clang), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64, cc: clang }
- { 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: 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 (autotools), os: ubuntu-20.04, shell: sh, autotools: true }
- { name: Ubuntu 22.04 (CMake), os: ubuntu-22.04, shell: sh }
@ -31,21 +34,10 @@ jobs:
with:
msystem: ${{ matrix.platform.msystem }}
install: >-
${{ matrix.platform.msys-env }}-${{ matrix.platform.cc }}
${{ matrix.platform.msys-env }}-cc
${{ matrix.platform.msys-env }}-cmake
${{ matrix.platform.msys-env }}-ninja
${{ 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
if: runner.os == 'Linux'
@ -164,12 +156,10 @@ jobs:
cmake --build cmake_config_build --verbose
- name: Verify sdl2-config
run: |
export CC=${{ matrix.platform.cc || 'gcc' }}
export PATH=${{ env.SDL2_DIR }}/bin:$PATH
cmake/test/test_sdlconfig.sh
- name: Verify sdl2.pc
run: |
export CC=${{ matrix.platform.cc || 'gcc' }}
export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
cmake/test/test_pkgconfig.sh
- name: Distcheck (Autotools)

View file

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

View file

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