Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# (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).
# with the runner's DXC (Windows SDK). A second job runs clippy on all targets: its warnings
# are listed in the job's log and do not fail it, because the tree is not lint-clean.
#
# 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
Expand Down Expand Up @@ -52,3 +53,28 @@ jobs:
- name: Build and test
shell: pwsh
run: ./scripts/test.ps1 --skip test_title_runs_and_game_folder_is_untouched

clippy:
name: Clippy (Windows)
runs-on: windows-2025
timeout-minutes: 30
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
steps:
- uses: actions/checkout@v4

- name: Rust (stable, MSVC, clippy)
run: |
rustup toolchain install stable --profile minimal
rustup default stable
rustup component add clippy
rustc --version
cargo clippy --version

- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}

- name: Clippy
run: cargo clippy --workspace --all-targets
4 changes: 4 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,16 @@ Windows 10/11 x64 only, `stable-x86_64-pc-windows-msvc`, Windows SDK (DXC), a D3
.\scripts\test.ps1 # build + all tests
cargo build --workspace && cargo test --workspace -- --test-threads=4 # same, from bash / in the background
cargo test -p xcl --lib <filter> # one area while iterating
cargo clippy --workspace --all-targets # lints, as the CI clippy job runs them
```

- GPU tests print `SKIPPED <test>: <reason>` when the adapter cannot run them and still pass. Report
skips; do not count them as coverage.
- On macOS / Linux the crate does not build or run. Do not claim it does: say "not built / not tested"
in the PR.
- Run clippy before you commit and fix the warnings it reports **in the lines you wrote or
changed**. The tree is not lint-clean and CI's clippy job only warns, so it will not stop you: the
check is yours. Leave the warnings in code you did not touch (no drive-by fixes, see Scope).
- Editing files through PowerShell `Get-Content` / `Set-Content` corrupts UTF-8: use your file tools.
- Some steps (DXC compiles of many shaders, whole-pack runs) take many minutes: run them on small
samples first.
Expand Down
Loading