Repository navigation
Report WGSL postprocessing support from the current window backend #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Native WGSL source check | |
| on: | |
| push: | |
| branches: [wip/wgsl-native-postprocess-20261006] | |
| paths: | |
| - .github/workflows/native-wgsl-source-check.yml | |
| - crates/gpui/** | |
| - crates/gpui_wgpu/** | |
| - crates/gpui_windows/** | |
| - Cargo.toml | |
| - Cargo.lock | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: native-wgsl-source-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| native-source: | |
| if: github.repository == 'Kuddev/zed' | |
| runs-on: windows-2022 | |
| timeout-minutes: 50 | |
| env: | |
| RUSTUP_TOOLCHAIN: 1.97.1 | |
| CARGO_HOME: D:\c | |
| CARGO_TARGET_DIR: D:\native-target | |
| CARGO_NET_GIT_FETCH_WITH_CLI: 'true' | |
| CARGO_INCREMENTAL: '0' | |
| CARGO_PROFILE_DEV_DEBUG: '0' | |
| CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG: '0' | |
| CARGO_PROFILE_TEST_DEBUG: '0' | |
| CARGO_PROFILE_TEST_BUILD_OVERRIDE_DEBUG: '0' | |
| CARGO_TERM_COLOR: always | |
| steps: | |
| - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd | |
| with: | |
| persist-credentials: false | |
| - name: Install the pinned compiler | |
| shell: pwsh | |
| run: rustup toolchain install 1.97.1 --profile minimal --no-self-update | |
| - name: Support long dependency paths on the ephemeral runner | |
| shell: pwsh | |
| run: git config --global core.longpaths true | |
| - name: Check complete native renderer sources | |
| shell: pwsh | |
| run: cargo check --locked -p gpui -p gpui_wgpu -p gpui_windows --lib | |
| - name: Verify native WGSL compilation and source reuse | |
| shell: pwsh | |
| run: cargo test --locked -p gpui_windows --lib directx_atlas::postprocess_wgsl::tests | |
| - name: Verify per-window capability reporting | |
| shell: pwsh | |
| run: cargo test --locked -p gpui --lib window::tests::postprocess_capability_is_per_atlas_and_does_not_install_a_factory | |
| - name: Build the hardware acceptance executable without running it | |
| id: hardware-fixture | |
| shell: pwsh | |
| run: | | |
| cargo test --locked -p gpui_wgpu --lib --no-run --message-format=json | | |
| Tee-Object -FilePath "$env:RUNNER_TEMP/native-test-build.jsonl" | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| $artifacts = @(Get-Content "$env:RUNNER_TEMP/native-test-build.jsonl" | | |
| ForEach-Object { $_ | ConvertFrom-Json } | | |
| Where-Object { $_.reason -eq 'compiler-artifact' -and $_.target.name -eq 'gpui_wgpu' -and $_.profile.test -and $_.executable }) | |
| if ($artifacts.Count -ne 1) { throw 'Expected exactly one native test executable' } | |
| $out = Join-Path $env:RUNNER_TEMP 'native-wgsl-hardware' | |
| New-Item -ItemType Directory -Path $out | Out-Null | |
| Copy-Item -LiteralPath $artifacts[0].executable -Destination "$out/native-postprocess-tests.exe" | |
| & "$out/native-postprocess-tests.exe" --exact wgpu_renderer::postprocess_tests::normalized_pixel_oracle_preserves_strict_boundaries | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| @{ | |
| source_revision = $env:GITHUB_SHA | |
| executable_sha256 = (Get-FileHash "$out/native-postprocess-tests.exe" -Algorithm SHA256).Hash | |
| hardware_execution = 'not run' | |
| test_filter = 'native_postprocess::tests::native_vulkan_postprocess_contract' | |
| scene_test_filter = 'wgpu_renderer::postprocess_tests::native_surface_scene_order_and_replay' | |
| abi_input = 'PEBREL_EFFECT_ABI must point to the actual UTF-8 product ABI file' | |
| } | ConvertTo-Json | Set-Content -Encoding utf8 "$out/manifest.json" | |
| "directory=$out" >> $env:GITHUB_OUTPUT | |
| - name: Retain the executable for physical GPU acceptance | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: native-wgsl-hardware-${{ github.sha }} | |
| path: ${{ steps.hardware-fixture.outputs.directory }} | |
| if-no-files-found: error | |
| retention-days: 7 | |
| - name: Record qualification scope | |
| if: always() | |
| shell: pwsh | |
| run: | | |
| @" | |
| Source revision: $env:GITHUB_SHA | |
| This job compiles the complete common, WGPU, and Windows renderer sources. | |
| It also builds, but does not run, the explicit hardware acceptance test. | |
| The deterministic pixel-oracle boundary test is executed on this runner. | |
| The scene test uses a hidden native surface and offscreen frame readback; | |
| it does not claim visible swapchain presentation or product UI acceptance. | |
| It does not execute the hardware Vulkan pixel fixture, exercise a window, | |
| qualify Metal, or change the application's pinned dependencies. | |
| "@ >> $env:GITHUB_STEP_SUMMARY |