aboutsummaryrefslogtreecommitdiff
path: root/.gitea/workflows/test.yml
blob: e9cfc2eb4011624f1ae970dfb0b159592f318eb8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Test

on: [push, pull_request]

jobs:
  lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy
      - name: Cargo check
        run: cargo check --workspace --all-targets --all-features
      - name: Clippy (deny warnings)
        run: cargo clippy --workspace --all-targets --all-features -- -D warnings

  test:
    name: Test
    runs-on: ubuntu-latest
    needs: lint
    steps:
      - uses: actions/checkout@v6
      - 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