Add runtime test to mingw CI

This commit is contained in:
sfan5 2024-04-15 17:08:42 +02:00
parent df2fd399df
commit d767ab0890

@ -28,43 +28,38 @@ on:
- '.github/workflows/windows.yml' - '.github/workflows/windows.yml'
jobs: jobs:
mingw32: mingw:
name: "MinGW cross-compiler (32-bit)" name: "MinGW cross-compiler (${{ matrix.bits }}-bit)"
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
bits: [32, 64]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install compiler - name: Install compiler
run: | 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 sudo ./util/buildbot/download_toolchain.sh /usr
- name: Build - name: Build
run: | 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 - uses: actions/upload-artifact@v4
with: with:
name: mingw32 name: "mingw${{ matrix.bits }}"
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
path: B/build/*.zip path: B/build/*.zip
if-no-files-found: error if-no-files-found: error