Skip to content

Conversation

devin-ai-integration[bot]
Copy link
Contributor

feat: add Rust build caching to ci-lazer-solana workflow

Summary

Adds Rust build caching to the ci-lazer-solana.yml GitHub Actions workflow by including the cache-workspaces parameter in the existing actions-rust-lang/setup-rust-toolchain@v1 step. This will cache the target/ directory using the Cargo.lock file hash as the cache key, improving build performance by avoiding recompilation of unchanged dependencies.

The implementation follows the same pattern used in other Rust workflows in this repository (ci-lazer-anchor.yml) and the broader pyth-network organization.

Review & Testing Checklist for Human

  • Verify cache path correctness: Confirm that "lazer/solana -> target" correctly maps to the working directory lazer/solana and that Rust builds output to target/ in that directory
  • Test CI pipeline: Run the workflow on this PR and verify all steps complete successfully with caching enabled
  • Monitor performance improvement: On subsequent runs (after cache is populated), check that build times are reduced compared to cold builds

Notes

  • This change uses the built-in caching mechanism of actions-rust-lang/setup-rust-toolchain@v1 rather than manual cache actions
  • Cache misses or failures will not break the build - they'll just result in slower builds like before
  • The cache key is automatically generated based on Cargo.lock content, ensuring cache invalidation when dependencies change

Link to Devin run: https://app.devin.ai/sessions/9d14059dbcb54ba1b93b7f9481e3e878
Requested by: Jayant (jayant@dourolabs.xyz)

- Add cache-workspaces parameter to actions-rust-lang/setup-rust-toolchain@v1
- Cache target/ directory using Cargo.lock hash as cache key
- Follows same pattern as other lazer workflows in pyth-examples
- Improves build performance by caching compiled dependencies

Co-Authored-By: Jayant <jayant@dourolabs.xyz>
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@jayantk jayantk merged commit bba5135 into main Sep 12, 2025
5 checks passed
@jayantk jayantk deleted the devin/1757697912-add-rust-build-caching branch September 12, 2025 17:39
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.

1 participant