Skip to content

SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.

Merge pull request #1914 from tangency-labs/ci-hybrid-runners

bherbruck15a13e2452b1
diff --cc .github/workflows/ci.yml
index e4674f0d3a,4d1ac13d88..0a9215b12c
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@@ -6,11 -6,15 +6,18 @@@
# vendor/, tests/, scripts/ or any file no package owns select the whole workspace, as do
# pushes to main, the nightly run and Run workflow.
# Tests are built once and run in 4 shards. A few heavy tests (see .config/nextest.toml) are
-# skipped on pull requests and run on pushes to main and nightly.
+# skipped on pull requests and run on pushes to main and nightly. The Windows jobs (D3D12 shaders
+# and app startup) run on pull requests only when what they test changes (the GPU crate, the app,
+# the viewport's GPU glue, the graphics dependencies, their scripts or this file); main and
+# nightly always run them. Only main saves the build caches; pull requests restore them.
# Cross-compilation is opt-in through Run workflow; release builds remain in release.yml.
+ # Pushes to main and merge-queue groups use both pools: Clippy, the doc tests and test shards
+ # 1-2 run on the self-hosted runner (`self-hosted-fast`, warm build directories via
+ # scripts/ci/warm-target.sh), everything else on GitHub's runners. The test archive is built on
+ # GitHub's runners: the self-hosted machine has a newer glibc, so its binaries wouldn't start
+ # on ubuntu-24.04, while the archive runs there unchanged (same /home/runner/work checkout
+ # path). Pull requests, the nightly run and Run workflow use GitHub's runners only; the
+ # self-hosted runner refuses any job that isn't a push to main or a merge-queue group.
name: CI
on:
@@@ -163,10 -151,11 +173,12 @@@ jobs
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
+ # The self-hosted runner keeps its build directory and Cargo home instead.
+ - if: runner.environment == 'github-hosted'
+ uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
key: native-clippy
+ save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Clippy
env:
FULL: ${{ needs.changes.outputs.full }}
@@@ -389,11 -377,15 +401,16 @@@
SCCACHE_IGNORE_SERVER_IO_ERROR: "1"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ - name: Warm build directory (self-hosted runner)
+ if: runner.environment == 'self-hosted'
+ run: scripts/ci/warm-target.sh doc-tests
- uses: dtolnay/rust-toolchain@stable
- - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
+ # The self-hosted runner keeps its build directory and Cargo home instead.
+ - if: runner.environment == 'github-hosted'
+ uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
key: doc-tests
+ save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Set up compiler cache
uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
with: