Commit 6e9a606a8e36bfff3e8f83279016ffd5d1e9c628

Cameron Cawley 2022-07-30T21:08:07

Add more mingw-w64 build workflows

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)"