SR1 HOTFIX: Fix weapons switch not working after selecting food. #303
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows build | |
on: | |
push: | |
paths-ignore: | |
- '.clang-format' | |
- '.drone.star' | |
- '.gitattributes' | |
- '.gitignore' | |
- '.gdbinit' | |
- '.github/*' | |
- '.github/*_TEMPLATE/**' | |
- '*.md' | |
- '*.yml' | |
- '*.txt' | |
- 'docs/**' | |
- 'src/**/*_posix.*' | |
- 'src/**/*_linux.*' | |
- 'src/**/*_gnulinux.*' | |
- 'src/**/*_x11.*' | |
- 'src/**/*_gtk.*' | |
- 'src/**/*_android.*' | |
- 'src/**/*_mac.*' | |
- 'LICENSE' | |
pull_request: | |
paths-ignore: | |
- '.clang-format' | |
- '.drone.star' | |
- '.gitattributes' | |
- '.gitignore' | |
- '.gdbinit' | |
- '.github/*' | |
- '.github/*_TEMPLATE/**' | |
- '*.md' | |
- '*.yml' | |
- '*.txt' | |
- 'docs/**' | |
- 'src/**/*_posix.*' | |
- 'src/**/*_linux.*' | |
- 'src/**/*_gnulinux.*' | |
- 'src/**/*_x11.*' | |
- 'src/**/*_gtk.*' | |
- 'src/**/*_android.*' | |
- 'src/**/*_mac.*' | |
- 'LICENSE' | |
workflow_dispatch: | |
jobs: | |
lint: | |
name: Lint | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check Clang-Format Version | |
run: clang-format --version | |
- name: Lint | |
run: .\xb lint --all | |
build-windows: | |
name: Build (Windows, VS${{ matrix.vsver }}) # runner.os can't be used here | |
needs: lint | |
strategy: | |
fail-fast: false | |
matrix: | |
vsver: [2022, 2019] | |
runs-on: windows-${{ matrix.vsver }} | |
env: | |
POWERSHELL_TELEMETRY_OPTOUT: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Update Python (VS2019) | |
uses: actions/setup-python@v5 | |
if: matrix.vsver == '2019' | |
with: | |
python-version: '3.12' | |
- name: Setup | |
run: .\xb setup | |
- name: Build | |
run: .\xb build --config=Release --target=src\xenia-app | |
- name: Prepare artifacts | |
run: | | |
robocopy . build\bin\${{ runner.os }}\Release LICENSE bindings.ini /r:0 /w:0 | |
robocopy build\bin\${{ runner.os }}\Release artifacts\xenia_canary xenia_canary.exe xenia_canary.pdb LICENSE bindings.ini /r:0 /w:0 | |
If ($LastExitCode -le 7) { echo "LastExitCode = $LastExitCode";$LastExitCode = 0 } | |
- name: Upload xenia canary artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: xenia_canary_vs${{ matrix.vsver }} | |
path: artifacts\xenia_canary | |
if-no-files-found: error | |
- name: Create release | |
if: | | |
github.repository == 'xenia-canary/xenia-canary' && | |
github.event.action != 'pull_request' && | |
github.ref == 'refs/heads/canary_experimental' && | |
matrix.vsver == '2019' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
$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\* | |
If ($(Get-Item $asset).length -le 100000) { | |
Throw "Error: Archive $asset too small!" | |
} | |
$tag=$env:GITHUB_SHA.SubString(0,7) | |
$branch=$($env:GITHUB_REF -replace 'refs/heads/') | |
$title="${tag}_$branch" | |
gh release create $tag $asset --target $env:GITHUB_SHA -t $title | |
# Remove canary_ to prevent conflicts from tag | |
$tag=$($branch -replace 'canary_') | |
gh release delete $tag -y | |
git push --delete origin $tag | |
git tag -d $tag | |
gh release create $tag $asset --target $env:GITHUB_SHA -t $branch |