Skip to content

Some cleanup

Some cleanup #343

Workflow file for this run

name: Build - Windows
on: [push, pull_request, workflow_dispatch]
jobs:
mingw-cross:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake g++-mingw-w64-i686-posix ninja-build
curl -L https://github.com/mmatyas/supermariowar/releases/download/v2.0-beta.0/smwlibs-mingw.tar.xz | tar xJf - -C /tmp/
rm /tmp/smwlibs/lib/{libzlib.a,libzlib.dll.a}
cmake --version
- name: Configure
run: cmake
-S . -B build -G Ninja
-DCMAKE_TOOLCHAIN_FILE=../.github/workflows/mingw_toolchain.cmake
-DUSE_PNG_SAVE=ON
-DUSE_SDL2_LIBS=ON
-DSDL2_USE_MIXERX=ON
-DCMAKE_CXX_FLAGS=-fdiagnostics-color=always
- name: Build
run: cmake --build build --verbose
- name: Package
run: |
cmake --install build --prefix supermariowar --strip
rm -rf supermariowar/include supermariowar/lib
cp /usr/lib/gcc/i686-w64-mingw32/10-posix/{libgcc_s_dw2-1,libstdc++-6}.dll supermariowar/
cp /usr/i686-w64-mingw32/lib/libwinpthread-1.dll supermariowar/
cp /tmp/smwlibs/bin/{SDL2,SDL2_image,SDL2_mixer_ext}.dll supermariowar/
zip -9 -r "supermariowar_$(date +%F)_windows.zip" supermariowar
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: supermariowar_windows
path: supermariowar_*_windows.zip