Skip to content

Conversation

@jamadeo
Copy link
Collaborator

@jamadeo jamadeo commented Nov 12, 2025

This action does all sorts of optimizations that are useful to us. Our cache is way too big and most of it isn't useful (it caches a bunch of incremental build artifacts from our own code, when we really just want to cache compiled dependencies)

Copilot AI review requested due to automatic review settings November 12, 2025 17:33
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 modernizes Rust dependency caching across all GitHub workflows by replacing manual actions/cache configurations with Swatinem/rust-cache@v2, which provides specialized optimizations for Rust builds—specifically avoiding caching of incremental build artifacts while focusing on compiled dependencies.

Key changes:

  • Replaces verbose manual cache configurations with concise Swatinem/rust-cache@v2 usage
  • Adds custom cache keys for cross-compilation targets (linux, intel, windows)
  • Updates action version pins in bundle-desktop-linux.yml for consistency

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
.github/workflows/pr-smoke-test.yml Switches from manual cache setup to rust-cache action
.github/workflows/ci.yml Switches from manual cache setup to rust-cache action
.github/workflows/bundle-desktop.yml Switches from three separate cache steps to single rust-cache action
.github/workflows/bundle-desktop-windows.yml Switches from two manual cache steps to rust-cache with custom key
.github/workflows/bundle-desktop-linux.yml Switches to rust-cache with SHA pin and updates artifact upload action pins
.github/workflows/bundle-desktop-intel.yml Switches from three separate cache steps to rust-cache with SHA pin
.github/workflows/build-cli.yml Consolidates separate Windows and Linux/macOS cache steps into unified rust-cache usage

restore-keys: |
${{ runner.os }}-cargo-release-
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

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

Inconsistent version pinning: some workflows pin to SHA 98c8021b550208e191a6a3145459bfc9fb29c4c0 while this uses @v2. Use the same pinned SHA across all workflows for consistency and security.

Suggested change
uses: Swatinem/rust-cache@v2
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # pin@v2

Copilot uses AI. Check for mistakes.
key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-debug-
uses: Swatinem/rust-cache@v2
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

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

Inconsistent version pinning: some workflows pin to SHA 98c8021b550208e191a6a3145459bfc9fb29c4c0 while this uses @v2. Use the same pinned SHA across all workflows for consistency and security.

Suggested change
uses: Swatinem/rust-cache@v2
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # pin@v2

Copilot uses AI. Check for mistakes.
restore-keys: |
${{ runner.os }}-cargo-build-release-
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

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

Inconsistent version pinning: some workflows pin to SHA 98c8021b550208e191a6a3145459bfc9fb29c4c0 while this uses @v2. Use the same pinned SHA across all workflows for consistency and security.

Suggested change
uses: Swatinem/rust-cache@v2
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0

Copilot uses AI. Check for mistakes.
uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f
# Cache Rust dependencies for Windows cross-compilation
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

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

Inconsistent version pinning: some workflows pin to SHA 98c8021b550208e191a6a3145459bfc9fb29c4c0 while this uses @v2. Use the same pinned SHA across all workflows for consistency and security.

Suggested change
uses: Swatinem/rust-cache@v2
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # pin@v2

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

@alexhancock alexhancock left a comment

Choose a reason for hiding this comment

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

nice

@jamadeo
Copy link
Collaborator Author

jamadeo commented Nov 14, 2025

merged as part of #5702

@jamadeo jamadeo closed this Nov 14, 2025
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.

3 participants