the runtime your coding agents live on
Rust agentagent-orchestrationaiai-agentsclaude-codeclicodexcoding-agentsdeveloper-toolsdevtoolsmultiplexerrustterminalterminal-multiplexerterminal-uitmuxtuiworkspace-manager
ci: reuse compiler state across validation runs (#3956)
Can Celikb11ac859c738
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 535cd8718..a481594e9 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -11,6 +11,9 @@ permissions:env:RUST_TOOLCHAIN_VERSION: 1.96.1+ # Keep file/line backtraces without generating type and variable debug information.+ CARGO_PROFILE_DEV_DEBUG: "1"+ CARGO_PROFILE_TEST_DEBUG: "1"concurrency:group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}@@ -89,13 +92,28 @@ jobs:uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1with:version: 0.16.0- use-cache: ${{ matrix.kind != 'windows' }}+ use-cache: ${{ runner.os == 'Linux' }}+ # Linux builds both SIMD/ReleaseFast and scalar/ReleaseSafe variants.+ cache-size-limit: 4096- - name: Configure Zig cache on macOS- if: runner.os == 'macOS'+ # Zig's C-header cache keys include the compiler installation path.+ - name: Stabilize Zig installation path on Unix+ if: matrix.kind == 'unix'+ run: |+ stable_zig="$RUNNER_TEMP/herdr-zig-0.16.0"+ mv "$(dirname "$(command -v zig)")" "$stable_zig"+ echo "$stable_zig" >> "$GITHUB_PATH"+ echo "ZIG=$stable_zig/zig" >> "$GITHUB_ENV"++ - name: Stabilize Zig installation path on Windows+ if: matrix.kind == 'windows'+ shell: pwshrun: |- echo "ZIG_GLOBAL_CACHE_DIR=$GITHUB_WORKSPACE/.zig-cache" >> "$GITHUB_ENV"- echo "ZIG_LOCAL_CACHE_DIR=$GITHUB_WORKSPACE/.zig-cache" >> "$GITHUB_ENV"+ $source = Split-Path (Get-Command zig).Source+ $stable = Join-Path $env:RUNNER_TEMP "herdr-zig-0.16.0"+ Move-Item -LiteralPath $source -Destination $stable+ $stable | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append+ "ZIG=$(Join-Path $stable 'zig.exe')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append- name: Restore Zig build cacheif: runner.os == 'macOS' || matrix.kind == 'windows'@@ -106,18 +124,33 @@ jobs:restore-keys: |zig-build-v1-${{ runner.os }}-${{ runner.arch }}-0.16.0-- - name: Install macOS build tools- if: runner.os == 'macOS'- run: HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake ninja-- name: Restore cargo cacheuses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2with:cache-bin: falsekey: ${{ matrix.os }}- - name: Run checks- if: matrix.kind == 'unix'+ # Save before rust-cache's post-step removes incremental state. Cargo still+ # rebuilds workspace targets; only rustc's validated query state is retained.+ - name: Restore Windows incremental compiler state+ if: matrix.kind == 'windows'+ uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4+ with:+ path: target/debug/incremental+ key: ci-incremental-v1-${{ runner.os }}-${{ runner.arch }}-${{ env.RUST_TOOLCHAIN_VERSION }}-${{ env.CARGO_PROFILE_DEV_DEBUG }}-${{ env.CARGO_PROFILE_TEST_DEBUG }}-${{ hashFiles('Cargo.lock', 'Cargo.toml', '.cargo/config.toml', 'build.rs') }}-${{ github.sha }}+ restore-keys: |+ ci-incremental-v1-${{ runner.os }}-${{ runner.arch }}-${{ env.RUST_TOOLCHAIN_VERSION }}-${{ env.CARGO_PROFILE_DEV_DEBUG }}-${{ env.CARGO_PROFILE_TEST_DEBUG }}-${{ hashFiles('Cargo.lock', 'Cargo.toml', '.cargo/config.toml', 'build.rs') }}-++ - name: Run Linux lint+ if: runner.os == 'Linux'+ run: just lint++ - name: Run Linux tests+ if: runner.os == 'Linux'+ run: CARGO_INCREMENTAL=1 just ci-tests '${{ matrix.nextest_filter }}'++ - name: Run macOS checks+ if: runner.os == 'macOS'run: just ci '${{ matrix.nextest_filter }}'- name: Check scalar libghostty with runtime safety@@ -125,12 +158,14 @@ jobs:env:LIBGHOSTTY_VT_SIMD: "false"LIBGHOSTTY_VT_OPTIMIZE: ReleaseSafe- run: just test-one ghostty+ run: CARGO_INCREMENTAL=1 just test-one ghostty- name: Run Windows checksif: matrix.kind == 'windows'shell: pwsh- run: just check+ run: |+ $env:CARGO_INCREMENTAL = "1"+ just check- name: Smoke ConPTY paneif: matrix.kind == 'windows'@@ -162,6 +197,23 @@ jobs:version: 0.16.0use-cache: false+ - name: Stabilize Zig installation path+ shell: pwsh+ run: |+ $source = Split-Path (Get-Command zig).Source+ $stable = Join-Path $env:RUNNER_TEMP "herdr-zig-0.16.0"+ Move-Item -LiteralPath $source -Destination $stable+ $stable | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append+ "ZIG=$(Join-Path $stable 'zig.exe')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append++ - name: Restore Zig build cache+ uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4+ with:+ path: .zig-cache+ key: zig-build-v1-conpty-package-windows-2022-${{ runner.arch }}-0.16.0-${{ github.run_id }}-${{ github.run_attempt }}+ restore-keys: |+ zig-build-v1-conpty-package-windows-2022-${{ runner.arch }}-0.16.0-+- name: Restore Cargo cacheuses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2with:diff --git a/justfile b/justfileindex 74e17848a..77bf48d51 100644--- a/justfile+++ b/justfile@@ -36,6 +36,10 @@ lint:# Run PR CI checksci filter='all()': lint+ just ci-tests "{{filter}}"++# Keep the test build independently configurable from clippy in CI.+ci-tests filter='all()':cargo nextest run --locked -E "{{filter}}" --status-level fail --final-status-level slow --failure-output final --success-output neverjust maintenance-testjust ui-hot-path-architecture-test