Compare commits
53 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11da8522bc | ||
|
|
5e4a767433 | ||
|
|
0aa729bb7a | ||
|
|
6cda4ba16e | ||
|
|
e73b99eeb0 | ||
|
|
42c55942cf | ||
|
|
73cfdf196a | ||
|
|
151eeee51b | ||
|
|
779680da71 | ||
|
|
2ea64efb25 | ||
|
|
8930d9c33e | ||
|
|
c071727fc9 | ||
|
|
f2a41b7c11 | ||
|
|
e306f83d21 | ||
|
|
c9119007a1 | ||
|
|
3aaed5547e | ||
|
|
972b315a82 | ||
|
|
07caf06f7a | ||
|
|
a84bfdc502 | ||
|
|
7ec422fc69 | ||
|
|
b28feea9c9 | ||
|
|
54f69366a5 | ||
|
|
27f6075dd2 | ||
|
|
94162284cf | ||
|
|
2245981121 | ||
|
|
51dda28b91 | ||
|
|
20d8423432 | ||
|
|
b08fc8f955 | ||
|
|
bf8c594800 | ||
|
|
a1f94902a6 | ||
|
|
eb57cd6af8 | ||
|
|
90fd0618bc | ||
|
|
2a0d153b42 | ||
|
|
14cb63c99f | ||
|
|
7bd5339b5b | ||
|
|
f13886b937 | ||
|
|
5abb1e2a95 | ||
|
|
3c68c31fe5 | ||
|
|
5467cca14c | ||
|
|
94b28bf00e | ||
|
|
cb8ffc21fa | ||
|
|
c4f0bbdf58 | ||
|
|
d8c5063361 | ||
|
|
267a8a94c9 | ||
|
|
46cb408fba | ||
|
|
203c9eb82a | ||
|
|
a8b36e3f74 | ||
|
|
7e1e2d0a10 | ||
|
|
98c8021b55 | ||
|
|
14d3bc39c4 | ||
|
|
52ea1434f8 | ||
|
|
eaa85be6b1 | ||
|
|
901019c0f8 |
50
.github/dependabot.yaml
vendored
Normal file
50
.github/dependabot.yaml
vendored
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/optimizing-pr-creation-version-updates#setting-up-a-cooldown-period-for-dependency-updates
|
||||||
|
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: cargo
|
||||||
|
directories:
|
||||||
|
- tests
|
||||||
|
- tests/wasm-workspace
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference#groups--
|
||||||
|
# 1 PR per week and group
|
||||||
|
groups:
|
||||||
|
cargo-major:
|
||||||
|
update-types: ["major"]
|
||||||
|
cargo-minor:
|
||||||
|
update-types: ["minor"]
|
||||||
|
cargo-patch:
|
||||||
|
update-types: ["patch"]
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: /
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
groups:
|
||||||
|
actions:
|
||||||
|
# Combine all images of the last week
|
||||||
|
patterns: ["*"]
|
||||||
|
- package-ecosystem: npm
|
||||||
|
directory: /
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
groups:
|
||||||
|
prd-major:
|
||||||
|
dependency-type: "production"
|
||||||
|
update-types: ["major"]
|
||||||
|
prd-minor:
|
||||||
|
dependency-type: "production"
|
||||||
|
update-types: ["minor"]
|
||||||
|
prd-patch:
|
||||||
|
dependency-type: "production"
|
||||||
|
update-types: ["patch"]
|
||||||
|
dev-major:
|
||||||
|
dependency-type: "development"
|
||||||
|
update-types: ["major"]
|
||||||
|
dev-minor:
|
||||||
|
dependency-type: "development"
|
||||||
|
update-types: ["minor"]
|
||||||
|
dev-patch:
|
||||||
|
dependency-type: "development"
|
||||||
|
update-types: ["patch"]
|
||||||
7
.github/workflows/buildjet.yml
vendored
7
.github/workflows/buildjet.yml
vendored
@@ -2,8 +2,11 @@ name: buildjet
|
|||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
buildjet:
|
buildjet:
|
||||||
|
if: github.repository == 'Swatinem/rust-cache'
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -16,7 +19,9 @@ jobs:
|
|||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- run: rustup toolchain install stable --profile minimal --no-self-update
|
- run: rustup toolchain install stable --profile minimal --no-self-update
|
||||||
|
|
||||||
|
|||||||
11
.github/workflows/check-dist.yml
vendored
11
.github/workflows/check-dist.yml
vendored
@@ -11,14 +11,19 @@ on:
|
|||||||
- "**.md"
|
- "**.md"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-dist:
|
check-dist:
|
||||||
|
if: github.repository == 'Swatinem/rust-cache'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Setup Node.js 20.x
|
- name: Setup Node.js 20.x
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
|
||||||
with:
|
with:
|
||||||
node-version: 20.x
|
node-version: 20.x
|
||||||
cache: npm
|
cache: npm
|
||||||
@@ -38,7 +43,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
id: diff
|
id: diff
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
||||||
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
||||||
with:
|
with:
|
||||||
name: dist
|
name: dist
|
||||||
|
|||||||
11
.github/workflows/coverage.yml
vendored
11
.github/workflows/coverage.yml
vendored
@@ -2,8 +2,11 @@ name: coverage
|
|||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
coverage:
|
coverage:
|
||||||
|
if: github.repository == 'Swatinem/rust-cache'
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -16,11 +19,15 @@ jobs:
|
|||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- run: rustup toolchain install stable --profile minimal --component llvm-tools-preview --no-self-update
|
- run: rustup toolchain install stable --profile minimal --component llvm-tools-preview --no-self-update
|
||||||
|
|
||||||
- uses: taiki-e/install-action@cargo-llvm-cov
|
- uses: taiki-e/install-action@d850aa816998e5cf15f67a78c7b933f2a5033f8a # v2.63.3
|
||||||
|
with:
|
||||||
|
tool: cargo-llvm-cov
|
||||||
|
|
||||||
- uses: ./
|
- uses: ./
|
||||||
with:
|
with:
|
||||||
|
|||||||
65
.github/workflows/dependabot.yml
vendored
Normal file
65
.github/workflows/dependabot.yml
vendored
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#enabling-automerge-on-a-pull-request
|
||||||
|
|
||||||
|
name: Dependabot Automation
|
||||||
|
on: pull_request
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
automerge:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write # for pushing commits
|
||||||
|
pull-requests: write # for merging PRs
|
||||||
|
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'Swatinem/rust-cache'
|
||||||
|
steps:
|
||||||
|
- name: Fetch metadata
|
||||||
|
id: metadata
|
||||||
|
uses: dependabot/fetch-metadata@08eff52bf64351f401fb50d4972fa95b9f2c2d1b # v2.4.0
|
||||||
|
with:
|
||||||
|
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
|
with:
|
||||||
|
fetch-depth: 2
|
||||||
|
persist-credentials: false
|
||||||
|
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
|
||||||
|
- name: Check if package-lock.json has been changed
|
||||||
|
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
|
||||||
|
id: npm
|
||||||
|
env:
|
||||||
|
PR_URL: ${{github.event.pull_request.html_url}}
|
||||||
|
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||||
|
run: |
|
||||||
|
if ! git diff --quiet HEAD~1.. -- package-lock.json; then
|
||||||
|
echo "changed=true" >> $GITHUB_OUTPUT
|
||||||
|
echo "changed=true, checking out $PR_URL to allow amend"
|
||||||
|
gh pr checkout "$PR_URL"
|
||||||
|
fi
|
||||||
|
- name: Setup node if necessary
|
||||||
|
if: steps.npm.outputs.changed != ''
|
||||||
|
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
|
||||||
|
with:
|
||||||
|
node-version: 20.x
|
||||||
|
cache: npm
|
||||||
|
- name: Re-generate and commit dist/ if changed
|
||||||
|
id: amend
|
||||||
|
if: steps.npm.outputs.changed != ''
|
||||||
|
run: |
|
||||||
|
npm ci
|
||||||
|
npm run prepare
|
||||||
|
if ! git diff --quiet dist/*/index.js; then
|
||||||
|
echo "dist/ changed, amending last commit"
|
||||||
|
export $(git log -1 --pretty=format:'GIT_COMMITTER_NAME=%cn GIT_COMMITTER_EMAIL=%ce GIT_AUTHOR_NAME=%an GIT_AUTHOR_EMAIL=%ae')
|
||||||
|
git fetch --unshallow
|
||||||
|
echo "Before amend:" && git show --name-only --pretty=
|
||||||
|
git commit --amend --no-edit --no-reset-author -- dist/*/index.js
|
||||||
|
echo "After amend:" && git show --name-only --pretty=
|
||||||
|
git push --force-with-lease origin HEAD
|
||||||
|
echo "changed=true" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
- name: Auto-merge Patch PRs
|
||||||
|
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
|
||||||
|
run: gh pr merge --auto --merge "$PR_URL"
|
||||||
|
env:
|
||||||
|
PR_URL: ${{github.event.pull_request.html_url}}
|
||||||
|
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||||
7
.github/workflows/git-registry.yml
vendored
7
.github/workflows/git-registry.yml
vendored
@@ -2,8 +2,11 @@ name: git-registry
|
|||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
git-registry:
|
git-registry:
|
||||||
|
if: github.repository == 'Swatinem/rust-cache'
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -17,7 +20,9 @@ jobs:
|
|||||||
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: git
|
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: git
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- run: rustup toolchain install stable --profile minimal --no-self-update
|
- run: rustup toolchain install stable --profile minimal --no-self-update
|
||||||
|
|
||||||
|
|||||||
7
.github/workflows/install.yml
vendored
7
.github/workflows/install.yml
vendored
@@ -2,8 +2,11 @@ name: install
|
|||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
install:
|
install:
|
||||||
|
if: github.repository == 'Swatinem/rust-cache'
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -16,7 +19,9 @@ jobs:
|
|||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- run: rustup toolchain install stable --profile minimal --no-self-update
|
- run: rustup toolchain install stable --profile minimal --no-self-update
|
||||||
|
|
||||||
|
|||||||
74
.github/workflows/multi-job-cache.yml
vendored
Normal file
74
.github/workflows/multi-job-cache.yml
vendored
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
name: multi-job-cache
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
multi-job-cache-1:
|
||||||
|
if: github.repository == 'Swatinem/rust-cache'
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
|
||||||
|
name: Test multi-job cache (1) on ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: install rust toolchain
|
||||||
|
run: rustup toolchain install stable --profile minimal --target wasm32-unknown-unknown --no-self-update
|
||||||
|
|
||||||
|
- name: cache
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
workspaces: |
|
||||||
|
tests
|
||||||
|
add-job-id-key: "false"
|
||||||
|
add-rust-environment-hash-key: "false"
|
||||||
|
|
||||||
|
- name: cargo check (tests)
|
||||||
|
working-directory: tests
|
||||||
|
run: cargo check
|
||||||
|
|
||||||
|
multi-job-cache-2:
|
||||||
|
if: github.repository == 'Swatinem/rust-cache'
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
|
||||||
|
name: Test multi-job cache (2) on ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: install rust toolchain
|
||||||
|
run: rustup toolchain install stable --profile minimal --target wasm32-unknown-unknown --no-self-update
|
||||||
|
|
||||||
|
- name: cache
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
workspaces: |
|
||||||
|
tests/wasm-workspace
|
||||||
|
add-job-id-key: "false"
|
||||||
|
add-rust-environment-hash-key: "false"
|
||||||
|
|
||||||
|
- name: cargo check (tests/wasm-workspace)
|
||||||
|
working-directory: tests/wasm-workspace
|
||||||
|
run: cargo check
|
||||||
33
.github/workflows/nix.yml
vendored
Normal file
33
.github/workflows/nix.yml
vendored
Normal 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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0
|
||||||
|
|
||||||
|
- 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
|
||||||
7
.github/workflows/simple.yml
vendored
7
.github/workflows/simple.yml
vendored
@@ -2,8 +2,11 @@ name: simple
|
|||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
simple:
|
simple:
|
||||||
|
if: github.repository == 'Swatinem/rust-cache'
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -16,7 +19,9 @@ jobs:
|
|||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- run: rustup toolchain install stable --profile minimal --no-self-update
|
- run: rustup toolchain install stable --profile minimal --no-self-update
|
||||||
|
|
||||||
|
|||||||
7
.github/workflows/target-dir.yml
vendored
7
.github/workflows/target-dir.yml
vendored
@@ -2,8 +2,11 @@ name: target-dir
|
|||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
target-dir:
|
target-dir:
|
||||||
|
if: github.repository == 'Swatinem/rust-cache'
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -16,7 +19,9 @@ jobs:
|
|||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- run: rustup toolchain install stable --profile minimal --no-self-update
|
- run: rustup toolchain install stable --profile minimal --no-self-update
|
||||||
|
|
||||||
|
|||||||
13
.github/workflows/workspaces.yml
vendored
13
.github/workflows/workspaces.yml
vendored
@@ -2,8 +2,11 @@ name: workspaces
|
|||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
workspaces:
|
workspaces:
|
||||||
|
if: github.repository == 'Swatinem/rust-cache'
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -16,7 +19,9 @@ jobs:
|
|||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- run: rustup toolchain install stable --profile minimal --target wasm32-unknown-unknown --no-self-update
|
- run: rustup toolchain install stable --profile minimal --target wasm32-unknown-unknown --no-self-update
|
||||||
|
|
||||||
@@ -26,8 +31,10 @@ jobs:
|
|||||||
tests
|
tests
|
||||||
tests/wasm-workspace
|
tests/wasm-workspace
|
||||||
|
|
||||||
- run: cargo check
|
- name: cargo check (tests)
|
||||||
working-directory: tests
|
working-directory: tests
|
||||||
|
run: cargo check
|
||||||
|
|
||||||
- run: cargo check
|
- name: cargo check (tests/wasm-workspace)
|
||||||
working-directory: tests/wasm-workspace
|
working-directory: tests/wasm-workspace
|
||||||
|
run: cargo check
|
||||||
|
|||||||
24
.github/workflows/zizmor.yml
vendored
Normal file
24
.github/workflows/zizmor.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
name: GitHub Actions Security Analysis with zizmor 🌈
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["main"]
|
||||||
|
pull_request:
|
||||||
|
branches: ["**"]
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
zizmor:
|
||||||
|
name: Run zizmor 🌈
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
security-events: write # for uploading results to the Security tab
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Run zizmor 🌈
|
||||||
|
uses: zizmorcore/zizmor-action@e639db99335bc9038abc0e066dfcd72e23d26fb4 # v0.3.0
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
target/
|
target/
|
||||||
|
src/*.js
|
||||||
|
|
||||||
# Editors
|
# Editors
|
||||||
.idea/
|
.idea/
|
||||||
|
|||||||
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,5 +1,19 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2.8.2
|
||||||
|
|
||||||
|
- Don't overwrite env for cargo-metadata call
|
||||||
|
|
||||||
|
## 2.8.1
|
||||||
|
|
||||||
|
- Set empty `CARGO_ENCODED_RUSTFLAGS` when retrieving metadata
|
||||||
|
- Various dependency updates
|
||||||
|
|
||||||
|
## 2.8.0
|
||||||
|
|
||||||
|
- Add support for `warpbuild` cache provider
|
||||||
|
- Add new `cache-workspace-crates` feature
|
||||||
|
|
||||||
## 2.7.8
|
## 2.7.8
|
||||||
|
|
||||||
- Include CPU arch in the cache key
|
- Include CPU arch in the cache key
|
||||||
|
|||||||
51
README.md
51
README.md
@@ -6,7 +6,7 @@ sensible defaults.
|
|||||||
## Example usage
|
## Example usage
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
# selecting a toolchain either by action or manual `rustup` calls should happen
|
# selecting a toolchain either by action or manual `rustup` calls should happen
|
||||||
# before the plugin, as the cache uses the current rustc version as its cache key
|
# before the plugin, as the cache uses the current rustc version as its cache key
|
||||||
@@ -28,6 +28,16 @@ sensible defaults.
|
|||||||
# default: empty
|
# default: empty
|
||||||
key: ""
|
key: ""
|
||||||
|
|
||||||
|
# If the automatic `job`-based cache key should include the job id.
|
||||||
|
# default: "true"
|
||||||
|
add-job-id-key: ""
|
||||||
|
|
||||||
|
# Weather 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"
|
||||||
|
add-rust-environment-hash-key: ""
|
||||||
|
|
||||||
# A whitespace separated list of env-var *prefixes* who's value contributes
|
# A whitespace separated list of env-var *prefixes* who's value contributes
|
||||||
# to the environment cache key.
|
# to the environment cache key.
|
||||||
# The env-vars are matched by *prefix*, so the default `RUST` var will
|
# The env-vars are matched by *prefix*, so the default `RUST` var will
|
||||||
@@ -60,6 +70,12 @@ sensible defaults.
|
|||||||
# default: "false"
|
# default: "false"
|
||||||
cache-all-crates: ""
|
cache-all-crates: ""
|
||||||
|
|
||||||
|
# Similar to cache-all-crates.
|
||||||
|
# If `true` the workspace crates will be cached.
|
||||||
|
# Useful if the workspace contains libraries that are only updated sporadically.
|
||||||
|
# default: "false"
|
||||||
|
cache-workspace-crates: ""
|
||||||
|
|
||||||
# Determines whether the cache should be saved.
|
# Determines whether the cache should be saved.
|
||||||
# If `false`, the cache is only restored.
|
# If `false`, the cache is only restored.
|
||||||
# Useful for jobs where the matrix is additive e.g. additional Cargo features,
|
# Useful for jobs where the matrix is additive e.g. additional Cargo features,
|
||||||
@@ -76,13 +92,23 @@ sensible defaults.
|
|||||||
lookup-only: ""
|
lookup-only: ""
|
||||||
|
|
||||||
# Specifies what to use as the backend providing cache
|
# Specifies what to use as the backend providing cache
|
||||||
# Can be set to either "github" or "buildjet"
|
# Can be set to "github", "buildjet", or "warpbuild"
|
||||||
# default: "github"
|
# default: "github"
|
||||||
cache-provider: ""
|
cache-provider: ""
|
||||||
|
|
||||||
# Determines whether to cache the ~/.cargo/bin directory.
|
# Determines whether to cache the ~/.cargo/bin directory.
|
||||||
# default: "true"
|
# default: "true"
|
||||||
cache-bin: ""
|
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.
|
Further examples are available in the [.github/workflows](./.github/workflows/) directory.
|
||||||
@@ -95,14 +121,14 @@ This is a boolean flag that will be set to `true` when there was an exact cache
|
|||||||
|
|
||||||
## Cache Effectiveness
|
## Cache Effectiveness
|
||||||
|
|
||||||
This action only caches the _dependencies_ of a crate, so is more effective if
|
This action only caches the _dependencies_ of a crate, so it is more effective if
|
||||||
the dependency / own code ratio is higher.
|
the dependency / own code ratio is higher.
|
||||||
|
|
||||||
It is also most effective for repositories with a `Cargo.lock` file. Library
|
It is also more effective for repositories with a `Cargo.lock` file. Library
|
||||||
repositories with only a `Cargo.toml` file have limited benefits, as cargo will
|
repositories with only a `Cargo.toml` file have limited benefits, as cargo will
|
||||||
_always_ use the most up-to-date dependency versions, which may not be cached.
|
_always_ use the most up-to-date dependency versions, which may not be cached.
|
||||||
|
|
||||||
Usage with Stable Rust is most effective, as a cache is tied to the Rust version.
|
Usage with Stable Rust is the most effective, as a cache is tied to the Rust version.
|
||||||
Using it with Nightly Rust is less effective as it will throw away the cache every day,
|
Using it with Nightly Rust is less effective as it will throw away the cache every day,
|
||||||
unless a specific nightly build is being pinned.
|
unless a specific nightly build is being pinned.
|
||||||
|
|
||||||
@@ -115,12 +141,15 @@ This action currently caches the following files/directories:
|
|||||||
|
|
||||||
This cache is automatically keyed by:
|
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),
|
- the github [`job_id`](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_id)
|
||||||
- the rustc release / host / hash,
|
(if `add-job-id-key` is `"true"`),
|
||||||
- the value of some compiler-specific environment variables (eg. RUSTFLAGS, etc), and
|
- the rustc release / host / hash (for all installed toolchains when
|
||||||
- a hash of all `Cargo.lock` / `Cargo.toml` files found anywhere in the repository (if present).
|
available),
|
||||||
- a hash of all `rust-toolchain` / `rust-toolchain.toml` files in the root of the repository (if present).
|
- the following values, if `add-rust-environment-hash-key` is `"true"`:
|
||||||
- a hash of all `.cargo/config.toml` files in the root of the repository (if present).
|
- 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).
|
||||||
|
- a hash of all `rust-toolchain` / `rust-toolchain.toml` files in the root of the repository (if present).
|
||||||
|
- a hash of all `.cargo/config.toml` files in the root of the repository (if present).
|
||||||
|
|
||||||
An additional input `key` can be provided if the builtin keys are not sufficient.
|
An additional input `key` can be provided if the builtin keys are not sufficient.
|
||||||
|
|
||||||
|
|||||||
18
action.yml
18
action.yml
@@ -12,6 +12,14 @@ inputs:
|
|||||||
key:
|
key:
|
||||||
description: "An additional cache key that is added alongside the automatic `job`-based cache key and can be used to further differentiate jobs."
|
description: "An additional cache key that is added alongside the automatic `job`-based cache key and can be used to further differentiate jobs."
|
||||||
required: false
|
required: false
|
||||||
|
add-job-id-key:
|
||||||
|
description: "If the automatic `job`-based cache key should include the job id. Defaults to true."
|
||||||
|
required: false
|
||||||
|
default: "true"
|
||||||
|
add-rust-environment-hash-key:
|
||||||
|
description: "Weather 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'. Defaults to true."
|
||||||
|
required: false
|
||||||
|
default: "true"
|
||||||
env-vars:
|
env-vars:
|
||||||
description: "Additional environment variables to include in the cache key, separated by spaces."
|
description: "Additional environment variables to include in the cache key, separated by spaces."
|
||||||
required: false
|
required: false
|
||||||
@@ -32,12 +40,16 @@ inputs:
|
|||||||
description: "Determines which crates are cached. If `true` all crates will be cached, otherwise only dependent crates will be cached."
|
description: "Determines which crates are cached. If `true` all crates will be cached, otherwise only dependent crates will be cached."
|
||||||
required: false
|
required: false
|
||||||
default: "false"
|
default: "false"
|
||||||
|
cache-workspace-crates:
|
||||||
|
description: "Similar to cache-all-crates. If `true` the workspace crates will be cached."
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
save-if:
|
save-if:
|
||||||
description: "Determiners whether the cache should be saved. If `false`, the cache is only restored."
|
description: "Determiners whether the cache should be saved. If `false`, the cache is only restored."
|
||||||
required: false
|
required: false
|
||||||
default: "true"
|
default: "true"
|
||||||
cache-provider:
|
cache-provider:
|
||||||
description: "Determines which provider to use for caching. Options are github or buildjet, defaults to github."
|
description: "Determines which provider to use for caching. Options are github, buildjet, or warpbuild. Defaults to github."
|
||||||
required: false
|
required: false
|
||||||
default: "github"
|
default: "github"
|
||||||
cache-bin:
|
cache-bin:
|
||||||
@@ -48,6 +60,10 @@ inputs:
|
|||||||
description: "Check if a cache entry exists without downloading the cache"
|
description: "Check if a cache entry exists without downloading the cache"
|
||||||
required: false
|
required: false
|
||||||
default: "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:
|
outputs:
|
||||||
cache-hit:
|
cache-hit:
|
||||||
description: "A boolean value that indicates an exact match was found."
|
description: "A boolean value that indicates an exact match was found."
|
||||||
|
|||||||
140496
dist/restore/index.js
vendored
140496
dist/restore/index.js
vendored
File diff suppressed because one or more lines are too long
140499
dist/save/index.js
vendored
140499
dist/save/index.js
vendored
File diff suppressed because one or more lines are too long
1528
package-lock.json
generated
1528
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
19
package.json
19
package.json
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"name": "rust-cache",
|
"name": "rust-cache",
|
||||||
"version": "2.7.8",
|
"version": "2.8.2",
|
||||||
"description": "A GitHub Action that implements smart caching for rust/cargo projects with sensible defaults.",
|
"description": "A GitHub Action that implements smart caching for rust/cargo projects with sensible defaults.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"actions",
|
"actions",
|
||||||
@@ -23,18 +23,19 @@
|
|||||||
"homepage": "https://github.com/Swatinem/rust-cache#readme",
|
"homepage": "https://github.com/Swatinem/rust-cache#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/buildjet-cache": "npm:github-actions.cache-buildjet@0.2.0",
|
"@actions/buildjet-cache": "npm:github-actions.cache-buildjet@0.2.0",
|
||||||
"@actions/cache": "^4.0.0",
|
"@actions/warpbuild-cache": "npm:github-actions.warp-cache@1.4.7",
|
||||||
"@actions/core": "^1.11.1",
|
"@actions/cache": "^5.0.1",
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/core": "^2.0.1",
|
||||||
|
"@actions/exec": "^2.0.0",
|
||||||
"@actions/glob": "^0.5.0",
|
"@actions/glob": "^0.5.0",
|
||||||
"@actions/io": "^1.1.3",
|
"@actions/io": "^2.0.0",
|
||||||
"smol-toml": "^1.3.0"
|
"smol-toml": "^1.5.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^22.7.5",
|
"@types/node": "^25.0.2",
|
||||||
"@vercel/ncc": "^0.38.2",
|
"@vercel/ncc": "^0.38.4",
|
||||||
"linefix": "^0.1.1",
|
"linefix": "^0.1.1",
|
||||||
"typescript": "5.7.2"
|
"typescript": "5.9.3"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "ncc build --target es2020 -o dist/restore src/restore.ts && ncc build --target es2020 -o dist/save src/save.ts && linefix dist"
|
"prepare": "ncc build --target es2020 -o dist/restore src/restore.ts && ncc build --target es2020 -o dist/save src/save.ts && linefix dist"
|
||||||
|
|||||||
262
src/config.ts
262
src/config.ts
@@ -1,8 +1,9 @@
|
|||||||
import * as core from "@actions/core";
|
import * as core from "@actions/core";
|
||||||
import * as glob from "@actions/glob";
|
import * as glob from "@actions/glob";
|
||||||
import crypto from "crypto";
|
import crypto from "crypto";
|
||||||
import fs from "fs";
|
import fs from "fs/promises";
|
||||||
import fs_promises from "fs/promises";
|
import { createReadStream } from "fs";
|
||||||
|
import { pipeline } from "stream/promises";
|
||||||
import os from "os";
|
import os from "os";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import * as toml from "smol-toml";
|
import * as toml from "smol-toml";
|
||||||
@@ -18,6 +19,9 @@ const STATE_CONFIG = "RUST_CACHE_CONFIG";
|
|||||||
const HASH_LENGTH = 8;
|
const HASH_LENGTH = 8;
|
||||||
|
|
||||||
export class CacheConfig {
|
export class CacheConfig {
|
||||||
|
/** A format string for running commands */
|
||||||
|
public cmdFormat: string = "";
|
||||||
|
|
||||||
/** All the paths we want to cache */
|
/** All the paths we want to cache */
|
||||||
public cachePaths: Array<string> = [];
|
public cachePaths: Array<string> = [];
|
||||||
/** The primary cache key */
|
/** The primary cache key */
|
||||||
@@ -37,7 +41,7 @@ export class CacheConfig {
|
|||||||
/** The prefix portion of the cache key */
|
/** The prefix portion of the cache key */
|
||||||
private keyPrefix = "";
|
private keyPrefix = "";
|
||||||
/** The rust version considered for the cache key */
|
/** The rust version considered for the cache key */
|
||||||
private keyRust = "";
|
private keyRust: Array<string> = [];
|
||||||
/** The environment variables considered for the cache key */
|
/** The environment variables considered for the cache key */
|
||||||
private keyEnvs: Array<string> = [];
|
private keyEnvs: Array<string> = [];
|
||||||
/** The files considered for the cache key */
|
/** The files considered for the cache key */
|
||||||
@@ -53,6 +57,17 @@ export class CacheConfig {
|
|||||||
static async new(): Promise<CacheConfig> {
|
static async new(): Promise<CacheConfig> {
|
||||||
const self = new 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:
|
// Construct key prefix:
|
||||||
// This uses either the `shared-key` input,
|
// This uses either the `shared-key` input,
|
||||||
// or the `key` input combined with the `job` key.
|
// or the `key` input combined with the `job` key.
|
||||||
@@ -69,7 +84,7 @@ export class CacheConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const job = process.env.GITHUB_JOB;
|
const job = process.env.GITHUB_JOB;
|
||||||
if (job) {
|
if ((job) && core.getInput("add-job-id-key").toLowerCase() == "true") {
|
||||||
key += `-${job}`;
|
key += `-${job}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -89,14 +104,16 @@ export class CacheConfig {
|
|||||||
// resulting environment hash.
|
// resulting environment hash.
|
||||||
|
|
||||||
let hasher = crypto.createHash("sha1");
|
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}`;
|
for (const rustVersion of rustVersions) {
|
||||||
hasher.update(keyRust);
|
const { release, host, "commit-hash": commitHash } = rustVersion;
|
||||||
hasher.update(rustVersion["commit-hash"]);
|
const keyRust = `${release} ${host} ${commitHash}`;
|
||||||
|
hasher.update(keyRust);
|
||||||
keyRust += ` (${rustVersion["commit-hash"]})`;
|
self.keyRust.push(keyRust);
|
||||||
self.keyRust = keyRust;
|
}
|
||||||
|
|
||||||
// these prefixes should cover most of the compiler / rust / cargo keys
|
// these prefixes should cover most of the compiler / rust / cargo keys
|
||||||
const envPrefixes = ["CARGO", "CC", "CFLAGS", "CXX", "CMAKE", "RUST"];
|
const envPrefixes = ["CARGO", "CC", "CFLAGS", "CXX", "CMAKE", "RUST"];
|
||||||
@@ -116,7 +133,10 @@ export class CacheConfig {
|
|||||||
|
|
||||||
self.keyEnvs = keyEnvs;
|
self.keyEnvs = keyEnvs;
|
||||||
|
|
||||||
key += `-${digest(hasher)}`;
|
// Add job hash suffix if 'add-rust-environment-hash-key' is true
|
||||||
|
if (core.getInput("add-rust-environment-hash-key").toLowerCase() == "true") {
|
||||||
|
key += `-${digest(hasher)}`;
|
||||||
|
}
|
||||||
|
|
||||||
self.restoreKey = key;
|
self.restoreKey = key;
|
||||||
|
|
||||||
@@ -139,111 +159,113 @@ export class CacheConfig {
|
|||||||
}
|
}
|
||||||
self.workspaces = workspaces;
|
self.workspaces = workspaces;
|
||||||
|
|
||||||
let keyFiles = await globFiles(".cargo/config.toml\nrust-toolchain\nrust-toolchain.toml");
|
// Add hash suffix of all rust environment lockfiles + manifests if
|
||||||
const parsedKeyFiles = []; // keyFiles that are parsed, pre-processed and hashed
|
// 'add-rust-environment-hash-key' is true
|
||||||
|
if (core.getInput("add-rust-environment-hash-key").toLowerCase() == "true") {
|
||||||
|
let keyFiles = await globFiles(".cargo/config.toml\nrust-toolchain\nrust-toolchain.toml");
|
||||||
|
const parsedKeyFiles = []; // keyFiles that are parsed, pre-processed and hashed
|
||||||
|
|
||||||
hasher = crypto.createHash("sha1");
|
hasher = crypto.createHash("sha1");
|
||||||
|
|
||||||
for (const workspace of workspaces) {
|
for (const workspace of workspaces) {
|
||||||
const root = workspace.root;
|
const root = workspace.root;
|
||||||
keyFiles.push(
|
keyFiles.push(
|
||||||
...(await globFiles(
|
...(await globFiles(
|
||||||
`${root}/**/.cargo/config.toml\n${root}/**/rust-toolchain\n${root}/**/rust-toolchain.toml`,
|
`${root}/**/.cargo/config.toml\n${root}/**/rust-toolchain\n${root}/**/rust-toolchain.toml`,
|
||||||
)),
|
)),
|
||||||
);
|
);
|
||||||
|
|
||||||
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")));
|
const cargo_manifests = sort_and_uniq(workspaceMembers.map((member) => path.join(member.path, "Cargo.toml")));
|
||||||
|
|
||||||
for (const cargo_manifest of cargo_manifests) {
|
for (const cargo_manifest of cargo_manifests) {
|
||||||
try {
|
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
|
// Use any since TomlPrimitive is not exposed
|
||||||
const parsed = toml.parse(content) as { [key: string]: any };
|
const parsed = toml.parse(content) as { [key: string]: any };
|
||||||
|
|
||||||
if ("package" in parsed) {
|
if ("package" in parsed) {
|
||||||
const pack = parsed.package;
|
const pack = parsed.package;
|
||||||
if ("version" in pack) {
|
if ("version" in pack) {
|
||||||
pack["version"] = "0.0.0";
|
pack["version"] = "0.0.0";
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const prefix of ["", "build-", "dev-"]) {
|
|
||||||
const section_name = `${prefix}dependencies`;
|
|
||||||
if (!(section_name in parsed)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
const deps = parsed[section_name];
|
|
||||||
|
|
||||||
for (const key of Object.keys(deps)) {
|
|
||||||
const dep = deps[key];
|
|
||||||
|
|
||||||
try {
|
|
||||||
if ("path" in dep) {
|
|
||||||
dep.version = "0.0.0";
|
|
||||||
dep.path = "";
|
|
||||||
}
|
|
||||||
} catch (_e) {
|
|
||||||
// Not an object, probably a string (version),
|
|
||||||
// continue.
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (const prefix of ["", "build-", "dev-"]) {
|
||||||
|
const section_name = `${prefix}dependencies`;
|
||||||
|
if (!(section_name in parsed)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
const deps = parsed[section_name];
|
||||||
|
|
||||||
|
for (const key of Object.keys(deps)) {
|
||||||
|
const dep = deps[key];
|
||||||
|
|
||||||
|
try {
|
||||||
|
if ("path" in dep) {
|
||||||
|
dep.version = "0.0.0";
|
||||||
|
dep.path = "";
|
||||||
|
}
|
||||||
|
} catch (_e) {
|
||||||
|
// Not an object, probably a string (version),
|
||||||
|
// continue.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hasher.update(JSON.stringify(parsed));
|
||||||
|
|
||||||
|
parsedKeyFiles.push(cargo_manifest);
|
||||||
|
} catch (e) {
|
||||||
|
// Fallback to caching them as regular file
|
||||||
|
core.warning(`Error parsing Cargo.toml manifest, fallback to caching entire file: ${e}`);
|
||||||
|
keyFiles.push(cargo_manifest);
|
||||||
}
|
}
|
||||||
|
|
||||||
hasher.update(JSON.stringify(parsed));
|
|
||||||
|
|
||||||
parsedKeyFiles.push(cargo_manifest);
|
|
||||||
} catch (e) {
|
|
||||||
// Fallback to caching them as regular file
|
|
||||||
core.warning(`Error parsing Cargo.toml manifest, fallback to caching entire file: ${e}`);
|
|
||||||
keyFiles.push(cargo_manifest);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
const cargo_lock = path.join(workspace.root, "Cargo.lock");
|
const cargo_lock = path.join(workspace.root, "Cargo.lock");
|
||||||
if (await exists(cargo_lock)) {
|
if (await exists(cargo_lock)) {
|
||||||
try {
|
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);
|
const parsed = toml.parse(content);
|
||||||
|
|
||||||
if ((parsed.version !== 3 && parsed.version !== 4) || !("package" in parsed)) {
|
if ((parsed.version !== 3 && parsed.version !== 4) || !("package" in parsed)) {
|
||||||
// Fallback to caching them as regular file since this action
|
// Fallback to caching them as regular file since this action
|
||||||
// can only handle Cargo.lock format version 3
|
// can only handle Cargo.lock format version 3
|
||||||
core.warning("Unsupported Cargo.lock format, fallback to caching entire file");
|
core.warning("Unsupported Cargo.lock format, fallback to caching entire file");
|
||||||
|
keyFiles.push(cargo_lock);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Package without `[[package]].source` and `[[package]].checksum`
|
||||||
|
// are the one with `path = "..."` to crates within the workspace.
|
||||||
|
const packages = (parsed.package as any[]).filter((p: any) => "source" in p || "checksum" in p);
|
||||||
|
|
||||||
|
hasher.update(JSON.stringify(packages));
|
||||||
|
|
||||||
|
parsedKeyFiles.push(cargo_lock);
|
||||||
|
} catch (e) {
|
||||||
|
// Fallback to caching them as regular file
|
||||||
|
core.warning(`Error parsing Cargo.lock manifest, fallback to caching entire file: ${e}`);
|
||||||
keyFiles.push(cargo_lock);
|
keyFiles.push(cargo_lock);
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Package without `[[package]].source` and `[[package]].checksum`
|
|
||||||
// are the one with `path = "..."` to crates within the workspace.
|
|
||||||
const packages = (parsed.package as any[]).filter((p: any) => "source" in p || "checksum" in p);
|
|
||||||
|
|
||||||
hasher.update(JSON.stringify(packages));
|
|
||||||
|
|
||||||
parsedKeyFiles.push(cargo_lock);
|
|
||||||
} catch (e) {
|
|
||||||
// Fallback to caching them as regular file
|
|
||||||
core.warning(`Error parsing Cargo.lock manifest, fallback to caching entire file: ${e}`);
|
|
||||||
keyFiles.push(cargo_lock);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
keyFiles = sort_and_uniq(keyFiles);
|
||||||
keyFiles = sort_and_uniq(keyFiles);
|
|
||||||
|
|
||||||
for (const file of keyFiles) {
|
for (const file of keyFiles) {
|
||||||
for await (const chunk of fs.createReadStream(file)) {
|
await pipeline(createReadStream(file), hasher);
|
||||||
hasher.update(chunk);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
keyFiles.push(...parsedKeyFiles);
|
||||||
|
self.keyFiles = sort_and_uniq(keyFiles);
|
||||||
|
|
||||||
|
let lockHash = digest(hasher);
|
||||||
|
key += `-${lockHash}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
let lockHash = digest(hasher);
|
|
||||||
|
|
||||||
keyFiles.push(...parsedKeyFiles);
|
|
||||||
self.keyFiles = sort_and_uniq(keyFiles);
|
|
||||||
|
|
||||||
key += `-${lockHash}`;
|
|
||||||
self.cacheKey = key;
|
self.cacheKey = key;
|
||||||
|
|
||||||
self.cachePaths = [path.join(CARGO_HOME, "registry"), path.join(CARGO_HOME, "git")];
|
self.cachePaths = [path.join(CARGO_HOME, "registry"), path.join(CARGO_HOME, "git")];
|
||||||
@@ -314,7 +336,10 @@ export class CacheConfig {
|
|||||||
core.info(`.. Prefix:`);
|
core.info(`.. Prefix:`);
|
||||||
core.info(` - ${this.keyPrefix}`);
|
core.info(` - ${this.keyPrefix}`);
|
||||||
core.info(`.. Environment considered:`);
|
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) {
|
for (const env of this.keyEnvs) {
|
||||||
core.info(` - ${env}`);
|
core.info(` - ${env}`);
|
||||||
}
|
}
|
||||||
@@ -359,9 +384,33 @@ interface RustVersion {
|
|||||||
"commit-hash": string;
|
"commit-hash": string;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getRustVersion(): Promise<RustVersion> {
|
async function getRustVersions(cmdFormat: string): Promise<Set<RustVersion>> {
|
||||||
const stdout = await getCmdOutput("rustc", ["-vV"]);
|
const versions = new Set<RustVersion>();
|
||||||
let splits = stdout
|
|
||||||
|
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]+/)
|
.split(/[\n\r]+/)
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
.map((s) => s.split(":").map((s) => s.trim()))
|
.map((s) => s.split(":").map((s) => s.trim()))
|
||||||
@@ -373,10 +422,17 @@ async function globFiles(pattern: string): Promise<string[]> {
|
|||||||
const globber = await glob.create(pattern, {
|
const globber = await glob.create(pattern, {
|
||||||
followSymbolicLinks: false,
|
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 it pointed to, so isFile would make sure the resolved
|
||||||
// file is actually a regular file.
|
// 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[]) {
|
function sort_and_uniq(a: string[]) {
|
||||||
|
|||||||
@@ -42,7 +42,9 @@ async function run() {
|
|||||||
lookupOnly,
|
lookupOnly,
|
||||||
});
|
});
|
||||||
if (restoreKey) {
|
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}.`);
|
core.info(`${lookupOnly ? "Found" : "Restored from"} cache key "${restoreKey}" full match: ${match}.`);
|
||||||
if (!match) {
|
if (!match) {
|
||||||
// pre-clean the target directory on cache mismatch
|
// pre-clean the target directory on cache mismatch
|
||||||
|
|||||||
@@ -36,9 +36,14 @@ async function run() {
|
|||||||
await macOsWorkaround();
|
await macOsWorkaround();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const workspaceCrates = core.getInput("cache-workspace-crates").toLowerCase() || "false";
|
||||||
const allPackages = [];
|
const allPackages = [];
|
||||||
for (const workspace of config.workspaces) {
|
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(config.cmdFormat);
|
||||||
|
packages.push(...wsMembers);
|
||||||
|
}
|
||||||
allPackages.push(...packages);
|
allPackages.push(...packages);
|
||||||
try {
|
try {
|
||||||
core.info(`... Cleaning ${workspace.target} ...`);
|
core.info(`... Cleaning ${workspace.target} ...`);
|
||||||
|
|||||||
33
src/utils.ts
33
src/utils.ts
@@ -1,6 +1,7 @@
|
|||||||
import * as core from "@actions/core";
|
import * as core from "@actions/core";
|
||||||
import * as exec from "@actions/exec";
|
import * as exec from "@actions/exec";
|
||||||
import * as buildjetCache from "@actions/buildjet-cache";
|
import * as buildjetCache from "@actions/buildjet-cache";
|
||||||
|
import * as warpbuildCache from "@actions/warpbuild-cache";
|
||||||
import * as ghCache from "@actions/cache";
|
import * as ghCache from "@actions/cache";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
|
|
||||||
@@ -15,14 +16,15 @@ export function reportError(e: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function getCmdOutput(
|
export async function getCmdOutput(
|
||||||
|
cmdFormat: string,
|
||||||
cmd: string,
|
cmd: string,
|
||||||
args: Array<string> = [],
|
|
||||||
options: exec.ExecOptions = {},
|
options: exec.ExecOptions = {},
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
|
cmd = cmdFormat.replace("{0}", cmd);
|
||||||
let stdout = "";
|
let stdout = "";
|
||||||
let stderr = "";
|
let stderr = "";
|
||||||
try {
|
try {
|
||||||
await exec.exec(cmd, args, {
|
await exec.exec(cmd, [], {
|
||||||
silent: true,
|
silent: true,
|
||||||
listeners: {
|
listeners: {
|
||||||
stdout(data) {
|
stdout(data) {
|
||||||
@@ -36,7 +38,7 @@ export async function getCmdOutput(
|
|||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
(e as any).commandFailed = {
|
(e as any).commandFailed = {
|
||||||
command: `${cmd} ${args.join(" ")}`,
|
command: cmd,
|
||||||
stderr,
|
stderr,
|
||||||
};
|
};
|
||||||
throw e;
|
throw e;
|
||||||
@@ -44,17 +46,32 @@ export async function getCmdOutput(
|
|||||||
return stdout;
|
return stdout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface GhCache {
|
||||||
|
isFeatureAvailable: typeof ghCache.isFeatureAvailable;
|
||||||
|
restoreCache: typeof ghCache.restoreCache;
|
||||||
|
saveCache: (paths: string[], key: string) => Promise<string | number>;
|
||||||
|
}
|
||||||
|
|
||||||
export interface CacheProvider {
|
export interface CacheProvider {
|
||||||
name: string;
|
name: string;
|
||||||
cache: typeof ghCache;
|
cache: GhCache;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getCacheProvider(): CacheProvider {
|
export function getCacheProvider(): CacheProvider {
|
||||||
const cacheProvider = core.getInput("cache-provider");
|
const cacheProvider = core.getInput("cache-provider");
|
||||||
const cache = cacheProvider === "github" ? ghCache : cacheProvider === "buildjet" ? buildjetCache : undefined;
|
let cache: GhCache;
|
||||||
|
switch (cacheProvider) {
|
||||||
if (!cache) {
|
case "github":
|
||||||
throw new Error(`The \`cache-provider\` \`{cacheProvider}\` is not valid.`);
|
cache = ghCache;
|
||||||
|
break;
|
||||||
|
case "buildjet":
|
||||||
|
cache = buildjetCache;
|
||||||
|
break;
|
||||||
|
case "warpbuild":
|
||||||
|
cache = warpbuildCache;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new Error(`The \`cache-provider\` \`${cacheProvider}\` is not valid.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -8,13 +8,15 @@ const SAVE_TARGETS = new Set(["lib", "proc-macro"]);
|
|||||||
export class Workspace {
|
export class Workspace {
|
||||||
constructor(public root: string, public target: string) {}
|
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 = [];
|
let packages: Packages = [];
|
||||||
try {
|
try {
|
||||||
core.debug(`collecting metadata for "${this.root}"`);
|
core.debug(`collecting metadata for "${this.root}"`);
|
||||||
const meta: Meta = JSON.parse(
|
const meta: Meta = JSON.parse(
|
||||||
await getCmdOutput("cargo", ["metadata", "--all-features", "--format-version", "1", ...extraArgs], {
|
await getCmdOutput(cmdFormat, cmd, {
|
||||||
cwd: this.root,
|
cwd: this.root,
|
||||||
|
env: { ...process.env, "CARGO_ENCODED_RUSTFLAGS": "" },
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
core.debug(`workspace "${this.root}" has ${meta.packages.length} packages`);
|
core.debug(`workspace "${this.root}" has ${meta.packages.length} packages`);
|
||||||
@@ -28,12 +30,12 @@ export class Workspace {
|
|||||||
return packages;
|
return packages;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getPackagesOutsideWorkspaceRoot(): Promise<Packages> {
|
public async getPackagesOutsideWorkspaceRoot(cmdFormat: string): Promise<Packages> {
|
||||||
return await this.getPackages((pkg) => !pkg.manifest_path.startsWith(this.root));
|
return await this.getPackages(cmdFormat, (pkg) => !pkg.manifest_path.startsWith(this.root));
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getWorkspaceMembers(): Promise<Packages> {
|
public async getWorkspaceMembers(cmdFormat: string): Promise<Packages> {
|
||||||
return await this.getPackages((_) => true, "--no-deps");
|
return await this.getPackages(cmdFormat, (_) => true, "--no-deps");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
1393
tests/Cargo.lock
generated
1393
tests/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -8,10 +8,10 @@ edition = "2021"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
reqwest = "0.12.1"
|
reqwest = "0.12.1"
|
||||||
jsonpath_lib_polars_vendor = "0.0.1"
|
jsonpath_lib_polars_vendor = "0.0.1"
|
||||||
watto = { git = "https://github.com/getsentry/watto", rev = "d71c8218506bddba102a124a460d64da25e303dc", features = ["strings"] }
|
watto = { git = "https://github.com/getsentry/watto", rev = "39ccb9add289c1f23c89f40506f4a80b2f4011b9", features = ["strings"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
trybuild = "1"
|
trybuild = "1"
|
||||||
|
|
||||||
[target.'cfg(not(target_env = "msvc"))'.dependencies]
|
[target.'cfg(not(target_env = "msvc"))'.dependencies]
|
||||||
tikv-jemallocator = "0.5.4"
|
tikv-jemallocator = "0.6.0"
|
||||||
|
|||||||
31
tests/flake.nix
Normal file
31
tests/flake.nix
Normal 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";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -2,4 +2,4 @@ error[E0599]: no method named `foobar` found for reference `&'static str` in the
|
|||||||
--> tests/trybuild/fail_to_compile.rs:2:14
|
--> tests/trybuild/fail_to_compile.rs:2:14
|
||||||
|
|
|
|
||||||
2 | "foobar".foobar();
|
2 | "foobar".foobar();
|
||||||
| ^^^^^^ method not found in `&str`
|
| ^^^^^^ method not found in `&'static str`
|
||||||
|
|||||||
1578
tests/wasm-workspace/Cargo.lock
generated
1578
tests/wasm-workspace/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,5 @@
|
|||||||
[workspace]
|
[workspace]
|
||||||
|
resolver = "2"
|
||||||
members = [
|
members = [
|
||||||
"crates/one",
|
"crates/one",
|
||||||
"crates/two",
|
"crates/two",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
reqwest = "0.11.0"
|
reqwest = "0.12"
|
||||||
async-std = "1"
|
async-std = "1"
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
tracing-futures = "0.2"
|
tracing-futures = "0.2"
|
||||||
|
|||||||
@@ -5,4 +5,4 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = "3"
|
clap = "4"
|
||||||
|
|||||||
Reference in New Issue
Block a user