CI: Add debug/checked configuration

This commit is contained in:
Margen67
2024-12-27 06:07:37 -08:00
parent 26bf95d50f
commit affb2fb7af

View File

@@ -59,12 +59,13 @@ jobs:
run: .\xb lint --all run: .\xb lint --all
build-windows: 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 needs: lint
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
vsver: [2022] vsver: [2022]
configuration: [Release, Debug, Checked]
runs-on: windows-${{ matrix.vsver }} runs-on: windows-${{ matrix.vsver }}
env: env:
POWERSHELL_TELEMETRY_OPTOUT: 1 POWERSHELL_TELEMETRY_OPTOUT: 1
@@ -77,11 +78,15 @@ jobs:
- name: Build - name: Build
run: .\xb build --config=Release --target=src\xenia-app run: .\xb build --config=Release --target=src\xenia-app
- name: Prepare artifacts - name: Prepare artifacts
if: matrix.configuration == 'Release'
id: prepare_artifacts
run: | run: |
robocopy . build\bin\${{ runner.os }}\Release LICENSE /r:0 /w:0 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 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 } If ($LastExitCode -le 7) { echo "LastExitCode = $LastExitCode";$LastExitCode = 0 }
- name: Upload xenia canary artifacts - name: Upload xenia canary artifacts
if: steps.prepare_artifacts.outcome == 'success'
id: upload_artifacts
uses: actions/upload-artifact@main uses: actions/upload-artifact@main
with: with:
name: xenia_canary_vs${{ matrix.vsver }} name: xenia_canary_vs${{ matrix.vsver }}
@@ -91,10 +96,17 @@ jobs:
if: | if: |
github.repository == 'xenia-canary/xenia-canary' && github.repository == 'xenia-canary/xenia-canary' &&
github.event.action != 'pull_request' && github.event.action != 'pull_request' &&
github.ref == 'refs/heads/canary_experimental' github.ref == 'refs/heads/canary_experimental' &&
steps.upload_artifacts.outcome == 'success'
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | 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" $asset="xenia_canary.zip"
rm -recurse -force artifacts\xenia_canary\*.pdb # Ideally this would use xr, but I can't get it to work 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\* 7z a $asset .\artifacts\xenia_canary\*