2 Commits

Author SHA1 Message Date
Arpad Borsos
9d47c6ad4b 2.7.8 2025-03-19 08:16:06 +01:00
Linda_pp
27b8ea9368 Include CPU arch in the cache key (#228) 2025-02-08 15:36:01 +01:00
6 changed files with 31 additions and 9 deletions

View File

@@ -1,5 +1,24 @@
# Changelog
## 2.7.8
- Include CPU arch in the cache key
## 2.7.7
- Also cache `cargo install` metadata
## 2.7.6
- Allow opting out of caching $CARGO_HOME/bin
- Add runner OS in cache key
- Adds an option to do lookup-only of the cache
## 2.7.5
- Support Cargo.lock format cargo-lock v4
- Only run macOsWorkaround() on macOS
## 2.7.3
- Work around upstream problem that causes cache saving to hang for minutes.

View File

@@ -86755,9 +86755,10 @@ class CacheConfig {
key += `-${job}`;
}
}
// Add runner OS to the key to avoid cross-contamination of cache
// Add runner OS and CPU architecture to the key to avoid cross-contamination of cache
const runnerOS = external_os_default().type();
key += `-${runnerOS}`;
const runnerArch = external_os_default().arch();
key += `-${runnerOS}-${runnerArch}`;
self.keyPrefix = key;
// Construct environment portion of the key:
// This consists of a hash that considers the rust version

5
dist/save/index.js vendored
View File

@@ -86755,9 +86755,10 @@ class CacheConfig {
key += `-${job}`;
}
}
// Add runner OS to the key to avoid cross-contamination of cache
// Add runner OS and CPU architecture to the key to avoid cross-contamination of cache
const runnerOS = external_os_default().type();
key += `-${runnerOS}`;
const runnerArch = external_os_default().arch();
key += `-${runnerOS}-${runnerArch}`;
self.keyPrefix = key;
// Construct environment portion of the key:
// This consists of a hash that considers the rust version

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "rust-cache",
"version": "2.7.7",
"version": "2.7.8",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "rust-cache",
"version": "2.7.7",
"version": "2.7.8",
"license": "LGPL-3.0",
"dependencies": {
"@actions/buildjet-cache": "npm:github-actions.cache-buildjet@0.2.0",

View File

@@ -1,7 +1,7 @@
{
"private": true,
"name": "rust-cache",
"version": "2.7.7",
"version": "2.7.8",
"description": "A GitHub Action that implements smart caching for rust/cargo projects with sensible defaults.",
"keywords": [
"actions",

View File

@@ -74,9 +74,10 @@ export class CacheConfig {
}
}
// Add runner OS to the key to avoid cross-contamination of cache
// Add runner OS and CPU architecture to the key to avoid cross-contamination of cache
const runnerOS = os.type();
key += `-${runnerOS}`;
const runnerArch = os.arch();
key += `-${runnerOS}-${runnerArch}`;
self.keyPrefix = key;