Skip to content

ci: optimize test workflow to reduce CI runtime#180

Merged
avihut merged 1 commit intomasterfrom
daft-ci/optimize-test-workflow
Feb 6, 2026
Merged

ci: optimize test workflow to reduce CI runtime#180
avihut merged 1 commit intomasterfrom
daft-ci/optimize-test-workflow

Conversation

@avihut
Copy link
Owner

@avihut avihut commented Feb 6, 2026

Summary

  • Remove release build from lint job: The lint job (formerly unit-tests) only runs cargo fmt --check, cargo clippy, and cargo test --lib — none of which need --release. The cargo build --release and single binary architecture verification have been moved to integration-tests, where the release build already happens.
  • Merge homebrew-simulation into integration-tests(macos): Both jobs ran on macos-latest and built the same release binary. The Homebrew simulation steps are now conditional (if: matrix.os == 'macos-latest') within integration-tests, eliminating a redundant macOS release build.
  • Replace actions/cache with Swatinem/rust-cache@v2: Purpose-built for Rust projects — automatically handles cache key derivation, target directory pruning, and per-job cache isolation.

Before: 5 parallel jobs (unit-tests, integration-ubuntu, integration-macos, homebrew-sim, xtask-test)
After: 4 parallel jobs (lint, integration-ubuntu, integration-macos, xtask-test)

Net effect: 2 fewer cargo build --release invocations (lint job drops release build entirely, homebrew-sim merged into integration-macos), and smarter caching across all jobs.

Test plan

  • Verify lint job passes (fmt, clippy, unit tests) without release build
  • Verify integration-tests (ubuntu) passes with binary architecture check
  • Verify integration-tests (macos) passes with Homebrew simulation steps
  • Verify xtask-test passes with new caching
  • Compare total CI wall-clock time with previous runs

🤖 Generated with Claude Code

- Remove `cargo build --release` from lint job (fmt, clippy, and unit
  tests only need debug builds)
- Move single binary architecture verification to integration-tests
  where the release build already happens
- Merge homebrew-simulation job into integration-tests(macos) using
  conditional steps, eliminating a redundant macOS release build
- Replace manual actions/cache with Swatinem/rust-cache@v2 for smarter
  Rust-specific caching with automatic target pruning

Reduces total job count from 5 to 4 and eliminates two redundant
`cargo build --release` invocations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@avihut avihut added the ci CI/CD changes label Feb 6, 2026
@avihut avihut self-assigned this Feb 6, 2026
@avihut avihut added this to the v1.1.0 milestone Feb 6, 2026
@avihut avihut merged commit 77ddf6a into master Feb 6, 2026
4 checks passed
@avihut avihut deleted the daft-ci/optimize-test-workflow branch February 6, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant