Skip to content

ci: Windows dev drive + sccache for the test matrix, cached LFS corpora - #194

Merged
DrunkOnJava merged 3 commits into
mainfrom
ci/windows-dev-drive-sccache
Aug 30, 2026
Merged

DrunkOnJava merged 3 commits into
mainfrom
ci/windows-dev-drive-sccache

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Aug 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

Three CI-speed changes, SHA-pinned: a ReFS dev drive for CARGO_HOME/CARGO_TARGET_DIR on Windows, sccache (GHA cache backend) on the whole cargo-test matrix, and a fetch-corpus composite action that caches the phi-ag / magnetar LFS checkouts keyed on upstream HEAD.

Motivation

Baseline on main: cargo test / windows-latest 12 min, macos 9, ubuntu 7. The Windows gap is C: disk I/O, and every corpus-using job re-downloads hundreds of MB of LFS objects per run.

Changes

  • .github/actions/fetch-corpus/action.yml — git ls-remote HEAD → actions/cache → checkout with LFS on miss
  • .github/workflows/ci.yml — dev drive step (Windows only), sccache step + SCCACHE_GHA_ENABLED/RUSTC_WRAPPER on the cargo-test job, all LFS corpus checkouts routed through the composite

Testing

  • YAML + actionlint clean
  • This PR's own CI run is the measurement: compare the Windows job's duration against the 12-minute baseline. sccache is cold on the first run; the second run shows its effect.

Note

Low Risk
Workflow and caching-only changes with no product code paths; corpus cache invalidates when upstream HEAD moves.

Overview
CI speedups for the cargo-test matrix and every job that pulls external LFS corpora.

Adds a composite action fetch-corpus that resolves the upstream repo’s HEAD via git ls-remote, restores the checkout path from Actions cache keyed on corpus-<repo>-<sha>, and only runs actions/checkout with LFS on a cache miss. ci.yml switches all phi-ag/rvt and magnetar corpus fetches (test matrix, tier-2, writer-patch, ifcopenshell, python-wheel on Linux) from raw checkout to this action.

On the cargo test job only: Windows gets a ReFS dev drive mapping CARGO_HOME and CARGO_TARGET_DIR off slow C: I/O, and the whole matrix enables sccache (RUSTC_WRAPPER, mozilla-actions/sccache-action) alongside existing rust-cache so unchanged crates skip recompilation across runs.

Reviewed by Cursor Bugbot for commit c6f2828. Configure here.

The Windows cargo-test job took ~12 min against ~7 on Ubuntu; the gap is
disk I/O on the runner's C: drive. This puts CARGO_HOME and CARGO_TARGET_DIR
on a 12 GB ReFS dev drive (samypr100/setup-dev-drive) on Windows, adds
sccache with the GitHub Actions cache backend to every matrix entry so
compilation units are reused across runs (rust-cache only caches the
dependency tree), and wraps the phi-ag / magnetar LFS checkouts in a
composite action that restores from the Actions cache keyed on the corpus
repository's HEAD instead of re-downloading the LFS payload every run.

All new actions are SHA-pinned per docs/supply-chain-policy.md.
@cursor

cursor Bot commented Aug 30, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_32e5dc37-cb37-4a2c-8179-1d3e2ecbffdc)

DrunkOnJava added a commit that referenced this pull request Aug 30, 2026
…#199)

## Summary
#197 committed `target-msrv/` (a local `CARGO_TARGET_DIR` used for the
MSRV check) along with the fix. Removes it and gitignores `/target*/`.

## Motivation
The build output carries absolute home paths in its `.d` files, which
the PII guard correctly flags; main's CI and #194's run have been
failing on that job since #197 merged.

## Testing
- [x] `git grep -P '/Users/[a-z][a-z0-9._-]+/'` over the tree after
removal: no matches outside the excluded paths
- N/A: no source changes
@DrunkOnJava
DrunkOnJava merged commit d5ab95f into main Aug 30, 2026
22 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/windows-dev-drive-sccache branch August 30, 2026 09:57
DrunkOnJava added a commit that referenced this pull request Aug 31, 2026
…#199)

## Summary
#197 committed `target-msrv/` (a local `CARGO_TARGET_DIR` used for the
MSRV check) along with the fix. Removes it and gitignores `/target*/`.

## Motivation
The build output carries absolute home paths in its `.d` files, which
the PII guard correctly flags; main's CI and #194's run have been
failing on that job since #197 merged.

## Testing
- [x] `git grep -P '/Users/[a-z][a-z0-9._-]+/'` over the tree after
removal: no matches outside the excluded paths
- N/A: no source changes
DrunkOnJava added a commit that referenced this pull request Aug 31, 2026
…ra (#194)

## Summary
Three CI-speed changes, SHA-pinned: a ReFS dev drive for
`CARGO_HOME`/`CARGO_TARGET_DIR` on Windows, sccache (GHA cache backend)
on the whole cargo-test matrix, and a `fetch-corpus` composite action
that caches the phi-ag / magnetar LFS checkouts keyed on upstream HEAD.

## Motivation
Baseline on main: cargo test / windows-latest 12 min, macos 9, ubuntu 7.
The Windows gap is C: disk I/O, and every corpus-using job re-downloads
hundreds of MB of LFS objects per run.

## Changes
- .github/actions/fetch-corpus/action.yml — `git ls-remote` HEAD →
`actions/cache` → checkout with LFS on miss
- .github/workflows/ci.yml — dev drive step (Windows only), sccache step
+ `SCCACHE_GHA_ENABLED`/`RUSTC_WRAPPER` on the cargo-test job, all LFS
corpus checkouts routed through the composite

## Testing
- [x] YAML + actionlint clean
- [ ] This PR's own CI run is the measurement: compare the Windows job's
duration against the 12-minute baseline. sccache is cold on the first
run; the second run shows its effect.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Workflow and caching-only changes with no product code paths; corpus
cache invalidates when upstream HEAD moves.
> 
> **Overview**
> **CI speedups** for the cargo-test matrix and every job that pulls
external LFS corpora.
> 
> Adds a composite action **`fetch-corpus`** that resolves the upstream
repo’s `HEAD` via `git ls-remote`, restores the checkout path from
**Actions cache** keyed on `corpus-<repo>-<sha>`, and only runs
**`actions/checkout` with LFS** on a cache miss. **`ci.yml`** switches
all phi-ag/rvt and magnetar corpus fetches (test matrix, tier-2,
writer-patch, ifcopenshell, python-wheel on Linux) from raw checkout to
this action.
> 
> On the **cargo test** job only: **Windows** gets a ReFS **dev drive**
mapping `CARGO_HOME` and `CARGO_TARGET_DIR` off slow `C:` I/O, and the
whole matrix enables **sccache** (`RUSTC_WRAPPER`,
`mozilla-actions/sccache-action`) alongside existing `rust-cache` so
unchanged crates skip recompilation across runs.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
4060f9ad7715f5d6e40f485e5cf70195361117a4. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant