name: MSYS2 Build on: [push, pull_request] jobs: build: strategy: matrix: build_type: [release, debug] build_options: [default, link_off, translations_only, libretro] include: - cmake_build: '-DCMAKE_BUILD_TYPE=Release' build_type: release - cmake_build: '-DCMAKE_BUILD_TYPE=Debug' build_type: debug - cmake_options: '-DENABLE_LINK=OFF' build_options: link_off - cmake_options: '-DTRANSLATIONS_ONLY=ON' build_options: translations_only - libretro_build: 'DEBUG=0' build_type: release build_options: libretro - libretro_build: 'DEBUG=1' build_type: debug build_options: libretro exclude: # Exclude debug/translations_only build - build_type: debug build_options: translations_only runs-on: windows-latest env: MSYSTEM: CLANG64 defaults: run: shell: msys2 {0} steps: - name: Checkout the code uses: actions/checkout@v4 with: submodules: recursive - name: Setup msys2 uses: msys2/setup-msys2@v2 with: msystem: CLANG64 update: true - name: Install deps run: >- bash installdeps # CMake build - if: matrix.build_options != 'libretro' name: Configure CMake run: cmake -B build -G Ninja ${{ matrix.cmake_build }} -DENABLE_LTO=OFF ${{ matrix.cmake_options }} - if: matrix.build_options != 'libretro' name: Build run: ninja -C build - if: matrix.build_options != 'libretro' name: Install run: ninja -C build install # Libretro build - if: matrix.build_options == 'libretro' name: Build libretro core run: make -C src/libretro ${{ matrix.libretro_build }} CC=clang CXX=clang++ # Run tests - if: matrix.build_options == 'default' name: Run tests run: cd build && ctest -j