Set the CMake internal game components explicitly static #115
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v3 | |
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 / | |
rm /opt/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 | |
- name: Build | |
run: cmake --build build | |
- 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 /opt/smwlibs/bin/{SDL2,SDL2_image,SDL2_mixer_ext}.dll supermariowar/ | |
zip -r "supermariowar_$(date +%F)_windows.zip" supermariowar | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: supermariowar_windows | |
path: supermariowar_*_windows.zip |