diff options
| author | Valentin Popov <valentin@popov.link> | 2026-02-19 04:02:26 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-02-19 04:02:26 +0300 |
| commit | 18d4c6cf9fabc18282b29d103c8d30024f66e49b (patch) | |
| tree | 7f9adfa0dcae5653f378c14b32a238c6771c1602 /.gitea | |
| parent | 0e19660eb5122c8c52d5e909927884ad5c50b813 (diff) | |
| download | fparkan-18d4c6cf9fabc18282b29d103c8d30024f66e49b.tar.xz fparkan-18d4c6cf9fabc18282b29d103c8d30024f66e49b.zip | |
feat(render-parity): add deterministic frame comparison tool
- Introduced `render-parity` crate for comparing rendered frames against reference images.
- Added command-line options for specifying manifest and output directory.
- Implemented image comparison metrics: mean absolute difference, maximum absolute difference, and changed pixel ratio.
- Created a configuration file `cases.toml` for defining test cases with global defaults and specific parameters.
- Added functionality to capture frames from `render-demo` and save diff images on discrepancies.
- Updated documentation to include usage instructions and CI model for automated testing.
Diffstat (limited to '.gitea')
| -rw-r--r-- | .gitea/workflows/test.yml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index cf314cb..e9cfc2e 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -25,3 +25,31 @@ jobs: - uses: dtolnay/rust-toolchain@stable - name: Cargo test run: cargo test --workspace --all-features -- --nocapture + + render-parity: + name: Render parity + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v6 + - uses: dtolnay/rust-toolchain@stable + - name: Install headless GL runtime + run: | + sudo apt-get update + sudo apt-get install -y xvfb libgl1-mesa-dri libgles2-mesa-dev mesa-utils + - name: Build render-demo binary + run: cargo build -p render-demo --features demo + - name: Run frame parity suite + run: | + xvfb-run -s "-screen 0 1280x720x24" cargo run -p render-parity -- \ + --manifest parity/cases.toml \ + --output-dir target/render-parity/current \ + --demo-bin target/debug/parkan-render-demo \ + --keep-going + - name: Upload parity artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: render-parity-artifacts + path: target/render-parity/current + if-no-files-found: ignore |
