-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add cargo example for Rust project #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
||
| ## License | ||
| The scripts and documentation in this project are released under the [MIT License](LICENSE) | ||
| The scripts and documentation in this project are released under the [MIT License](LICENSE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This diff occurred since original file did not have newline at the end of file.
|
I prefer to add the hash of the lock file to the key. What do you think? key: ${{ runner.os }}-cargo-registry-${{ hashFiles(format('{0}{1}', github.workspace, '/Cargo.lock')) }}or key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} |
|
Ah, I misunderstood cache behavior. We need to add hash to key. Thank you for the point. I'll fix it. I think |
|
Oh, I'm glad if my suggestion helped 😁 |
|
The example has been moved to |
|
Thanks. I moved the example to |
|
Looks good to me. |
|
@rhysd can you resolve your merge conflicts and we will get this mrged today. Thanks. |
|
@chrispat I did. |
* Create CODE_OF_CONDUCT.md * Update workflow (#1) * Run workflow on linux, mac, and windows * Add status badge * Use npm install instead * Bump typescript version * Use node 12.x * Add Ruby Gem example (#4) * Add Cocoapods example (#5) * Add Carthage example (#10) * Move examples to their own page (#13) * Minor typo in README (#15) from `steps.[ID].outupts.cache-hit` to `steps.[ID].outputs.cache-hit` * Update README.md * Prevent commands from executing during tests (#21) * Prevent commands from executing during tests * Add newline at end of file * Drop all commands from output * Link to NuGet lock files documentation (#20) * Add trailing dash to Maven fallback key (#19) * Fix README.md (#25) `restore-keys` had incorrect indentation. * Exclude documentation from CI tests (#28) * Ignore all .md files * Add note about time-based eviction to README (#30) * Fix typo in error message (#29) * Time based eviction interval is 1 week (#34) * Remove cache checksum debug - close #24 (#26) * Remove cache checksum debug - close #24 * Remove cache checksum debug on save * Fix formatting * Add Go modules example (#18) * Add Go modules example * Fix TOC * Fix repo name in contact email (#41) * Add Elixir Mix example (#42) * Add Elixir Mix example * Fix typo * Add cargo example for Rust project (#8) * Add cargo example * Add hash of Cargo.lock to keys of caches * Move Rust example to examples.md * Stop warning when cache is not found (#40) The cache not being found is a common situation so very visible warning is a little too much. * Bump package version * Release v0.0.2
This PR adds example for Cargo, which is an official build tool for Rust toolchain. In addtion to local
targetbuild directory,~/.cargo/registry(packages registry) and~/.cargo/git(packages index) were necessary to be cached for reusing cached build directory.I already tried this on my project kiro-editor and
cargo testwas improved as follows.6.6x faster on Linux.