diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 291157d17..9a036a24f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -28,43 +28,38 @@ on: - '.github/workflows/windows.yml' jobs: - mingw32: - name: "MinGW cross-compiler (32-bit)" + mingw: + name: "MinGW cross-compiler (${{ matrix.bits }}-bit)" runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + bits: [32, 64] steps: - uses: actions/checkout@v4 - name: Install compiler run: | - sudo apt-get update && sudo apt-get install -y gettext + sudo dpkg --add-architecture i386 + sudo apt-get update + sudo apt-get install -y --no-install-recommends gettext wine wine${{ matrix.bits }} sudo ./util/buildbot/download_toolchain.sh /usr - name: Build run: | - EXISTING_MINETEST_DIR=$PWD ./util/buildbot/buildwin32.sh B + EXISTING_MINETEST_DIR=$PWD \ + ./util/buildbot/buildwin${{ matrix.bits }}.sh B + + # Check that the resulting binary can run (DLLs etc.) + - name: Runtime test + run: | + dest=$(mktemp -d) + unzip -q -d "$dest" B/build/*.zip + cd "$dest"/minetest-*-win* + wine bin/minetest.exe --version - uses: actions/upload-artifact@v4 with: - name: mingw32 - path: B/build/*.zip - if-no-files-found: error - - mingw64: - name: "MinGW cross-compiler (64-bit)" - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - name: Install compiler - run: | - sudo apt-get update && sudo apt-get install -y gettext - sudo ./util/buildbot/download_toolchain.sh /usr - - - name: Build - run: | - EXISTING_MINETEST_DIR=$PWD ./util/buildbot/buildwin64.sh B - - - uses: actions/upload-artifact@v4 - with: - name: mingw64 + name: "mingw${{ matrix.bits }}" path: B/build/*.zip if-no-files-found: error