fix: xml errors in flatpak/appimage manifests #20
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 MSYS2) | |
on: | |
push: | |
paths-ignore: | |
- '**/README.md' | |
- '.github/workflows/macos-build.yml' | |
- '.github/workflows/ubuntu-build.yml' | |
- '.github/workflows/windows-build-msvc.yml' | |
- 'appimage-data/**' | |
- 'flatpak-data/**' | |
pull_request: | |
jobs: | |
build-msys2: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: ["Release"] | |
cmake_generator: ["Ninja"] | |
shared_libs_enabled: ["ON", "OFF"] | |
config: | |
- { sys: mingw32, env: i686, cc: gcc, cxx: g++, sdl_arch: x86 } | |
- { sys: mingw32, env: i686, cc: clang, cxx: clang++, sdl_arch: x86 } | |
- { sys: mingw64, env: x86_64, cc: gcc, cxx: g++, sdl_arch: x64 } | |
- { sys: mingw64, env: x86_64, cc: clang, cxx: clang++, sdl_arch: x64 } | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Setup MSYS2 | |
uses: msys2/[email protected] | |
with: | |
msystem: ${{ matrix.config.sys }} | |
install: >- | |
mingw-w64-${{ matrix.config.env }}-gcc | |
mingw-w64-${{ matrix.config.env }}-clang | |
mingw-w64-${{ matrix.config.env }}-make | |
mingw-w64-${{ matrix.config.env }}-cmake | |
mingw-w64-${{ matrix.config.env }}-ninja | |
mingw-w64-${{ matrix.config.env }}-wget | |
mingw-w64-${{ matrix.config.env }}-7zip | |
mingw-w64-${{ matrix.config.env }}-SDL2 | |
mingw-w64-${{ matrix.config.env }}-SDL2_image | |
mingw-w64-${{ matrix.config.env }}-SDL2_mixer | |
- name: Set reusable strings | |
id: strings | |
run: | | |
echo "build-output-dir=$(cygpath -u '${{ github.workspace }}')/build" >> "$GITHUB_OUTPUT" | |
echo "source-dir=$(cygpath -u '${{ github.workspace }}')" >> "$GITHUB_OUTPUT" | |
- name: Configure CMake | |
run: > | |
cmake | |
-G ${{ matrix.cmake_generator }} | |
-S ${{ steps.strings.outputs.source-dir }} | |
-B ${{ steps.strings.outputs.build-output-dir }} | |
-DCMAKE_C_COMPILER=${{ matrix.config.cc }} | |
-DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
-DBUILD_SHARED_LIBS=${{ matrix.shared_libs_enabled }} | |
- name: Build | |
run: > | |
cmake | |
--build ${{ steps.strings.outputs.build-output-dir }} | |
--config ${{ matrix.build_type }} | |
- name: Download SDL2 binaries | |
if: matrix.shared_libs_enabled == 'OFF' | |
run: | | |
mkdir SDL_deps | |
cd SDL_deps | |
wget https://github.com/libsdl-org/SDL/releases/download/release-2.30.1/SDL2-2.30.1-win32-${{ matrix.config.sdl_arch }}.zip | |
wget https://github.com/libsdl-org/SDL_image/releases/download/release-2.8.2/SDL2_image-2.8.2-win32-${{ matrix.config.sdl_arch }}.zip | |
wget https://github.com/libsdl-org/SDL_mixer/releases/download/release-2.8.0/SDL2_mixer-2.8.0-win32-${{ matrix.config.sdl_arch }}.zip | |
7z x -y SDL2-2.30.1-win32-${{ matrix.config.sdl_arch }}.zip | |
7z x -y SDL2_image-2.8.2-win32-${{ matrix.config.sdl_arch }}.zip | |
7z x -y SDL2_mixer-2.8.0-win32-${{ matrix.config.sdl_arch }}.zip | |
cp SDL2.dll '${{ steps.strings.outputs.build-output-dir }}/bin' | |
cp SDL2_image.dll '${{ steps.strings.outputs.build-output-dir }}/bin' | |
cp SDL2_mixer.dll '${{ steps.strings.outputs.build-output-dir }}/bin' | |
- name: Upload Build Artifact | |
if: matrix.shared_libs_enabled == 'OFF' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: 'windows-${{ matrix.config.sys }}-${{ matrix.config.cc }}' | |
path: '${{ github.workspace }}\build\bin' | |
if-no-files-found: error | |
compression-level: 9 | |