From 065b34dd08e9bdf80f6ecc0b801bf104bfaa511f Mon Sep 17 00:00:00 2001 From: kichikuou Date: Sun, 19 Jan 2025 13:49:55 +0900 Subject: [PATCH] CI: Package MSYS2 build --- .github/workflows/windows-msvc.yml | 5 ++-- .github/workflows/windows.yml | 38 +++++++++++++++++++++++------- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/.github/workflows/windows-msvc.yml b/.github/workflows/windows-msvc.yml index 073a20e..d21c783 100644 --- a/.github/workflows/windows-msvc.yml +++ b/.github/workflows/windows-msvc.yml @@ -9,9 +9,9 @@ jobs: arch: ["Win32", "x64"] include: - arch: "Win32" - package: "system3-sdl2-32bit" + package: "system3-sdl2-msvc-32bit" - arch: "x64" - package: "system3-sdl2-64bit" + package: "system3-sdl2-msvc-64bit" name: MSVS ${{ matrix.arch }} steps: @@ -34,4 +34,3 @@ jobs: with: name: ${{ matrix.package }} path: out/artifacts - compression-level: 9 # because we use it for releases diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 93dc297..028d013 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -5,8 +5,13 @@ jobs: build: runs-on: windows-latest strategy: + fail-fast: false matrix: - sys: ["MINGW32", "UCRT64"] + include: + - sys: mingw32 + package: "system3-sdl2-32bit" + - sys: ucrt64 + package: "system3-sdl2-64bit" defaults: run: shell: msys2 {0} @@ -18,9 +23,6 @@ jobs: with: msystem: ${{ matrix.sys }} pacboy: >- - gcc:p - cmake:p - ninja:p SDL2:p SDL2_ttf:p rtmidi:p @@ -31,9 +33,29 @@ jobs: with: submodules: true + - name: Copy licenses + run: | + ls /${{ matrix.sys }}/share/licenses + mkdir dist + cp -r /${{ matrix.sys }}/share/licenses dist/ + cp resources/fonts/*.license dist/licenses/ + cp deps/ymfm/LICENSE dist/licenses/ymfm.license + + - name: Install dev dependencies + run: pacboy --noconfirm -S --needed gcc:p cmake:p ninja:p + - name: Build run: | - mkdir -p out/debug - cd out/debug - cmake -G"Ninja" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_COMPILE_WARNING_AS_ERROR=YES ../../ - ninja + cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_COMPILE_WARNING_AS_ERROR=YES + cmake --build build + + - name: Package + run: | + cp build/system3.exe COPYING.txt dist/ + + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.package }} + path: dist + compression-level: 9 # because we use it for releases