From affb2fb7afd27ab9cb92bd6a0b50b1441da0fda3 Mon Sep 17 00:00:00 2001 From: Margen67 Date: Fri, 27 Dec 2024 06:07:37 -0800 Subject: [PATCH] CI: Add debug/checked configuration --- .github/workflows/Windows_build.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Windows_build.yml b/.github/workflows/Windows_build.yml index 2ad4dc1c0..26c65a05f 100644 --- a/.github/workflows/Windows_build.yml +++ b/.github/workflows/Windows_build.yml @@ -59,12 +59,13 @@ jobs: run: .\xb lint --all build-windows: - name: Build (Windows, VS${{ matrix.vsver }}) # runner.os can't be used here + name: Build (Windows, VS${{ matrix.vsver }}, ${{ matrix.configuration }}) # runner.os can't be used here needs: lint strategy: fail-fast: false matrix: vsver: [2022] + configuration: [Release, Debug, Checked] runs-on: windows-${{ matrix.vsver }} env: POWERSHELL_TELEMETRY_OPTOUT: 1 @@ -77,11 +78,15 @@ jobs: - name: Build run: .\xb build --config=Release --target=src\xenia-app - name: Prepare artifacts + if: matrix.configuration == 'Release' + id: prepare_artifacts run: | robocopy . build\bin\${{ runner.os }}\Release LICENSE /r:0 /w:0 robocopy build\bin\${{ runner.os }}\Release artifacts\xenia_canary xenia_canary.exe xenia_canary.pdb LICENSE /r:0 /w:0 If ($LastExitCode -le 7) { echo "LastExitCode = $LastExitCode";$LastExitCode = 0 } - name: Upload xenia canary artifacts + if: steps.prepare_artifacts.outcome == 'success' + id: upload_artifacts uses: actions/upload-artifact@main with: name: xenia_canary_vs${{ matrix.vsver }} @@ -91,10 +96,17 @@ jobs: if: | github.repository == 'xenia-canary/xenia-canary' && github.event.action != 'pull_request' && - github.ref == 'refs/heads/canary_experimental' + github.ref == 'refs/heads/canary_experimental' && + steps.upload_artifacts.outcome == 'success' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + # REMOVE THIS IF UNNEEDED v + if [ ${{ matrix.configuration }} != Release ]; then + echo "::error::Can only create release for Release build" + exit 1 + fi + # REMOVE THIS IF UNNEEDED ^ $asset="xenia_canary.zip" rm -recurse -force artifacts\xenia_canary\*.pdb # Ideally this would use xr, but I can't get it to work 7z a $asset .\artifacts\xenia_canary\*