Merge pull request #3839 from dotCooCoo/ci/pbr-feature-tests

Test serial and parallel PBR builds through the shared gate
This commit is contained in:
BFlat authored and GitHub committed 2026-11-28 11:28:28 +07:00
commit 9928b79324
5 files changed
+32 -5

No files matched your search

+1
View File
@@ -70,6 +70,7 @@ workflows:
- 'actions/checkout@v7.0.1'
- 'dtolnay/rust-toolchain@stable'
'.github/workflows/nightly.yml': []
'.github/workflows/pbr.yml': []
'.github/workflows/pcraft-format.yml':
- 'actions/checkout@v7.0.1'
- 'step-security/dtolnay-rust-toolchain@v1.0.0'
+29
View File
@@ -0,0 +1,29 @@
name: PBR feature tests
on:
workflow_dispatch:
push:
branches: [main, next]
paths: ['crates/pbr/**', 'crates/texture/**', 'Cargo.toml', 'Cargo.lock', '.github/workflows/pbr.yml']
pull_request:
paths: ['crates/pbr/**', 'crates/texture/**', 'Cargo.toml', 'Cargo.lock', '.github/workflows/pbr.yml']
permissions:
contents: read
jobs:
features:
name: PBR ${{ matrix.mode }} tests
strategy:
fail-fast: false
matrix:
include:
- { mode: serial, arguments: '' }
- { mode: parallel, arguments: '--features parallel' }
uses: storytold/craft-common-actions/.github/workflows/gate.yml@main
with:
os: '["ubuntu-latest"]'
craft-fonts-ref: ''
require-craft-fonts: false
timeout-minutes: 30
command: cargo test -p craft-pbr --locked ${{ matrix.arguments }}
Generated
-1
View File
@@ -3581,7 +3581,6 @@ version = "0.1.0"
name = "craft-pbr"
version = "0.1.0"
dependencies = [
"craft-pbr",
"craft-texture",
"glam 0.30.10",
"naga",
-1
View File
@@ -20,7 +20,6 @@ rayon = { workspace = true, optional = true }
thiserror = { workspace = true }
[dev-dependencies]
craft-pbr = { path = ".", features = ["parallel"] }
# The differential tests run verbatim copies of the apps' previous code, which uses glam and rayon.
glam = "0.30"
# Parses and validates the WGSL text of `SHADE_WGSL`.
+2 -3
View File
@@ -1,7 +1,6 @@
//! Elapsed (wall-clock) time of the default filtering:
//! `cargo test -p craft-pbr --release --test it -- --ignored --nocapture bench`.
//! The `parallel` feature is on in this test target even without `--features parallel`, since
//! the crate's dev-dependency on itself enables it, so the times are not a serial baseline.
//! `cargo test -p craft-pbr --release --features parallel --test it -- --ignored --nocapture bench`.
//! The command measures the parallel build. Omitting `--features parallel` measures the serial build.
use std::time::Instant;