Files

55 lines
1.7 KiB
YAML

# Build + tests on a GitHub Windows runner: no GPU and no game data, so the GPU tests skip
# (each prints "SKIPPED <test>: <reason>", counted at the end of scripts/test.ps1) and the
# tests on game data pass without running. What it checks on every push and pull request:
# the workspace builds, the unit / integration tests pass, and the recompiler's HLSL compiles
# with the runner's DXC (Windows SDK).
#
# Left out: the test title's end-to-end run (`test_title_runs_and_game_folder_is_untouched`).
# The runner has no System32\xgameruntime.dll (Gaming Services) and only the Microsoft Basic
# Render Driver (4-lane waves): the launcher warns about both, which that test treats as a
# failure. It still runs in `scripts/test.ps1` on a PC.
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
windows:
name: Build and test (Windows, no GPU)
runs-on: windows-2025
timeout-minutes: 45
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
steps:
- uses: actions/checkout@v4
- name: Rust (stable, MSVC)
run: |
rustup toolchain install stable --profile minimal
rustup default stable
rustc --version
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
target
key: cargo-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('**/Cargo.toml') }}
restore-keys: cargo-${{ runner.os }}-
- name: Build and test
shell: pwsh
run: ./scripts/test.ps1 --skip test_title_runs_and_game_folder_is_untouched