mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-28 14:18:32 -08:00
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:
5 files changed
+32
-5
No files matched your search
@@ -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'
|
||||
|
||||
@@ -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
@@ -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",
|
||||
|
||||
@@ -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`.
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user