Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
perf(ci): speed up CI with D: drive, skip redundant pre-commit, CARGO_INCREMENTAL=0 (#2010)
Maximilian Roos474083a11d7c
diff --git a/.github/CLAUDE.md b/.github/CLAUDE.mdindex 8f6a5b8df..e8416d11b 100644--- a/.github/CLAUDE.md+++ b/.github/CLAUDE.md@@ -28,3 +28,9 @@ Only the repo owner (`@max-sixty`, admin) can merge to `main`.`CARGO_REGISTRY_TOKEN` and `AUR_SSH_PRIVATE_KEY` are in a protected GitHubEnvironment (`release`) requiring deployment approval from `@max-sixty`,restricted to `v*` tags.++## Build environment++`Swatinem/rust-cache` hashes `CARGO*` and `RUST*` env vars into the cache key.+All workflows sharing a cache must set the same env vars, or they'll get+different keys and miss each other's caches.diff --git a/.github/actions/claude-setup/action.yaml b/.github/actions/claude-setup/action.yamlindex 957e0192d..65e2e0796 100644--- a/.github/actions/claude-setup/action.yaml+++ b/.github/actions/claude-setup/action.yaml@@ -52,5 +52,6 @@ runs:shell: bashrun: |echo "CARGO_TERM_COLOR=always" >> "$GITHUB_ENV"+ echo "CARGO_INCREMENTAL=0" >> "$GITHUB_ENV"echo "RUSTFLAGS=-C debuginfo=0" >> "$GITHUB_ENV"echo "RUSTDOCFLAGS=-Dwarnings" >> "$GITHUB_ENV"diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yamlindex ec3973409..ca0176a2d 100644--- a/.github/workflows/ci.yaml+++ b/.github/workflows/ci.yaml@@ -18,6 +18,10 @@ concurrency:env:CARGO_TERM_COLOR: always+ # CI does clean builds, so incremental compilation tracking adds I/O overhead+ # with no benefit. Especially impactful on Windows where I/O is the bottleneck.+ CARGO_INCREMENTAL: 0+ RUSTFLAGS: -C debuginfo=0# Authenticate lychee requests to GitHub to avoid rate limitingGITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}@@ -101,31 +105,22 @@ jobs:echo "Using Git Bash for Windows tests"shell: pwsh- - name: Install uv- uses: astral-sh/[email protected]- with:- # Silence "no file matched" warning; uv is only used to install pre-commit- cache-dependency-glob: ".pre-commit-config.yaml"-- - name: Install pre-commit- run: uv tool install pre-commit-- # lychee-system hook requires lychee binary; skip on Windows via SKIP env var in wt.toml- - name: Install lychee- if: runner.os != 'Windows'- uses: baptiste0928/cargo-install@v3- with:- crate: lychee- version: "=0.23.0"-- name: Install wtuses: baptiste0928/cargo-install@v3with:crate: worktrunk- version: "=0.32.0"+ version: "=0.35.2"++ - name: "Use fast D: drive for temp files (Windows)"+ if: runner.os == 'Windows'+ shell: pwsh+ run: |+ New-Item -ItemType Directory -Force -Path "D:\tmp" | Out-Null+ echo "TEMP=D:\tmp" >> $env:GITHUB_ENV+ echo "TMP=D:\tmp" >> $env:GITHUB_ENV- name: 🧪 Pre-merge hooks- run: wt hook pre-merge --yes+ run: wt hook pre-merge --yes insta doctest doc- name: 📊 Upload test timingif: always()diff --git a/.github/workflows/nightly-benchmark.yaml b/.github/workflows/nightly-benchmark.yamlindex f85595e2a..05e5370e4 100644--- a/.github/workflows/nightly-benchmark.yaml+++ b/.github/workflows/nightly-benchmark.yaml@@ -9,6 +9,8 @@ on:env:CARGO_TERM_COLOR: always+ CARGO_INCREMENTAL: 0+ RUSTFLAGS: -C debuginfo=0jobs:benchmark:diff --git a/tests/common/mod.rs b/tests/common/mod.rsindex ff5185aa6..7e0325d2b 100644--- a/tests/common/mod.rs+++ b/tests/common/mod.rs@@ -754,6 +754,41 @@ fn add_temp_home_filters(settings: &mut insta::Settings, temp_home: &Path) {);}+/// Catch tempfile::tempdir() paths under non-standard OS temp directories.+///+/// `add_project_id_filters` has hardcoded patterns for standard temp locations+/// (/tmp, /var/folders, C:/Users/.../AppData/Local/Temp). CI may use a different+/// TEMP (e.g., D:\tmp for faster I/O on Windows). This filter uses the runtime+/// temp directory to catch those paths.+fn add_os_temp_dir_filter(settings: &mut insta::Settings) {+ let temp_dir = std::env::temp_dir();+ let temp_dir_str = temp_dir.to_string_lossy().replace('\\', "/");+ let temp_dir_str = temp_dir_str.trim_end_matches('/');++ let canonical = canonicalize(&temp_dir).unwrap_or_else(|_| temp_dir.clone());+ let canonical_str = canonical.to_string_lossy().replace('\\', "/");+ let canonical_str = canonical_str.trim_end_matches('/');++ // Canonical (longer) path first so it matches before the shorter one+ // (e.g., /private/var/folders/... before /var/folders/... on macOS).+ settings.add_filter(+ &format!(+ r"'?{}/\.tmp[^/']+/[^)'\s\x1b]+'?",+ regex::escape(canonical_str)+ ),+ "[PROJECT_ID]",+ );+ if canonical_str != temp_dir_str {+ settings.add_filter(+ &format!(+ r"'?{}/\.tmp[^/']+/[^)'\s\x1b]+'?",+ regex::escape(temp_dir_str)+ ),+ "[PROJECT_ID]",+ );+ }+}+fn add_project_id_filters(settings: &mut insta::Settings) {settings.add_filter(r"/private/var/folders/[^/]+/[^/]+/T/\.[^/]+/[^)'\s\x1b]+",@@ -831,6 +866,7 @@ fn setup_snapshot_settings_for_paths_with_home(if let Some(temp_home) = temp_home {add_temp_home_filters(&mut settings, temp_home);}+ add_os_temp_dir_filter(&mut settings);add_project_id_filters(&mut settings);add_standard_env_redactions(&mut settings);