16 Commits

Author SHA1 Message Date
dependabot[bot]
3d9a6aef83 Bump typescript from 6.0.2 to 6.0.3 in the dev-patch group (#328)
Bumps the dev-patch group with 1 update: [typescript](https://github.com/microsoft/TypeScript).


Updates `typescript` from 6.0.2 to 6.0.3
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Commits](https://github.com/microsoft/TypeScript/compare/v6.0.2...v6.0.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 6.0.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-21 10:01:12 +02:00
dependabot[bot]
13b62626e8 Bump @types/node from 25.5.0 to 25.6.0 in the dev-minor group (#327)
Bumps the dev-minor group with 1 update: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node).


Updates `@types/node` from 25.5.0 to 25.6.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 25.6.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-21 10:00:46 +02:00
dependabot[bot]
bd17f4a47e Bump the actions group with 4 updates (#329)
Bumps the actions group with 4 updates: [actions/setup-node](https://github.com/actions/setup-node), [taiki-e/install-action](https://github.com/taiki-e/install-action), [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) and [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action).


Updates `actions/setup-node` from 6.3.0 to 6.4.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](53b83947a5...48b55a011b)

Updates `taiki-e/install-action` from 2.75.10 to 2.75.18
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](85b24a67ef...055f5df8c3)

Updates `dependabot/fetch-metadata` from 3.0.0 to 3.1.0
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](ffa630c65f...25dd0e34f4)

Updates `zizmorcore/zizmor-action` from 0.5.2 to 0.5.3
- [Release notes](https://github.com/zizmorcore/zizmor-action/releases)
- [Commits](71321a20a9...b1d7e1fb5d)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 6.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: taiki-e/install-action
  dependency-version: 2.75.18
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: dependabot/fetch-metadata
  dependency-version: 3.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: zizmorcore/zizmor-action
  dependency-version: 0.5.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-21 10:00:15 +02:00
dependabot[bot]
469cb0e247 Bump the actions group across 1 directory with 5 updates (#326)
Bumps the actions group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [cargo-bins/cargo-binstall](https://github.com/cargo-bins/cargo-binstall) | `1.17.9` | `1.18.1` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `7.0.0` | `7.0.1` |
| [taiki-e/install-action](https://github.com/taiki-e/install-action) | `2.68.34` | `2.75.10` |
| [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) | `2.5.0` | `3.0.0` |
| [cachix/install-nix-action](https://github.com/cachix/install-nix-action) | `31.10.1` | `31.10.4` |



Updates `cargo-bins/cargo-binstall` from 1.17.9 to 1.18.1
- [Release notes](https://github.com/cargo-bins/cargo-binstall/releases)
- [Changelog](https://github.com/cargo-bins/cargo-binstall/blob/main/release-plz.toml)
- [Commits](https://github.com/cargo-bins/cargo-binstall/compare/v1.17.9...v1.18.1)

Updates `actions/upload-artifact` from 7.0.0 to 7.0.1
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](bbbca2ddaa...043fb46d1a)

Updates `taiki-e/install-action` from 2.68.34 to 2.75.10
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](de6bbd1333...85b24a67ef)

Updates `dependabot/fetch-metadata` from 2.5.0 to 3.0.0
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](21025c705c...ffa630c65f)

Updates `cachix/install-nix-action` from 31.10.1 to 31.10.4
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Changelog](https://github.com/cachix/install-nix-action/blob/master/RELEASE.md)
- [Commits](1ca7d21a94...616559265b)

---
updated-dependencies:
- dependency-name: cargo-bins/cargo-binstall
  dependency-version: 1.18.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: taiki-e/install-action
  dependency-version: 2.75.10
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: dependabot/fetch-metadata
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: cachix/install-nix-action
  dependency-version: 31.10.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-14 20:30:15 +02:00
dependabot[bot]
3a556350bd Bump typescript from 5.9.3 to 6.0.2 in the dev-major group (#322)
Bumps the dev-major group with 1 update: [typescript](https://github.com/microsoft/TypeScript).


Updates `typescript` from 5.9.3 to 6.0.2
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.9.3...v6.0.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 6.0.2
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: dev-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-14 20:29:03 +02:00
dependabot[bot]
22de9d98ab Bump smol-toml from 1.6.0 to 1.6.1 in the prd-patch group (#321)
Bumps the prd-patch group with 1 update: [smol-toml](https://github.com/squirrelchat/smol-toml).


Updates `smol-toml` from 1.6.0 to 1.6.1
- [Release notes](https://github.com/squirrelchat/smol-toml/releases)
- [Commits](https://github.com/squirrelchat/smol-toml/compare/v1.6.0...v1.6.1)

---
updated-dependencies:
- dependency-name: smol-toml
  dependency-version: 1.6.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prd-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-14 20:28:34 +02:00
Charles Lechasseur
ed5e89b8ff feat: cache more cargo binaries (#325)
Instead of relying on `.crates2.json` to know which binaries are installed,
scan the bin directory and save the result in the action's state.
2026-04-12 19:41:04 +02:00
eitsupi
f51f967e15 fix: include cdylib/rlib/dylib/staticlib targets in build and fingerprint cleanup (#320) 2026-03-19 08:14:45 +01:00
github-actions[bot]
85fb4247b7 Merge pull request #318 from Swatinem/dependabot/github_actions/actions-9db51827cb
Bump taiki-e/install-action from 2.68.26 to 2.68.34 in the actions group
2026-03-16 21:55:16 +00:00
dependabot[bot]
5084d130b2 Bump taiki-e/install-action from 2.68.26 to 2.68.34 in the actions group
Bumps the actions group with 1 update: [taiki-e/install-action](https://github.com/taiki-e/install-action).


Updates `taiki-e/install-action` from 2.68.26 to 2.68.34
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](64c5c20c87...de6bbd1333)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.68.34
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-16 21:54:47 +00:00
eitsupi
bc1860267c fix: include target names in build/ and .fingerprint/ cleanup (#317) 2026-03-14 16:23:14 +01:00
Mikhail Glushenkov
d7ac6f694d Typofix (#316) 2026-03-12 18:17:15 +01:00
Arpad Borsos
e18b497796 update changelog, not sure why npm suddenly does not commit this 2026-03-12 18:15:39 +01:00
Arpad Borsos
c19371144d 2.9.1 2026-03-12 18:15:22 +01:00
Arpad Borsos
781e8d91ab try reverting pipeline change 2026-03-12 18:11:51 +01:00
Arpad Borsos
3d1fa4654a add changelog 2026-03-12 18:09:29 +01:00
15 changed files with 600 additions and 385 deletions

34
.github/workflows/binstall.yml vendored Normal file
View 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 }}

View File

@@ -23,7 +23,7 @@ jobs:
persist-credentials: false
- name: Setup Node.js 24.x
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24.x
cache: npm
@@ -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

View File

@@ -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@055f5df8c3f65ea01cd41e9dc855becd88953486 # v2.75.18
with:
tool: cargo-llvm-cov

View File

@@ -15,7 +15,7 @@ jobs:
steps:
- name: Fetch metadata
id: metadata
uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a # v2.5.0
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -37,7 +37,7 @@ jobs:
fi
- name: Setup node if necessary
if: steps.npm.outputs.changed != ''
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24.x
cache: npm

View File

@@ -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:

View File

@@ -21,4 +21,4 @@ jobs:
persist-credentials: false
- name: Run zizmor 🌈
uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2
uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3

View File

@@ -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

View File

@@ -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
View File

@@ -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
View File

@@ -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) => {

283
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -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",
"@types/node": "^25.6.0",
"@vercel/ncc": "^0.38.4",
"linefix": "^0.1.1",
"typescript": "5.9.3"
"typescript": "6.0.3"
},
"scripts": {
"prepare": "ncc build --target es2020 -o dist/restore src/restore.ts && ncc build --target es2020 -o dist/save src/save.ts && linefix dist"

View File

@@ -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);
}
}

View File

@@ -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);

View File

@@ -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) {}