diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7b23bb3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,49 @@ +# Build + tests on a GitHub Windows runner: no GPU and no game data, so the GPU tests skip +# (each prints "SKIPPED : ", 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 / end-to-end tests pass, and the recompiler's HLSL compiles +# with the runner's DXC (Windows SDK). +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