Add more mingw-w64 build workflows
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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 118b9ea..3cc78e1 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -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)
diff --git a/cmake/test/test_pkgconfig.sh b/cmake/test/test_pkgconfig.sh
index 944fb2b..7afc00b 100755
--- a/cmake/test/test_pkgconfig.sh
+++ b/cmake/test/test_pkgconfig.sh
@@ -1,7 +1,7 @@
#!/bin/sh
if test "x$CC" = "x"; then
- CC=gcc
+ CC=cc
fi
machine="$($CC -dumpmachine)"
diff --git a/cmake/test/test_sdlconfig.sh b/cmake/test/test_sdlconfig.sh
index 76c620d..8de5421 100755
--- a/cmake/test/test_sdlconfig.sh
+++ b/cmake/test/test_sdlconfig.sh
@@ -1,7 +1,7 @@
#!/bin/sh
if test "x$CC" = "x"; then
- CC=gcc
+ CC=cc
fi
machine="$($CC -dumpmachine)"