Visual Studio Code, rebuilt in Rust
Rust
ci: run the macOS smoke run in the SAFETY comments job (#107)
Artur Roka31fc4079c76
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 39bfaeceae0..d82ea4ecff0 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -68,8 +68,9 @@ jobs:# clippy::undocumented_unsafe_blocks (native/Cargo.toml); every other clippy lint is off. The crates without unsafe# code forbid it, which the build itself checks (docs/memory-safety.md). Its own job: clippy's build shares nothing# with the test build, and inside the macOS test job it added 261 s to the run. Not expected red on any OS.+ # macOS runs the smoke run here too: one macOS job fewer per run, as the account runs 5 at a time (port/notes.md "CI").safety:- name: SAFETY comments (${{ matrix.os }} ${{ matrix.arch }})+ name: SAFETY comments${{ matrix.os == 'macos' && ' and smoke' || '' }} (${{ matrix.os }} ${{ matrix.arch }})needs: changesif: needs.changes.outputs.rust == 'true'strategy:@@ -90,14 +91,23 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1# Cold, clippy took 626 s on macOS, as long as the warm test job; on Linux it stays off the critical path.+ # macOS's cache holds the smoke build's dependencies too, under its own key.- uses: ./.github/actions/setupwith:+ rust-cache-job: ${{ matrix.os == 'macos' && 'safety-smoke' || '' }}save-rust-cache: ${{ matrix.os == 'macos' }}- working-directory: nativerun: cargo clippy -p app -p exthost --all-targets --locked -- -A clippy::all+ - id: build+ if: matrix.os == 'macos' && !cancelled()+ working-directory: native+ run: cargo build -p app --locked+ - if: ${{ !cancelled() && steps.build.outcome == 'success' }}+ run: APP=native/target/debug/vscrs VSCODE_GPUI_EXTENSIONS=$PWD/upstream/extensions port/tools/linux/smoke# The app itself, which no test starts: a window, the extension host, git and emmet active, an edit saved to disk.# The dev build, from the test job's Rust cache: a release cache does not fit the 10 GB limit. Not expected red.+ # macOS's smoke run is in the safety job.smoke:name: smoke (${{ matrix.os }} ${{ matrix.arch }})needs: changes@@ -106,9 +116,6 @@ jobs:fail-fast: falsematrix:include:- - os: macos- arch: arm64- runner: macos-26# Linux arm64 is out: its build sometimes dies at quit with SIGSEGV (port/ledger.md M23).- os: linuxarch: x64diff --git a/port/notes.md b/port/notes.mdindex 26fd4a697f8..cc84fa63f38 100644--- a/port/notes.md+++ b/port/notes.md@@ -1069,6 +1069,7 @@ What to do (milestone 21, in order):- Affected only: the `changes` job gives `port/tools/ci-changes` the pull request's changed paths, and the `safety`, `smoke` and `test` jobs run only when it prints `rust=true`. It prints `false` only when every path is on its list of documents, agent files and README pictures, so a new kind of file runs everything; `checks` (ledger-check, docs-check) always runs, and so does every job on `main`. As zed's run_tests.yml `orchestrate` job does with its path filters. One switch, not one per crate: app depends on every crate and is most of the build.- Speed (fast-ci, 6 push runs before the change): the wall clock is the macOS test job, p50 1004 s and p90 1725 s. In its run on 06ecd24b0eb: setup 139 s (96 s of it restoring the 1.5 GB `upstream/` cache), clippy 261 s, `cargo test` 714 s (about 450 s building, 238 s of app tests), cache save 40 s. Clippy moved to its own `safety` job, off that path. Windows left ci.yml while M24 is paused (Artur): its four caches (4.6 GB) and the other five passed the 10 GB repository limit, so GitHub evicted macOS's Rust cache and every few runs macOS set up cold (setup p90 1022 s).- Speed, second pass (fast-ci, 11 pull request runs): the macOS test job, p50 951 s and p90 1446 s. In run 46881836418: restoring `upstream/` 75 s, rust-cache 35 s, Zig 13 s, building 439 s (about 374 s of it the `app` crate, which rust-cache never keeps) and app tests 234 s. Three changes. The macOS test job caches `native/target/debug/incremental` (767 MiB, saved from main) and builds with `CARGO_INCREMENTAL=1`: on the Studio the workspace rebuild after a fresh checkout went from 77 s to 20 s. The `upstream/` cache drops `.git`, `out`, `build/node_modules` and the Electron, Codex, Copilot, Claude Agent SDK and Foundry packages after the compile, 4.0 of 7.7 GB on the Studio's tree, with `cargo test --workspace` green on the trimmed copy; that makes the room the incremental cache needs under the 10 GB limit. Zig comes from a cache instead of a download. Not taken: a macOS runner on the Studio (Artur).+- Speed, third pass (fast-ci, 33 pull request runs): wall clock p50 837 s, p90 1447 s; the macOS test job p50 754 s, p90 1289 s, its queue p90 461 s. In run 47288275400: `upstream/` 47 s (34 s of it unpacking), the `app` crate's test build 230 s with the incremental cache, app tests 256 s on the runner's 3 cores. The queue: each run took three macOS jobs and the account runs 5 at a time, so a push to main beside a pull request waited 2 to 13 minutes. macOS's smoke run moved into its safety job under its own Rust cache (`safety-smoke`, 801 MB against `safety`'s 629 MB): two macOS jobs per run, the merged job 600 s against the test job's 715 s in run 47293929945, where a dropped SAFETY comment failed clippy and the smoke run still ran. Not taken: `--test-threads=6` on macOS (app tests 365 and 256 s in two 6-thread runs against 256 and 284 s at 3 threads, on runners of unequal speed, and `inlay_hints` `the_hints_of_an_editor_in_another_group_go_when_the_focus_leaves_it` failed in the 6-thread run, a test that also failed in pull request run 47045725809); a smaller `upstream/` cache (at most the 34 s unpack, needs a list of what the tests read); the `app` crate's 230 s build (a crate split, not CI). The Studio's runner-up pool is gone and was a Linux container, so it cannot take the macOS jobs.## Documents and guardrails (branch worktree-docs)