30 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
Arpad Borsos
c676846f29 2.9.0 2026-03-12 08:34:47 +01:00
Arpad Borsos
bf71d02c11 bump dependencies and rebuild 2026-03-12 08:27:56 +01:00
dependabot[bot]
8a02ed5e29 Bump @types/node from 25.0.2 to 25.2.2 in the dev-minor group (#309)
Bumps the dev-minor group with 1 update: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node).


Updates `@types/node` from 25.0.2 to 25.2.2
- [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.2.2
  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-03-11 11:20:49 +01:00
dependabot[bot]
390157d487 Bump the prd-minor group across 1 directory with 2 updates (#307)
Bumps the prd-minor group with 2 updates in the / directory: [@actions/glob](https://github.com/actions/toolkit/tree/HEAD/packages/glob) and [smol-toml](https://github.com/squirrelchat/smol-toml).


Updates `@actions/glob` from 0.5.0 to 0.6.1
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/glob/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/glob)

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

---
updated-dependencies:
- dependency-name: "@actions/glob"
  dependency-version: 0.6.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prd-minor
- dependency-name: smol-toml
  dependency-version: 1.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prd-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-11 11:20:18 +01:00
dependabot[bot]
68500c182e Bump the actions group across 1 directory with 7 updates (#312)
Bumps the actions group with 7 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `6.0.1` | `6.0.2` |
| [actions/setup-node](https://github.com/actions/setup-node) | `6.1.0` | `6.2.0` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `6.0.0` | `7.0.0` |
| [taiki-e/install-action](https://github.com/taiki-e/install-action) | `2.63.3` | `2.68.16` |
| [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) | `2.4.0` | `2.5.0` |
| [cachix/install-nix-action](https://github.com/cachix/install-nix-action) | `31.9.0` | `31.9.1` |
| [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action) | `0.3.0` | `0.5.0` |



Updates `actions/checkout` from 6.0.1 to 6.0.2
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](8e8c483db8...de0fac2e45)

Updates `actions/setup-node` from 6.1.0 to 6.2.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](395ad32622...6044e13b5d)

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

Updates `taiki-e/install-action` from 2.63.3 to 2.68.16
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](d850aa8169...d6e286fa45)

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

Updates `cachix/install-nix-action` from 31.9.0 to 31.9.1
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Changelog](https://github.com/cachix/install-nix-action/blob/master/RELEASE.md)
- [Commits](4e002c8ec8...2126ae7fc5)

Updates `zizmorcore/zizmor-action` from 0.3.0 to 0.5.0
- [Release notes](https://github.com/zizmorcore/zizmor-action/releases)
- [Commits](e639db9933...0dce2577a4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: actions/setup-node
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: taiki-e/install-action
  dependency-version: 2.68.16
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: dependabot/fetch-metadata
  dependency-version: 2.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: cachix/install-nix-action
  dependency-version: 31.9.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: zizmorcore/zizmor-action
  dependency-version: 0.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-11 11:19:46 +01:00
Linda_pp
1a8384176d Migrate to node24 runner (#314) 2026-03-11 08:02:38 +01:00
Kieron Briggs
11da8522bc Compare case-insenitively for full cache key match (#303)
Some self-hosted (or otherwise non-github-hosted) runners are
non-case-preserving for cache keys. To support such configurations, set the
`cache-hit` output variable to `true` if the found cache key matches
case-insenitively.

Fixes: https://github.com/Swatinem/rust-cache/issues/302
2026-01-12 16:10:32 +01:00
Tamir Duberstein
5e4a767433 Consider all installed toolchains in cache key (#293) 2025-12-16 12:30:13 +01:00
dependabot[bot]
0aa729bb7a Bump @types/node from 24.10.1 to 25.0.2 in the dev-major group (#295)
Bumps the dev-major group with 1 update: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node).


Updates `@types/node` from 24.10.1 to 25.0.2
- [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.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>
2025-12-16 11:55:53 +01:00
dependabot[bot]
6cda4ba16e Bump the prd-major group with 3 updates (#294)
Bumps the prd-major group with 3 updates: [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache), [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) and [@actions/exec](https://github.com/actions/toolkit/tree/HEAD/packages/exec).


Updates `@actions/cache` from 4.1.0 to 5.0.1
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/cache)

Updates `@actions/core` from 1.11.1 to 2.0.1
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/@actions/artifact@2.0.1/packages/core)

Updates `@actions/exec` from 1.1.1 to 2.0.0
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/exec/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/exec)

---
updated-dependencies:
- dependency-name: "@actions/cache"
  dependency-version: 5.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: prd-major
- dependency-name: "@actions/core"
  dependency-version: 2.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: prd-major
- dependency-name: "@actions/exec"
  dependency-version: 2.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: prd-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-16 11:55:34 +01:00
dependabot[bot]
e73b99eeb0 Bump the actions group across 1 directory with 5 updates (#296)
Bumps the actions group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `6.0.0` | `6.0.1` |
| [actions/setup-node](https://github.com/actions/setup-node) | `6.0.0` | `6.1.0` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `5.0.0` | `6.0.0` |
| [taiki-e/install-action](https://github.com/taiki-e/install-action) | `2.62.60` | `2.63.3` |
| [cachix/install-nix-action](https://github.com/cachix/install-nix-action) | `31.8.4` | `31.9.0` |



Updates `actions/checkout` from 6.0.0 to 6.0.1
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](1af3b93b68...8e8c483db8)

Updates `actions/setup-node` from 6.0.0 to 6.1.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](2028fbc5c2...395ad32622)

Updates `actions/upload-artifact` from 5.0.0 to 6.0.0
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](330a01c490...b7c566a772)

Updates `taiki-e/install-action` from 2.62.60 to 2.63.3
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](3575e53270...d850aa8169)

Updates `cachix/install-nix-action` from 31.8.4 to 31.9.0
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Changelog](https://github.com/cachix/install-nix-action/blob/master/RELEASE.md)
- [Commits](0b0e072294...4e002c8ec8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: actions/setup-node
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: actions/upload-artifact
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: taiki-e/install-action
  dependency-version: 2.63.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: cachix/install-nix-action
  dependency-version: 31.9.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-16 11:54:57 +01:00
github-actions[bot]
42c55942cf Merge pull request #291 from Swatinem/dependabot/github_actions/actions-d37c78095a
Bump taiki-e/install-action from 2.62.57 to 2.62.60 in the actions group
2025-12-02 01:11:03 +00:00
dependabot[bot]
73cfdf196a Bump taiki-e/install-action from 2.62.57 to 2.62.60 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.62.57 to 2.62.60
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](763e3324d4...3575e53270)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-02 01:08:31 +00:00
marc0246
151eeee51b Add support for running rust-cache commands from within a Nix shell (#290) 2025-12-01 19:56:12 +01:00
27 changed files with 237509 additions and 39074 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

@@ -19,7 +19,7 @@ jobs:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

View File

@@ -18,14 +18,14 @@ jobs:
if: github.repository == 'Swatinem/rust-cache'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Node.js 20.x
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
- name: Setup Node.js 24.x
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.x
node-version: 24.x
cache: npm
- name: Install dependencies
@@ -43,7 +43,7 @@ jobs:
fi
id: diff
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: dist

View File

@@ -19,13 +19,13 @@ jobs:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- run: rustup toolchain install stable --profile minimal --component llvm-tools-preview --no-self-update
- uses: taiki-e/install-action@763e3324d4fd026c9bd284c504378585777a87d5 # v2.62.57
- uses: taiki-e/install-action@055f5df8c3f65ea01cd41e9dc855becd88953486 # v2.75.18
with:
tool: cargo-llvm-cov

View File

@@ -15,10 +15,10 @@ jobs:
steps:
- name: Fetch metadata
id: metadata
uses: dependabot/fetch-metadata@08eff52bf64351f401fb50d4972fa95b9f2c2d1b # v2.4.0
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 2
persist-credentials: false
@@ -37,9 +37,9 @@ jobs:
fi
- name: Setup node if necessary
if: steps.npm.outputs.changed != ''
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.x
node-version: 24.x
cache: npm
- name: Re-generate and commit dist/ if changed
id: amend

View File

@@ -20,7 +20,7 @@ jobs:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: git
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

View File

@@ -19,7 +19,7 @@ jobs:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

View File

@@ -20,7 +20,7 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
@@ -54,7 +54,7 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

33
.github/workflows/nix.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: nix
on: [push, pull_request]
permissions: {}
jobs:
nix:
if: github.repository == 'Swatinem/rust-cache'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
name: Test Nix on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: cachix/install-nix-action@616559265b40713947b9c190a8ff4b507b5df49b # v31.10.4
- uses: ./
with:
workspaces: tests
cmd-format: nix develop ./tests -c {0}
- run: |
nix develop -c cargo check
nix develop -c cargo test
working-directory: tests

View File

@@ -19,7 +19,7 @@ jobs:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

View File

@@ -19,7 +19,7 @@ jobs:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

View File

@@ -19,7 +19,7 @@ jobs:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

View File

@@ -16,9 +16,9 @@ jobs:
security-events: write # for uploading results to the Security tab
steps:
- name: Checkout repository
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Run zizmor 🌈
uses: zizmorcore/zizmor-action@e639db99335bc9038abc0e066dfcd72e23d26fb4 # v0.3.0
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"
@@ -99,6 +99,16 @@ sensible defaults.
# Determines whether to cache the ~/.cargo/bin directory.
# default: "true"
cache-bin: ""
# A format string used to format commands to be run, i.e. `rustc` and `cargo`.
# Must contain exactly one occurance of `{0}`, which is the formatting fragment
# that will be replaced with the `rustc` or `cargo` command. This is necessary
# when using Nix or other setup that requires running these commands within a
# specific shell, otherwise the system `rustc` and `cargo` will be run.
# default: "{0}"
cmd-format: ""
# To run within a Nix shell (using the default dev shell of a flake in the repo root):
cmd-format: nix develop -c {0}
```
Further examples are available in the [.github/workflows](./.github/workflows/) directory.
@@ -133,7 +143,8 @@ This cache is automatically keyed by:
- the github [`job_id`](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_id)
(if `add-job-id-key` is `"true"`),
- the rustc release / host / hash,
- the rustc release / host / hash (for all installed toolchains when
available),
- the following values, if `add-rust-environment-hash-key` is `"true"`:
- the value of some compiler-specific environment variables (eg. RUSTFLAGS, etc), and
- a hash of all `Cargo.lock` / `Cargo.toml` files found anywhere in the repository (if present).

View File

@@ -60,11 +60,15 @@ inputs:
description: "Check if a cache entry exists without downloading the cache"
required: false
default: "false"
cmd-format:
description: "A format string used to format commands to be run, i.e. `rustc` and `cargo`."
required: false
default: "{0}"
outputs:
cache-hit:
description: "A boolean value that indicates an exact match was found."
runs:
using: "node20"
using: "node24"
main: "dist/restore/index.js"
post: "dist/save/index.js"
post-if: "success() || env.CACHE_ON_FAILURE == 'true'"

137815
dist/restore/index.js vendored

File diff suppressed because one or more lines are too long

137845
dist/save/index.js vendored

File diff suppressed because one or more lines are too long

589
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.8.2",
"version": "2.9.1",
"description": "A GitHub Action that implements smart caching for rust/cargo projects with sensible defaults.",
"keywords": [
"actions",
@@ -24,18 +24,18 @@
"dependencies": {
"@actions/buildjet-cache": "npm:github-actions.cache-buildjet@0.2.0",
"@actions/warpbuild-cache": "npm:github-actions.warp-cache@1.4.7",
"@actions/cache": "^4.1.0",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/glob": "^0.5.0",
"@actions/io": "^2.0.0",
"smol-toml": "^1.5.2"
"@actions/cache": "^6.0.0",
"@actions/core": "^3.0.0",
"@actions/exec": "^3.0.0",
"@actions/glob": "^0.6.1",
"@actions/io": "^3.0.2",
"smol-toml": "^1.6.1"
},
"devDependencies": {
"@types/node": "^24.10.1",
"@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

@@ -1,8 +1,8 @@
import * as core from "@actions/core";
import * as glob from "@actions/glob";
import crypto from "crypto";
import fs from "fs";
import fs_promises from "fs/promises";
import fs from "fs/promises";
import { createReadStream } from "fs";
import os from "os";
import path from "path";
import * as toml from "smol-toml";
@@ -18,6 +18,9 @@ const STATE_CONFIG = "RUST_CACHE_CONFIG";
const HASH_LENGTH = 8;
export class CacheConfig {
/** A format string for running commands */
public cmdFormat: string = "";
/** All the paths we want to cache */
public cachePaths: Array<string> = [];
/** The primary cache key */
@@ -37,7 +40,7 @@ export class CacheConfig {
/** The prefix portion of the cache key */
private keyPrefix = "";
/** The rust version considered for the cache key */
private keyRust = "";
private keyRust: Array<string> = [];
/** The environment variables considered for the cache key */
private keyEnvs: Array<string> = [];
/** The files considered for the cache key */
@@ -53,6 +56,17 @@ export class CacheConfig {
static async new(): Promise<CacheConfig> {
const self = new CacheConfig();
let cmdFormat = core.getInput("cmd-format");
if (cmdFormat) {
const placeholderMatches = cmdFormat.match(/\{0\}/g);
if (!placeholderMatches || placeholderMatches.length !== 1) {
cmdFormat = "{0}";
}
} else {
cmdFormat = "{0}";
}
self.cmdFormat = cmdFormat;
// Construct key prefix:
// This uses either the `shared-key` input,
// or the `key` input combined with the `job` key.
@@ -69,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}`;
}
}
@@ -89,14 +103,16 @@ export class CacheConfig {
// resulting environment hash.
let hasher = crypto.createHash("sha1");
const rustVersion = await getRustVersion();
const rustVersions = Array.from(await getRustVersions(cmdFormat));
// Doesn't matter how they're sorted, just as long as it's deterministic.
rustVersions.sort();
let keyRust = `${rustVersion.release} ${rustVersion.host}`;
hasher.update(keyRust);
hasher.update(rustVersion["commit-hash"]);
keyRust += ` (${rustVersion["commit-hash"]})`;
self.keyRust = keyRust;
for (const rustVersion of rustVersions) {
const { release, host, "commit-hash": commitHash } = rustVersion;
const keyRust = `${release} ${host} ${commitHash}`;
hasher.update(keyRust);
self.keyRust.push(keyRust);
}
// these prefixes should cover most of the compiler / rust / cargo keys
const envPrefixes = ["CARGO", "CC", "CFLAGS", "CXX", "CMAKE", "RUST"];
@@ -158,13 +174,13 @@ export class CacheConfig {
)),
);
const workspaceMembers = await workspace.getWorkspaceMembers();
const workspaceMembers = await workspace.getWorkspaceMembers(cmdFormat);
const cargo_manifests = sort_and_uniq(workspaceMembers.map((member) => path.join(member.path, "Cargo.toml")));
for (const cargo_manifest of cargo_manifests) {
try {
const content = await fs_promises.readFile(cargo_manifest, { encoding: "utf8" });
const content = await fs.readFile(cargo_manifest, { encoding: "utf8" });
// Use any since TomlPrimitive is not exposed
const parsed = toml.parse(content) as { [key: string]: any };
@@ -211,7 +227,7 @@ export class CacheConfig {
const cargo_lock = path.join(workspace.root, "Cargo.lock");
if (await exists(cargo_lock)) {
try {
const content = await fs_promises.readFile(cargo_lock, { encoding: "utf8" });
const content = await fs.readFile(cargo_lock, { encoding: "utf8" });
const parsed = toml.parse(content);
if ((parsed.version !== 3 && parsed.version !== 4) || !("package" in parsed)) {
@@ -239,7 +255,7 @@ export class CacheConfig {
keyFiles = sort_and_uniq(keyFiles);
for (const file of keyFiles) {
for await (const chunk of fs.createReadStream(file)) {
for await (const chunk of createReadStream(file)) {
hasher.update(chunk);
}
}
@@ -321,7 +337,10 @@ export class CacheConfig {
core.info(`.. Prefix:`);
core.info(` - ${this.keyPrefix}`);
core.info(`.. Environment considered:`);
core.info(` - Rust Version: ${this.keyRust}`);
core.info(` - Rust Versions:`);
for (const rust of this.keyRust) {
core.info(` - ${rust}`);
}
for (const env of this.keyEnvs) {
core.info(` - ${env}`);
}
@@ -366,9 +385,33 @@ interface RustVersion {
"commit-hash": string;
}
async function getRustVersion(): Promise<RustVersion> {
const stdout = await getCmdOutput("rustc", ["-vV"]);
let splits = stdout
async function getRustVersions(cmdFormat: string): Promise<Set<RustVersion>> {
const versions = new Set<RustVersion>();
versions.add(parseRustVersion(await getCmdOutput(cmdFormat, "rustc -vV")));
const stdout = await (async () => {
try {
return await getCmdOutput(cmdFormat, "rustup toolchain list --quiet");
} catch (e) {
core.warning(`Error running rustup toolchain list, falling back to default toolchain only: ${e}`);
return undefined;
}
})();
if (stdout !== undefined) {
for (const toolchain of stdout.split(/[\n\r]+/)) {
const trimmed = toolchain.trim();
if (!trimmed) {
continue;
}
versions.add(parseRustVersion(await getCmdOutput(cmdFormat, `rustup run ${toolchain} rustc -vV`)));
}
}
return versions;
}
function parseRustVersion(stdout: string): RustVersion {
const splits = stdout
.split(/[\n\r]+/)
.filter(Boolean)
.map((s) => s.split(":").map((s) => s.trim()))
@@ -380,10 +423,17 @@ async function globFiles(pattern: string): Promise<string[]> {
const globber = await glob.create(pattern, {
followSymbolicLinks: false,
});
// fs.statSync resolve the symbolic link and returns stat for the
// fs.stat resolve the symbolic link and returns stat for the
// file it pointed to, so isFile would make sure the resolved
// file is actually a regular file.
return (await globber.glob()).filter((file) => fs.statSync(file).isFile());
const files = [];
for (const file of await globber.glob()) {
const stats = await fs.stat(file);
if (stats.isFile()) {
files.push(file);
}
}
return files;
}
function sort_and_uniq(a: string[]) {

View File

@@ -42,7 +42,9 @@ async function run() {
lookupOnly,
});
if (restoreKey) {
const match = restoreKey === key;
const match = restoreKey.localeCompare(key, undefined, {
sensitivity: "accent"
}) === 0;
core.info(`${lookupOnly ? "Found" : "Restored from"} cache key "${restoreKey}" full match: ${match}.`);
if (!match) {
// pre-clean the target directory on cache mismatch

View File

@@ -39,9 +39,9 @@ async function run() {
const workspaceCrates = core.getInput("cache-workspace-crates").toLowerCase() || "false";
const allPackages = [];
for (const workspace of config.workspaces) {
const packages = await workspace.getPackagesOutsideWorkspaceRoot();
const packages = await workspace.getPackagesOutsideWorkspaceRoot(config.cmdFormat);
if (workspaceCrates === "true") {
const wsMembers = await workspace.getWorkspaceMembers();
const wsMembers = await workspace.getWorkspaceMembers(config.cmdFormat);
packages.push(...wsMembers);
}
allPackages.push(...packages);

View File

@@ -16,14 +16,15 @@ export function reportError(e: any) {
}
export async function getCmdOutput(
cmdFormat: string,
cmd: string,
args: Array<string> = [],
options: exec.ExecOptions = {},
): Promise<string> {
cmd = cmdFormat.replace("{0}", cmd);
let stdout = "";
let stderr = "";
try {
await exec.exec(cmd, args, {
await exec.exec(cmd, [], {
silent: true,
listeners: {
stdout(data) {
@@ -37,7 +38,7 @@ export async function getCmdOutput(
});
} catch (e) {
(e as any).commandFailed = {
command: `${cmd} ${args.join(" ")}`,
command: cmd,
stderr,
};
throw e;

View File

@@ -3,17 +3,18 @@ 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) {}
async getPackages(filter: (p: Meta["packages"][0]) => boolean, ...extraArgs: string[]): Promise<Packages> {
async getPackages(cmdFormat: string, filter: (p: Meta["packages"][0]) => boolean, extraArgs?: string): Promise<Packages> {
const cmd = "cargo metadata --all-features --format-version 1" + (extraArgs ? ` ${extraArgs}` : "");
let packages: Packages = [];
try {
core.debug(`collecting metadata for "${this.root}"`);
const meta: Meta = JSON.parse(
await getCmdOutput("cargo", ["metadata", "--all-features", "--format-version", "1", ...extraArgs], {
await getCmdOutput(cmdFormat, cmd, {
cwd: this.root,
env: { ...process.env, "CARGO_ENCODED_RUSTFLAGS": "" },
}),
@@ -29,12 +30,12 @@ export class Workspace {
return packages;
}
public async getPackagesOutsideWorkspaceRoot(): Promise<Packages> {
return await this.getPackages((pkg) => !pkg.manifest_path.startsWith(this.root));
public async getPackagesOutsideWorkspaceRoot(cmdFormat: string): Promise<Packages> {
return await this.getPackages(cmdFormat, (pkg) => !pkg.manifest_path.startsWith(this.root));
}
public async getWorkspaceMembers(): Promise<Packages> {
return await this.getPackages((_) => true, "--no-deps");
public async getWorkspaceMembers(cmdFormat: string): Promise<Packages> {
return await this.getPackages(cmdFormat, (_) => true, "--no-deps");
}
}

31
tests/flake.nix Normal file
View File

@@ -0,0 +1,31 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ { self, nixpkgs, flake-utils, rust-overlay, ... }:
flake-utils.lib.eachDefaultSystem (
system: let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs { inherit system overlays; };
in {
devShells.default = with pkgs; mkShell {
buildInputs = [
autoconf
gcc
gnumake
openssl
pkg-config
rust-bin.stable.latest.minimal
];
CARGO_TERM_COLOR = "always";
};
}
);
}