Repository navigation
core: let non-navigable surfaces decline keys; keep viewport out of t… #298
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: ci | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| fmt: | |
| name: Rustfmt (live crates) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - run: cargo fmt --all --check | |
| clippy: | |
| name: Clippy (live crates) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - name: Install system dependencies | |
| # apt has no timeout of its own, and the runners' Azure Ubuntu | |
| # mirror intermittently goes dark — apt falls back to | |
| # archive.ubuntu.com and then stalls on a dead socket forever | |
| # (three runs on 2026-08-18 burned the full 6h job limit right | |
| # here). Bound each attempt and retry instead of waiting. | |
| timeout-minutes: 12 | |
| run: | | |
| set -euo pipefail | |
| apt_get() { | |
| sudo timeout 240 apt-get \ | |
| -o Acquire::Retries=3 \ | |
| -o Acquire::http::Timeout=15 \ | |
| -o Acquire::https::Timeout=15 \ | |
| "$@" | |
| } | |
| for attempt in 1 2 3; do | |
| if apt_get update; then | |
| break | |
| fi | |
| echo "::warning::apt-get update stalled or failed (attempt ${attempt}/3)" | |
| sleep 10 | |
| done | |
| apt_get install -y libvulkan-dev libwayland-dev libxkbcommon-dev libdbus-1-dev | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo clippy --workspace --all-targets --locked -- -D warnings | |
| build-test: | |
| name: Build + Test | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| # The full `--workspace --all-targets` debug build links a binary for every | |
| # example/bin/test across the wgpu/vulkano/ash demos. Debuginfo is the bulk | |
| # of those artifacts and had grown past the runner's ~14 GB free disk (link | |
| # failed with "No space left on device" → ld bus errors). Line-tables-only | |
| # debuginfo keeps backtraces usable while roughly halving target/debug. | |
| env: | |
| CARGO_PROFILE_DEV_DEBUG: line-tables-only | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| # wgpu/winit need vulkan + wayland/xkb + dbus on Linux. Same set as | |
| # whisper-git's CI. | |
| - name: Install system dependencies | |
| # apt has no timeout of its own, and the runners' Azure Ubuntu | |
| # mirror intermittently goes dark — apt falls back to | |
| # archive.ubuntu.com and then stalls on a dead socket forever | |
| # (three runs on 2026-08-18 burned the full 6h job limit right | |
| # here). Bound each attempt and retry instead of waiting. | |
| timeout-minutes: 12 | |
| run: | | |
| set -euo pipefail | |
| apt_get() { | |
| sudo timeout 240 apt-get \ | |
| -o Acquire::Retries=3 \ | |
| -o Acquire::http::Timeout=15 \ | |
| -o Acquire::https::Timeout=15 \ | |
| "$@" | |
| } | |
| for attempt in 1 2 3; do | |
| if apt_get update; then | |
| break | |
| fi | |
| echo "::warning::apt-get update stalled or failed (attempt ${attempt}/3)" | |
| sleep 10 | |
| done | |
| apt_get install -y libvulkan-dev libwayland-dev libxkbcommon-dev libdbus-1-dev | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Build workspace | |
| run: cargo build --workspace --all-targets --locked | |
| - name: Run library tests | |
| run: cargo test --workspace --lib --locked | |
| - name: Run doctests | |
| run: cargo test --workspace --doc --locked | |
| - name: Build showcase bundles and lint | |
| run: cargo run -p damascene-tools --bin dump_showcase_bundles --locked | |
| wasm32: | |
| name: Wasm32 (web host) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| # damascene-web's wasm host code lives behind `#[cfg(target_arch = "wasm32")]`, | |
| # so it does not get exercised by the native build/clippy jobs above. | |
| # Catch wgpu / winit / wasm-bindgen API drift here before it lands. | |
| # `--all-targets` so the wasm-side unit tests type-check too (#145). | |
| - run: cargo clippy -p damascene-web --target wasm32-unknown-unknown --all-targets --locked -- -D warnings | |
| - run: cargo clippy -p damascene-web-showcase --target wasm32-unknown-unknown --locked -- -D warnings | |
| android: | |
| name: Android (NativeActivity host) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-linux-android | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| # damascene-android's host code (JNI clipboard, NativeActivity glue) | |
| # lives behind `#[cfg(target_os = "android")]`, so the native jobs | |
| # never exercise it — same rationale as the wasm32 job. | |
| # missing_const_for_thread_local false-positives on already-const | |
| # initializers under this target's thread_local! expansion. | |
| - run: cargo clippy -p damascene-android -p damascene-android-showcase --target aarch64-linux-android --locked -- -D warnings -A clippy::missing_const_for_thread_local | |
| msrv: | |
| name: MSRV (declared rust-version) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@1.89 | |
| - name: Install system dependencies | |
| # apt has no timeout of its own, and the runners' Azure Ubuntu | |
| # mirror intermittently goes dark — apt falls back to | |
| # archive.ubuntu.com and then stalls on a dead socket forever | |
| # (three runs on 2026-08-18 burned the full 6h job limit right | |
| # here). Bound each attempt and retry instead of waiting. | |
| timeout-minutes: 12 | |
| run: | | |
| set -euo pipefail | |
| apt_get() { | |
| sudo timeout 240 apt-get \ | |
| -o Acquire::Retries=3 \ | |
| -o Acquire::http::Timeout=15 \ | |
| -o Acquire::https::Timeout=15 \ | |
| "$@" | |
| } | |
| for attempt in 1 2 3; do | |
| if apt_get update; then | |
| break | |
| fi | |
| echo "::warning::apt-get update stalled or failed (attempt ${attempt}/3)" | |
| sleep 10 | |
| done | |
| apt_get install -y libvulkan-dev libwayland-dev libxkbcommon-dev libdbus-1-dev | |
| - uses: Swatinem/rust-cache@v2 | |
| # Keep the toolchain pin above in lockstep with `rust-version` in the | |
| # workspace Cargo.toml — this job exists to keep that field honest. | |
| - run: cargo check -p damascene-core -p damascene-winit-wgpu --locked | |
| ios: | |
| name: iOS Rust staticlib | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-apple-ios,aarch64-apple-ios-sim | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo check -p damascene-ios -p damascene-ios-showcase --target aarch64-apple-ios --locked | |
| - run: cargo check -p damascene-ios -p damascene-ios-showcase --target aarch64-apple-ios-sim --locked | |
| - run: cargo build -p damascene-ios-showcase --lib --release --target aarch64-apple-ios --locked |