Files
pbz-editor/.github/workflows/build.yml
T

49 lines
1.8 KiB
YAML

name: Build Windows preview
on:
workflow_dispatch:
permissions:
contents: read
jobs:
windows:
runs-on: windows-2025
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: '3.12.10'
- name: Install Python build environment
shell: pwsh
run: |
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements-lock.txt
- name: Build open decoder
shell: pwsh
run: |
rustup toolchain install 1.99.1-x86_64-pc-windows-gnu --profile minimal
rustup override set 1.99.1-x86_64-pc-windows-gnu
.\tools\build_codec.ps1
- name: Unit and native codec tests
shell: pwsh
run: .\.venv\Scripts\python.exe -m pytest -q
- name: Build and verify archives locally on runner
shell: pwsh
run: .\tools\build_release.ps1 -Zip
- name: Packaged startup without a game
shell: pwsh
run: |
$env:PBZ_EDITOR_DATA_DIR = Join-Path $env:RUNNER_TEMP 'pbz-empty-user-data'
$version = (& .\.venv\Scripts\python.exe -c 'from pbz_editor import __version__; print(__version__)').Trim()
$p = Start-Process -FilePath ".\dist\v$version\PBZ-Editor\PBZ-Editor.exe" -ArgumentList '--smoke-empty --language en-US' -PassThru -WindowStyle Hidden
if (-not $p.WaitForExit(30000)) { throw 'Packaged startup timeout' }
if ($p.ExitCode -ne 0) { throw 'Packaged startup failed' }
- name: Upload reviewed build archives
uses: actions/upload-artifact@v4
with:
name: PBZ-Editor-windows-x64
path: |
dist/v*/*.zip
dist/v*/SHA256SUMS.txt
if-no-files-found: error