Repository navigation
63 lines (60 loc) · 2.43 KB
/
Copy pathgpu-parity.yml
File metadata and controls
63 lines (60 loc) · 2.43 KB
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
56
57
58
59
60
61
62
63
name: GPU parity
# Runs the GPU globe renderer against the CPU renderer (every provider, both Earth
# models, poles, dateline, sunlight, atmosphere, night lights, loaded/pending/missing
# imagery), its device-loss recovery and its warm frame benchmark on each platform's
# runner adapter: Metal on macOS, Direct3D 12 on Windows, Vulkan (lavapipe, a software
# rasterizer) on Linux. Software adapters are accepted here with
# GLOBECRAFT_GPU_ALLOW_SOFTWARE and checked by error statistics. Runs when the
# renderer changes (the tests are ignored elsewhere, and the GPU path once fell
# behind the CPU's for ten days unseen) and by hand; roadmap 8.2.
on:
workflow_dispatch:
push:
paths:
- crates/globecraft-render/**
- .github/workflows/gpu-parity.yml
permissions:
contents: read
jobs:
parity:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [macos-15, windows-2022, ubuntu-24.04]
env:
GLOBECRAFT_GPU_ALLOW_SOFTWARE: '1'
RAYON_NUM_THREADS: '4'
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@master
with:
toolchain: '1.97'
- uses: Swatinem/rust-cache@v2
with:
key: gpu-parity-${{ matrix.os }}
- name: Install Linux libraries and a Vulkan driver
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y pkg-config libudev-dev libgtk-3-dev libxkbcommon-dev libwayland-dev libx11-dev mesa-vulkan-drivers
- name: Parity and frame time
shell: bash
run: |
set -o pipefail
cargo test -p globecraft-render --release --locked gpu_overview_matches_cpu \
-- --ignored --nocapture --test-threads=1 2>&1 | tee parity.txt
cargo test -p globecraft-render --release --locked gpu_device_loss_publishes_a_cpu_frame \
-- --ignored --nocapture --test-threads=1 2>&1 | tee -a parity.txt
cargo test -p globecraft-render --release --locked warm_gpu_frame_time \
-- --ignored --nocapture --test-threads=1 2>&1 | tee -a parity.txt
- name: Summary
if: always()
shell: bash
run: |
{
echo "## ${{ matrix.os }}"
echo '```'
grep -E "GPU globe rendering enabled|^PARITY|^FALLBACK|median|max|panicked" parity.txt | head -40 || true
echo '```'
} >> "$GITHUB_STEP_SUMMARY"