From 0866be0c3dfbfe2584ac14e9f34a7a29baec20b3 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz <42140194+IsaacMarovitz@users.noreply.github.com> Date: Wed, 5 Mar 2025 17:37:52 +0000 Subject: [PATCH] Build all presets (#979) * Build all presets Signed-off-by: Isaac Marovitz * Add preset to file name Signed-off-by: Isaac Marovitz * Upload PDB Signed-off-by: Isaac Marovitz Fix Signed-off-by: Isaac Marovitz * Cache by preset Signed-off-by: Isaac Marovitz --------- Signed-off-by: Isaac Marovitz --- .github/workflows/validate.yml | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 9c6cb25e..72b07810 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -14,9 +14,12 @@ jobs: build-linux: name: Build Linux runs-on: ubuntu-24.04 + strategy: + matrix: + preset: ["linux-debug", "linux-release", "linux-relwithdebinfo"] env: LLVM_VERSION: 18 - CMAKE_PRESET: linux-release + CMAKE_PRESET: ${{ matrix.preset }} steps: - name: Checkout Repository @@ -34,7 +37,7 @@ jobs: - name: Setup ccache uses: hendrikmuhs/ccache-action@v1.2 with: - key: ccache-${{ runner.os }} + key: ccache-${{ runner.os }}-${{ matrix.preset }} - name: Cache vcpkg uses: actions/cache@v4 @@ -55,7 +58,7 @@ jobs: uses: actions/cache@v4 with: path: /tmp/ccache - key: ccache-${{ runner.os }} + key: ccache-${{ runner.os }}-${{ matrix.preset }} - name: Prepare Project run: cp ./private/* ./UnleashedRecompLib/private @@ -73,13 +76,16 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v4 with: - name: UnleashedRecomp-Linux + name: UnleashedRecomp-Linux-${{ env.CMAKE_PRESET }} path: ./out/build/${{ env.CMAKE_PRESET }}/UnleashedRecomp/UnleashedRecomp build-windows: name: Build Windows runs-on: windows-latest + strategy: + matrix: + preset: ["x64-Clang-Debug", "x64-Clang-Release", "x64-Clang-RelWithDebInfo"] env: - CMAKE_PRESET: x64-Clang-Release + CMAKE_PRESET: ${{ matrix.preset }} steps: - name: Checkout repository @@ -97,7 +103,7 @@ jobs: - name: Setup ccache uses: hendrikmuhs/ccache-action@v1.2 with: - key: ccache-${{ runner.os }} + key: ccache-${{ runner.os }}-${{ matrix.preset }} - name: Cache vcpkg uses: actions/cache@v4 @@ -144,8 +150,15 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v4 with: - name: UnleashedRecomp-Windows + name: UnleashedRecomp-Windows-${{ env.CMAKE_PRESET }} path: .\UnleashedRecomp-Windows.zip + + - name: Upload PDB + uses: actions/upload-artifact@v4 + if: ${{ matrix.preset != 'x64-Clang-Release' }} + with: + name: UnleashedRecomp-Windows-${{ env.CMAKE_PRESET }}-PDB + path: .\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\UnleashedRecomp.pdb build-flatpak: name: Build Flatpak runs-on: ubuntu-24.04