mirror of
https://github.com/Swatinem/rust-cache.git
synced 2026-04-21 07:00:26 +00:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
469cb0e247 | ||
|
|
3a556350bd | ||
|
|
22de9d98ab | ||
|
|
ed5e89b8ff | ||
|
|
f51f967e15 | ||
|
|
85fb4247b7 | ||
|
|
5084d130b2 | ||
|
|
bc1860267c | ||
|
|
d7ac6f694d | ||
|
|
e18b497796 | ||
|
|
c19371144d | ||
|
|
781e8d91ab | ||
|
|
3d1fa4654a |
34
.github/workflows/binstall.yml
vendored
Normal file
34
.github/workflows/binstall.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
name: binstall
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
binstall:
|
||||
if: github.repository == 'Swatinem/rust-cache'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
|
||||
name: Test `cargo binstall` on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- run: rustup toolchain install stable --profile minimal --no-self-update
|
||||
|
||||
- uses: cargo-bins/cargo-binstall@v1.18.1
|
||||
|
||||
- uses: ./
|
||||
|
||||
- run: cargo binstall -y cargo-deny
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
2
.github/workflows/check-dist.yml
vendored
2
.github/workflows/check-dist.yml
vendored
@@ -43,7 +43,7 @@ jobs:
|
||||
fi
|
||||
id: diff
|
||||
|
||||
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
||||
with:
|
||||
name: dist
|
||||
|
||||
2
.github/workflows/coverage.yml
vendored
2
.github/workflows/coverage.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
||||
|
||||
- run: rustup toolchain install stable --profile minimal --component llvm-tools-preview --no-self-update
|
||||
|
||||
- uses: taiki-e/install-action@64c5c20c872907b6f7cd50994ac189e7274160f2 # v2.68.26
|
||||
- uses: taiki-e/install-action@85b24a67ef0c632dfefad70b9d5ce8fddb040754 # v2.75.10
|
||||
with:
|
||||
tool: cargo-llvm-cov
|
||||
|
||||
|
||||
2
.github/workflows/dependabot.yml
vendored
2
.github/workflows/dependabot.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
||||
steps:
|
||||
- name: Fetch metadata
|
||||
id: metadata
|
||||
uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a # v2.5.0
|
||||
uses: dependabot/fetch-metadata@ffa630c65fa7e0ecfa0625b5ceda64399aea1b36 # v3.0.0
|
||||
with:
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
2
.github/workflows/nix.yml
vendored
2
.github/workflows/nix.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: cachix/install-nix-action@1ca7d21a94afc7c957383a2d217460d980de4934 # v31.10.1
|
||||
- uses: cachix/install-nix-action@616559265b40713947b9c190a8ff4b507b5df49b # v31.10.4
|
||||
|
||||
- uses: ./
|
||||
with:
|
||||
|
||||
11
CHANGELOG.md
11
CHANGELOG.md
@@ -1,5 +1,16 @@
|
||||
# Changelog
|
||||
|
||||
## 2.9.1
|
||||
|
||||
- Fix regression in hash calculation
|
||||
|
||||
## 2.9.0
|
||||
|
||||
- Update to `node24`
|
||||
- Support running from within a `nix` shell
|
||||
- Consider all installed toolchains for cache key
|
||||
- Use case-insensitive comparison to determine exact cache hit
|
||||
|
||||
## 2.8.2
|
||||
|
||||
- Don't overwrite env for cargo-metadata call
|
||||
|
||||
@@ -32,7 +32,7 @@ sensible defaults.
|
||||
# default: "true"
|
||||
add-job-id-key: ""
|
||||
|
||||
# Weather the a hash of the rust environment should be included in the cache key.
|
||||
# Whether the a hash of the rust environment should be included in the cache key.
|
||||
# This includes a hash of all Cargo.toml/Cargo.lock files, rust-toolchain files,
|
||||
# and .cargo/config.toml files (if present), as well as the specified 'env-vars'.
|
||||
# default: "true"
|
||||
|
||||
301
dist/restore/index.js
vendored
301
dist/restore/index.js
vendored
@@ -152103,24 +152103,6 @@ exports.StorageContextClient = StorageContextClient;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 83627:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.KnownEncryptionAlgorithmType = void 0;
|
||||
/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */
|
||||
var KnownEncryptionAlgorithmType;
|
||||
(function (KnownEncryptionAlgorithmType) {
|
||||
KnownEncryptionAlgorithmType["AES256"] = "AES256";
|
||||
})(KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {}));
|
||||
//# sourceMappingURL=generatedModels.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 30247:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
@@ -162447,132 +162429,6 @@ exports.listType = {
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 56635:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=appendBlob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 68355:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=blob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 17188:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=blockBlob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 15337:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=container.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 82354:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
const tslib_1 = __nccwpck_require__(61860);
|
||||
tslib_1.__exportStar(__nccwpck_require__(26865), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(15337), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(68355), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(14400), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(56635), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(17188), exports);
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 14400:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=pageBlob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 26865:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=service.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 40535:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
@@ -165788,6 +165644,132 @@ const filterBlobsOperationSpec = {
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 56635:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=appendBlob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 68355:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=blob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 17188:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=blockBlob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 15337:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=container.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 82354:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
const tslib_1 = __nccwpck_require__(61860);
|
||||
tslib_1.__exportStar(__nccwpck_require__(26865), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(15337), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(68355), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(14400), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(56635), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(17188), exports);
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 14400:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=pageBlob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 26865:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=service.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 5313:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
@@ -165861,6 +165843,24 @@ exports.StorageClient = StorageClient;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 83627:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.KnownEncryptionAlgorithmType = void 0;
|
||||
/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */
|
||||
var KnownEncryptionAlgorithmType;
|
||||
(function (KnownEncryptionAlgorithmType) {
|
||||
KnownEncryptionAlgorithmType["AES256"] = "AES256";
|
||||
})(KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {}));
|
||||
//# sourceMappingURL=generatedModels.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 49019:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
@@ -204269,8 +204269,6 @@ function glob_hashFiles(patterns_1) {
|
||||
// EXTERNAL MODULE: external "fs/promises"
|
||||
var promises_ = __nccwpck_require__(91943);
|
||||
var promises_default = /*#__PURE__*/__nccwpck_require__.n(promises_);
|
||||
;// CONCATENATED MODULE: external "stream/promises"
|
||||
const external_stream_promises_namespaceObject = require("stream/promises");
|
||||
;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/error.js
|
||||
/*!
|
||||
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
||||
@@ -249704,7 +249702,7 @@ async function utils_exists(path) {
|
||||
|
||||
|
||||
|
||||
const SAVE_TARGETS = new Set(["lib", "proc-macro"]);
|
||||
const SAVE_TARGETS = new Set(["lib", "cdylib", "dylib", "rlib", "staticlib", "proc-macro"]);
|
||||
class Workspace {
|
||||
constructor(root, target) {
|
||||
this.root = root;
|
||||
@@ -249750,7 +249748,6 @@ class Workspace {
|
||||
|
||||
|
||||
|
||||
|
||||
const HOME = external_os_default().homedir();
|
||||
const config_CARGO_HOME = process.env.CARGO_HOME || external_path_default().join(HOME, ".cargo");
|
||||
const STATE_CONFIG = "RUST_CACHE_CONFIG";
|
||||
@@ -249812,7 +249809,7 @@ class CacheConfig {
|
||||
key += `-${inputKey}`;
|
||||
}
|
||||
const job = process.env.GITHUB_JOB;
|
||||
if ((job) && getInput("add-job-id-key").toLowerCase() == "true") {
|
||||
if (job && getInput("add-job-id-key").toLowerCase() == "true") {
|
||||
key += `-${job}`;
|
||||
}
|
||||
}
|
||||
@@ -249951,7 +249948,9 @@ class CacheConfig {
|
||||
}
|
||||
keyFiles = sort_and_uniq(keyFiles);
|
||||
for (const file of keyFiles) {
|
||||
await (0,external_stream_promises_namespaceObject.pipeline)((0,external_fs_.createReadStream)(file), hasher);
|
||||
for await (const chunk of (0,external_fs_.createReadStream)(file)) {
|
||||
hasher.update(chunk);
|
||||
}
|
||||
}
|
||||
keyFiles.push(...parsedKeyFiles);
|
||||
self.keyFiles = sort_and_uniq(keyFiles);
|
||||
@@ -250176,7 +250175,7 @@ async function cleanProfileTarget(profileDir, packages, checkTimestamp = false)
|
||||
}
|
||||
let keepProfile = new Set(["build", ".fingerprint", "deps"]);
|
||||
await rmExcept(profileDir, keepProfile);
|
||||
const keepPkg = new Set(packages.map((p) => p.name));
|
||||
const keepPkg = new Set(packages.flatMap((p) => [p.name, ...p.targets.map((t) => t.replace(/-/g, "_"))]));
|
||||
await rmExcept(external_path_default().join(profileDir, "build"), keepPkg, checkTimestamp);
|
||||
await rmExcept(external_path_default().join(profileDir, ".fingerprint"), keepPkg, checkTimestamp);
|
||||
const keepDeps = new Set(packages.flatMap((p) => {
|
||||
|
||||
301
dist/save/index.js
vendored
301
dist/save/index.js
vendored
@@ -152103,24 +152103,6 @@ exports.StorageContextClient = StorageContextClient;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 83627:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.KnownEncryptionAlgorithmType = void 0;
|
||||
/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */
|
||||
var KnownEncryptionAlgorithmType;
|
||||
(function (KnownEncryptionAlgorithmType) {
|
||||
KnownEncryptionAlgorithmType["AES256"] = "AES256";
|
||||
})(KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {}));
|
||||
//# sourceMappingURL=generatedModels.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 30247:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
@@ -162447,132 +162429,6 @@ exports.listType = {
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 56635:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=appendBlob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 68355:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=blob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 17188:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=blockBlob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 15337:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=container.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 82354:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
const tslib_1 = __nccwpck_require__(61860);
|
||||
tslib_1.__exportStar(__nccwpck_require__(26865), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(15337), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(68355), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(14400), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(56635), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(17188), exports);
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 14400:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=pageBlob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 26865:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=service.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 40535:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
@@ -165788,6 +165644,132 @@ const filterBlobsOperationSpec = {
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 56635:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=appendBlob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 68355:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=blob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 17188:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=blockBlob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 15337:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=container.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 82354:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
const tslib_1 = __nccwpck_require__(61860);
|
||||
tslib_1.__exportStar(__nccwpck_require__(26865), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(15337), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(68355), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(14400), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(56635), exports);
|
||||
tslib_1.__exportStar(__nccwpck_require__(17188), exports);
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 14400:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=pageBlob.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 26865:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
//# sourceMappingURL=service.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 5313:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
@@ -165861,6 +165843,24 @@ exports.StorageClient = StorageClient;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 83627:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.KnownEncryptionAlgorithmType = void 0;
|
||||
/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */
|
||||
var KnownEncryptionAlgorithmType;
|
||||
(function (KnownEncryptionAlgorithmType) {
|
||||
KnownEncryptionAlgorithmType["AES256"] = "AES256";
|
||||
})(KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {}));
|
||||
//# sourceMappingURL=generatedModels.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 49019:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
@@ -204269,8 +204269,6 @@ function glob_hashFiles(patterns_1) {
|
||||
// EXTERNAL MODULE: external "fs/promises"
|
||||
var promises_ = __nccwpck_require__(91943);
|
||||
var promises_default = /*#__PURE__*/__nccwpck_require__.n(promises_);
|
||||
;// CONCATENATED MODULE: external "stream/promises"
|
||||
const external_stream_promises_namespaceObject = require("stream/promises");
|
||||
;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/error.js
|
||||
/*!
|
||||
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
||||
@@ -249704,7 +249702,7 @@ async function utils_exists(path) {
|
||||
|
||||
|
||||
|
||||
const SAVE_TARGETS = new Set(["lib", "proc-macro"]);
|
||||
const SAVE_TARGETS = new Set(["lib", "cdylib", "dylib", "rlib", "staticlib", "proc-macro"]);
|
||||
class Workspace {
|
||||
constructor(root, target) {
|
||||
this.root = root;
|
||||
@@ -249750,7 +249748,6 @@ class Workspace {
|
||||
|
||||
|
||||
|
||||
|
||||
const HOME = external_os_default().homedir();
|
||||
const CARGO_HOME = process.env.CARGO_HOME || external_path_default().join(HOME, ".cargo");
|
||||
const STATE_CONFIG = "RUST_CACHE_CONFIG";
|
||||
@@ -249812,7 +249809,7 @@ class CacheConfig {
|
||||
key += `-${inputKey}`;
|
||||
}
|
||||
const job = process.env.GITHUB_JOB;
|
||||
if ((job) && getInput("add-job-id-key").toLowerCase() == "true") {
|
||||
if (job && getInput("add-job-id-key").toLowerCase() == "true") {
|
||||
key += `-${job}`;
|
||||
}
|
||||
}
|
||||
@@ -249951,7 +249948,9 @@ class CacheConfig {
|
||||
}
|
||||
keyFiles = sort_and_uniq(keyFiles);
|
||||
for (const file of keyFiles) {
|
||||
await (0,external_stream_promises_namespaceObject.pipeline)((0,external_fs_.createReadStream)(file), hasher);
|
||||
for await (const chunk of (0,external_fs_.createReadStream)(file)) {
|
||||
hasher.update(chunk);
|
||||
}
|
||||
}
|
||||
keyFiles.push(...parsedKeyFiles);
|
||||
self.keyFiles = sort_and_uniq(keyFiles);
|
||||
@@ -250176,7 +250175,7 @@ async function cleanProfileTarget(profileDir, packages, checkTimestamp = false)
|
||||
}
|
||||
let keepProfile = new Set(["build", ".fingerprint", "deps"]);
|
||||
await rmExcept(profileDir, keepProfile);
|
||||
const keepPkg = new Set(packages.map((p) => p.name));
|
||||
const keepPkg = new Set(packages.flatMap((p) => [p.name, ...p.targets.map((t) => t.replace(/-/g, "_"))]));
|
||||
await rmExcept(external_path_default().join(profileDir, "build"), keepPkg, checkTimestamp);
|
||||
await rmExcept(external_path_default().join(profileDir, ".fingerprint"), keepPkg, checkTimestamp);
|
||||
const keepDeps = new Set(packages.flatMap((p) => {
|
||||
|
||||
275
package-lock.json
generated
275
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "rust-cache",
|
||||
"version": "2.9.0",
|
||||
"version": "2.9.1",
|
||||
"description": "A GitHub Action that implements smart caching for rust/cargo projects with sensible defaults.",
|
||||
"keywords": [
|
||||
"actions",
|
||||
@@ -29,13 +29,13 @@
|
||||
"@actions/exec": "^3.0.0",
|
||||
"@actions/glob": "^0.6.1",
|
||||
"@actions/io": "^3.0.2",
|
||||
"smol-toml": "^1.6.0"
|
||||
"smol-toml": "^1.6.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^25.4.0",
|
||||
"@vercel/ncc": "^0.38.4",
|
||||
"linefix": "^0.1.1",
|
||||
"typescript": "5.9.3"
|
||||
"typescript": "6.0.2"
|
||||
},
|
||||
"scripts": {
|
||||
"prepare": "ncc build --target es2020 -o dist/restore src/restore.ts && ncc build --target es2020 -o dist/save src/save.ts && linefix dist"
|
||||
|
||||
@@ -58,7 +58,7 @@ async function cleanProfileTarget(profileDir: string, packages: Packages, checkT
|
||||
let keepProfile = new Set(["build", ".fingerprint", "deps"]);
|
||||
await rmExcept(profileDir, keepProfile);
|
||||
|
||||
const keepPkg = new Set(packages.map((p) => p.name));
|
||||
const keepPkg = new Set(packages.flatMap((p) => [p.name, ...p.targets.map((t) => t.replace(/-/g, "_"))]));
|
||||
await rmExcept(path.join(profileDir, "build"), keepPkg, checkTimestamp);
|
||||
await rmExcept(path.join(profileDir, ".fingerprint"), keepPkg, checkTimestamp);
|
||||
|
||||
@@ -77,16 +77,16 @@ async function cleanProfileTarget(profileDir: string, packages: Packages, checkT
|
||||
|
||||
export async function getCargoBins(): Promise<Set<string>> {
|
||||
const bins = new Set<string>();
|
||||
|
||||
try {
|
||||
const { installs }: { installs: { [key: string]: { bins: Array<string> } } } = JSON.parse(
|
||||
await fs.promises.readFile(path.join(CARGO_HOME, ".crates2.json"), "utf8"),
|
||||
);
|
||||
for (const pkg of Object.values(installs)) {
|
||||
for (const bin of pkg.bins) {
|
||||
bins.add(bin);
|
||||
const dir = await fs.promises.opendir(path.join(CARGO_HOME, "bin"));
|
||||
for await (const dirent of dir) {
|
||||
if (dirent.isFile()) {
|
||||
bins.add(dirent.name);
|
||||
}
|
||||
}
|
||||
} catch {}
|
||||
|
||||
return bins;
|
||||
}
|
||||
|
||||
@@ -97,15 +97,11 @@ export async function getCargoBins(): Promise<Set<string>> {
|
||||
* @param oldBins The binaries that existed when the action started.
|
||||
*/
|
||||
export async function cleanBin(oldBins: Array<string>) {
|
||||
const bins = await getCargoBins();
|
||||
|
||||
for (const bin of oldBins) {
|
||||
bins.delete(bin);
|
||||
}
|
||||
const binsToRemove = new Set<string>(oldBins);
|
||||
|
||||
const dir = await fs.promises.opendir(path.join(CARGO_HOME, "bin"));
|
||||
for await (const dirent of dir) {
|
||||
if (dirent.isFile() && !bins.has(dirent.name)) {
|
||||
if (dirent.isFile() && binsToRemove.has(dirent.name)) {
|
||||
await rm(dir.path, dirent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ import * as glob from "@actions/glob";
|
||||
import crypto from "crypto";
|
||||
import fs from "fs/promises";
|
||||
import { createReadStream } from "fs";
|
||||
import { pipeline } from "stream/promises";
|
||||
import os from "os";
|
||||
import path from "path";
|
||||
import * as toml from "smol-toml";
|
||||
@@ -84,7 +83,7 @@ export class CacheConfig {
|
||||
}
|
||||
|
||||
const job = process.env.GITHUB_JOB;
|
||||
if ((job) && core.getInput("add-job-id-key").toLowerCase() == "true") {
|
||||
if (job && core.getInput("add-job-id-key").toLowerCase() == "true") {
|
||||
key += `-${job}`;
|
||||
}
|
||||
}
|
||||
@@ -256,7 +255,9 @@ export class CacheConfig {
|
||||
keyFiles = sort_and_uniq(keyFiles);
|
||||
|
||||
for (const file of keyFiles) {
|
||||
await pipeline(createReadStream(file), hasher);
|
||||
for await (const chunk of createReadStream(file)) {
|
||||
hasher.update(chunk);
|
||||
}
|
||||
}
|
||||
|
||||
keyFiles.push(...parsedKeyFiles);
|
||||
|
||||
@@ -3,7 +3,7 @@ import path from "path";
|
||||
|
||||
import { getCmdOutput } from "./utils";
|
||||
|
||||
const SAVE_TARGETS = new Set(["lib", "proc-macro"]);
|
||||
const SAVE_TARGETS = new Set(["lib", "cdylib", "dylib", "rlib", "staticlib", "proc-macro"]);
|
||||
|
||||
export class Workspace {
|
||||
constructor(public root: string, public target: string) {}
|
||||
|
||||
Reference in New Issue
Block a user