Skip to content

Comments

Rust Dependency Caching#189

Merged
jking-aus merged 2 commits intosigp:unstablefrom
diegomrsantos:cache-deps
Mar 21, 2025
Merged

Rust Dependency Caching#189
jking-aus merged 2 commits intosigp:unstablefrom
diegomrsantos:cache-deps

Conversation

@diegomrsantos
Copy link
Member

Issue Addressed

Speeds up CI builds by caching Rust dependencies.

Proposed Changes

  1. Added cache: true to all moonrepo/setup-rust actions that were previously missing it or had it set to false
  2. Set appropriate cache-target values:
    • release for jobs that perform release builds
    • debug for jobs that work with debug builds
  3. Fixed the check-msrv job structure by combining the action with proper caching configuration

These changes will speed up CI by reusing dependencies between workflow runs, significantly reducing build times after the first run.

@diegomrsantos diegomrsantos force-pushed the cache-deps branch 2 times, most recently from 7897f3b to c5b6646 Compare March 14, 2025 16:36
# Clippy lints are opt-in per-crate for now. By default, everything is allowed except for performance and correctness lints.
lint:
cargo clippy --workspace --tests $(EXTRA_CLIPPY_OPTS) --features "$(TEST_FEATURES)" -- \
cargo clippy --workspace --tests --no-deps $(EXTRA_CLIPPY_OPTS) --features "$(TEST_FEATURES)" -- \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even with this flag, the dependencies are still being checked.

with:
cache: false
channel: stable
cache: true
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was it intentional to set the cache to false?

@diegomrsantos diegomrsantos requested a review from Copilot March 15, 2025 14:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR aims to speed up CI builds by caching Rust dependencies within the GitHub workflows.

  • Added manual trigger capability via workflow_dispatch.
  • Updated caching configuration for various jobs by switching from cache: false to cache: true and setting appropriate cache-target values (release or debug).
  • Corrected caching setup in the check-msrv job structure.

@diegomrsantos diegomrsantos self-assigned this Mar 15, 2025
@dknopik
Copy link
Member

dknopik commented Mar 17, 2025

#123

@jking-aus jking-aus merged commit a9c6b48 into sigp:unstable Mar 21, 2025
10 checks passed
@dknopik
Copy link
Member

dknopik commented Mar 21, 2025

Did anyone have the chance to review the issue I flagged above? @diegomrsantos

@jking-aus
Copy link
Member

Did anyone have the chance to review the issue I flagged above? @diegomrsantos

this only occurs when the code is built multiple times on the same runner? I will try and force this issue to happen -- if it does we'll roll back the cache change.

diegomrsantos added a commit to diegomrsantos/anchor that referenced this pull request Apr 9, 2025
diegomrsantos added a commit to diegomrsantos/anchor that referenced this pull request Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants