Skip to content

Rendering quality roadmap: layered PBR and renderer foundations #352

Rendering quality roadmap: layered PBR and renderer foundations

Rendering quality roadmap: layered PBR and renderer foundations #352

Workflow file for this run

name: Tests
# Runs on every PR to main, every push to main, and on version tag pushes
# (so release.yml can gate publish on a green Tests run for the exact SHA
# being released). Mirrors the gating pattern from the Perry compiler repo.
on:
push:
branches: [main]
tags: ['v*']
pull_request:
branches: [main]
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
# Pin macOS deployment target so cached object files carry a stable
# LC_VERSION_MIN regardless of which runner image Apple rolls to next.
MACOSX_DEPLOYMENT_TARGET: "13.0"
jobs:
# ---------------------------------------------------------------------------
# Shared crate unit tests on all three host OSes. Runs the jolt_sys smoke
# tests (bj_global_init → bj_world_create → bj_world_step → gravity fall →
# teardown), which exercise the compiled Jolt static lib at runtime. This
# is the strongest signal that the Rapier → Jolt migration works on each
# platform — a cmake build-only check would miss runtime issues like
# mismatched C++ ABI or thread-pool problems.
#
# Linux needs cmake + a C++ toolchain for the shim. Windows gets MSVC via
# the ilammy action so cmake's CXX compiler probe succeeds.
# ---------------------------------------------------------------------------
shared-tests:
strategy:
fail-fast: false
matrix:
os: [macos-14, ubuntu-22.04, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install Linux build deps (cmake + C++)
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y cmake build-essential pkg-config
- name: Set up MSVC environment (Windows)
if: matrix.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
native/shared/target
key: ${{ runner.os }}-shared-${{ hashFiles('native/shared/Cargo.lock') }}
restore-keys: ${{ runner.os }}-shared-
- name: quick / shared-tests
run: ./scripts/ci-check.sh --quick --component shared-tests
- name: Upload failure evidence
if: failure()
uses: ./.github/actions/upload-ci-failure
with:
name: shared-tests-${{ runner.os }}
# ---------------------------------------------------------------------------
# FFI parity: every function in package.json's perry.nativeLibrary manifest
# must be exported with matching arity by every platform crate (hand-written
# or via define_core_ffi!/define_physics_ffi!). This is the check whose
# absence let Android ship 60 functions behind (#59) and Windows ship the
# whole scene-graph surface as silent no-op stubs. Cheap (pure text parse),
# runs everywhere, gates merges.
# ---------------------------------------------------------------------------
ffi-parity:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: quick / contracts
run: ./scripts/ci-check.sh --quick --component contracts
- name: quick / example-inventory
run: ./scripts/ci-check.sh --quick --component example-inventory
- name: Upload failure evidence
if: failure()
uses: ./.github/actions/upload-ci-failure
with:
name: ffi-contracts
# ---------------------------------------------------------------------------
# Lint: rustfmt plus a strict clippy correctness/performance ratchet.
# Legacy style debt is documented in scripts/ci-check.sh rather than making
# findings advisory or silently accepting new correctness regressions.
# ---------------------------------------------------------------------------
lint:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: quick / lint
run: ./scripts/ci-check.sh --quick --component lint
- name: Upload failure evidence
if: failure()
uses: ./.github/actions/upload-ci-failure
with:
name: lint
# ---------------------------------------------------------------------------
# Per-platform builds: each native crate is a separate Cargo workspace root
# (one Cargo.lock per platform) and they only build on their own OS.
# A successful build proves that:
# 1. The platform crate compiles against the current shared API
# 2. The Jolt C++ shim builds for that target (cmake picks a working
# toolchain)
# 3. wgpu + the platform's windowing + audio deps resolve cleanly
# ---------------------------------------------------------------------------
build-macos:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
native/macos/target
key: ${{ runner.os }}-macos-crate-${{ hashFiles('native/macos/Cargo.lock') }}
restore-keys: ${{ runner.os }}-macos-crate-
- name: full / host-build
run: ./scripts/ci-check.sh --full --component host-build
- name: Upload failure evidence
if: failure()
uses: ./.github/actions/upload-ci-failure
with:
name: build-macos
build-linux:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install system deps (X11, ALSA, cmake, C++ toolchain)
run: |
sudo apt-get update
sudo apt-get install -y \
libx11-dev libxcb1-dev libxrandr-dev libxi-dev libxcursor-dev \
libasound2-dev libpulse-dev \
pkg-config cmake build-essential
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
native/linux/target
key: ${{ runner.os }}-linux-crate-${{ hashFiles('native/linux/Cargo.lock') }}
restore-keys: ${{ runner.os }}-linux-crate-
- name: full / host-build
run: ./scripts/ci-check.sh --full --component host-build
- name: Upload failure evidence
if: failure()
uses: ./.github/actions/upload-ci-failure
with:
name: build-linux
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Set up MSVC environment
# Populates LIB / INCLUDE / PATH so cmake (which builds the Jolt C++
# shim via bloom-shared's build.rs) can find the Windows SDK. Without
# this, jolt cmake fails the initial CXX compiler probe even though
# MSVC is installed on the runner.
uses: ilammy/msvc-dev-cmd@v1
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
native/windows/target
key: ${{ runner.os }}-windows-crate-${{ hashFiles('native/windows/Cargo.lock') }}
restore-keys: ${{ runner.os }}-windows-crate-
- name: full / host-build
run: ./scripts/ci-check.sh --full --component host-build
- name: Upload failure evidence
if: failure()
uses: ./.github/actions/upload-ci-failure
with:
name: build-windows
# ---------------------------------------------------------------------------
# Mobile/Apple cross-compiles. Renderer platform glue is checked on every PR;
# Jolt is disabled here because release.yml independently builds every mobile
# Jolt archive from source. Together the two workflows cover both halves
# without rebuilding the large C++ dependency for every Rust target on every
# pull request.
# ---------------------------------------------------------------------------
mobile-targets:
strategy:
fail-fast: false
matrix:
include:
- { crate: android, target: aarch64-linux-android, runner: ubuntu-22.04, features: "models3d,image-extras" }
- { crate: android, target: armv7-linux-androideabi, runner: ubuntu-22.04, features: "models3d,image-extras" }
- { crate: android, target: x86_64-linux-android, runner: ubuntu-22.04, features: "models3d,image-extras" }
- { crate: ios, target: aarch64-apple-ios, runner: macos-14, features: "models3d,image-extras" }
- { crate: ios, target: aarch64-apple-ios-sim, runner: macos-14, features: "models3d,image-extras" }
- { crate: ios, target: x86_64-apple-ios, runner: macos-14, features: "models3d,image-extras" }
- { crate: tvos, target: aarch64-apple-tvos, runner: macos-14, features: "models3d,image-extras" }
- { crate: tvos, target: aarch64-apple-tvos-sim, runner: macos-14, features: "models3d,image-extras" }
- { crate: visionos, target: aarch64-apple-visionos, runner: macos-14, features: "models3d,image-extras" }
- { crate: visionos, target: aarch64-apple-visionos-sim, runner: macos-14, features: "models3d,image-extras" }
- { crate: watchos, target: aarch64-apple-watchos, runner: macos-14, features: "" }
- { crate: watchos, target: aarch64-apple-watchos-sim, runner: macos-14, features: "" }
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- name: Install Rust target
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install Android native build tools
if: matrix.crate == 'android'
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build build-essential
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
native/${{ matrix.crate }}/target
key: ${{ runner.os }}-${{ matrix.crate }}-${{ matrix.target }}-${{ hashFiles(format('native/{0}/Cargo.lock', matrix.crate)) }}
restore-keys: ${{ runner.os }}-${{ matrix.crate }}-${{ matrix.target }}-
- name: cross / target-check
env:
BLOOM_CROSS_CRATE: ${{ matrix.crate }}
BLOOM_CROSS_TARGET: ${{ matrix.target }}
BLOOM_CROSS_FEATURES: ${{ matrix.features }}
run: ./scripts/ci-check.sh --cross --component target-check
- name: Upload failure evidence
if: failure()
uses: ./.github/actions/upload-ci-failure
with:
name: mobile-${{ matrix.crate }}-${{ matrix.target }}
# ---------------------------------------------------------------------------
# Web / WASM. No submodule needed: bloom-shared's build.rs early-exits on
# target_arch=wasm32, and web physics is bridged to JoltPhysics.js at
# runtime rather than a native Jolt static lib.
# ---------------------------------------------------------------------------
build-web:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain (wasm32)
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
native/web/target
native/shared/target
key: ${{ runner.os }}-web-${{ hashFiles('native/web/Cargo.lock', 'native/shared/Cargo.lock') }}
restore-keys: ${{ runner.os }}-web-
- name: web / wasm-check
run: ./scripts/ci-check.sh --web --component wasm-check
- name: web / wasm-build
run: ./scripts/ci-check.sh --web --component wasm-build
- name: Upload qualified web package
uses: actions/upload-artifact@v4
with:
name: bloom-web-package-${{ github.run_id }}
path: native/web/pkg
if-no-files-found: error
retention-days: 1
- name: Upload failure evidence
if: failure()
uses: ./.github/actions/upload-ci-failure
with:
name: build-web
# Linux remains the required WASM build host. Its GPU-less Chrome image can
# expose a SwiftShader adapter but cannot allocate a WebGPU swap-chain shared
# image, so validate the exact Linux-built package in macOS Chrome, which has
# a working hosted WebGPU presentation path.
browser-smoke:
needs: build-web
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Download qualified web package
uses: actions/download-artifact@v4
with:
name: bloom-web-package-${{ github.run_id }}
path: native/web/pkg
- name: web / browser-smoke
run: ./scripts/ci-check.sh --web --component browser-smoke
- name: Upload failure evidence
if: failure()
uses: ./.github/actions/upload-ci-failure
with:
name: browser-smoke