mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-12-15 11:07:14 +00:00
Compare commits
18 Commits
v5.2.2
...
always-fal
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
688d12e3be | ||
|
|
58765bf77f | ||
|
|
754a7d4c2d | ||
|
|
b498c74bf4 | ||
|
|
b9ef7bd2eb | ||
|
|
1edb52594c | ||
|
|
a4fbf7b827 | ||
|
|
c122541d0b | ||
|
|
7c47ef9ebd | ||
|
|
e2e9087257 | ||
|
|
bb8d247e1a | ||
|
|
1ffa6dc3ad | ||
|
|
ee84cf5cb8 | ||
|
|
f95cd8710c | ||
|
|
61ee7954c6 | ||
|
|
cad8337f4e | ||
|
|
a4c8ae423e | ||
|
|
afa3c8c42b |
11
.github/workflows/test.yml
vendored
11
.github/workflows/test.yml
vendored
@@ -200,7 +200,6 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
test-malformed-pyproject-file-fallback:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -212,3 +211,13 @@ jobs:
|
||||
pyproject-file: "__tests__/fixtures/malformed-pyproject-toml-project/pyproject.toml"
|
||||
- run: uv sync
|
||||
working-directory: __tests__/fixtures/uv-project
|
||||
test-musl:
|
||||
runs-on: ubuntu-latest
|
||||
container: alpine
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install latest version
|
||||
uses: ./
|
||||
- run: apk add python3
|
||||
- run: uv sync
|
||||
working-directory: __tests__/fixtures/uv-project
|
||||
|
||||
4
.github/workflows/update-known-checksums.yml
vendored
4
.github/workflows/update-known-checksums.yml
vendored
@@ -1,6 +1,8 @@
|
||||
name: "Update known checksums"
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 4 * * *" # Run every day at 4am UTC
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -17,7 +19,7 @@ jobs:
|
||||
src/download/checksum/known-checksums.ts ${{ secrets.GITHUB_TOKEN }}
|
||||
- run: npm install && npm run all
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6
|
||||
uses: peter-evans/create-pull-request@dd2324fc52d5d43c699a5636bcf19fceaa70c284 # v7.0.7
|
||||
with:
|
||||
commit-message: "chore: update known checksums"
|
||||
title:
|
||||
|
||||
35
README.md
35
README.md
@@ -156,6 +156,7 @@ are automatically verified by this action. The sha256 hashes can be found on the
|
||||
|
||||
If you enable caching, the [uv cache](https://docs.astral.sh/uv/concepts/cache/) will be uploaded to
|
||||
the GitHub Actions cache. This can speed up runs that reuse the cache by several minutes.
|
||||
Caching is enabled by default on GitHub-hosted runners.
|
||||
|
||||
> [!TIP]
|
||||
>
|
||||
@@ -412,6 +413,40 @@ output:
|
||||
run: echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}"
|
||||
```
|
||||
|
||||
### Should I include the resolution strategy in the cache key?
|
||||
|
||||
**Yes!**
|
||||
|
||||
The cache key gets computed by using the [cache-dependency-glob](#cache-dependency-glob).
|
||||
|
||||
If you
|
||||
have jobs which use the same dependency definitions from `requirements.txt` or
|
||||
`pyproject.toml` but different
|
||||
[resolution strategies](https://docs.astral.sh/uv/concepts/resolution/#resolution-strategy),
|
||||
each job will have different dependencies or dependency versions.
|
||||
But if you do not add the resolution strategy as a [cache-suffix](#enable-caching),
|
||||
they will have the same cache key.
|
||||
|
||||
This means the first job which starts uploading its cache will win and all other job will fail
|
||||
uploading the cache,
|
||||
because they try to upload with the same cache key.
|
||||
|
||||
You might see errors like
|
||||
`Failed to save: Failed to CreateCacheEntry: Received non-retryable error: Failed request: (409) Conflict: cache entry with the same key, version, and scope already exists`
|
||||
|
||||
### Why do I see warnings like `Cache not found for keys`
|
||||
|
||||
When a workflow runs for the first time on a branch and has a new cache key, because the
|
||||
[cache-dependency-glob](#cache-dependency-glob) found changed files (changed dependencies),
|
||||
the cache will not be found and the warning `Cache not found for keys` will be printed.
|
||||
|
||||
While this might be irritating at first, it is expected behaviour and the cache will be created
|
||||
and reused in later workflows.
|
||||
|
||||
The reason for the warning is, that we have to way to know if this is the first run of a new
|
||||
cache key or the user accidentally misconfigured the [cache-dependency-glob](#cache-dependency-glob)
|
||||
or [cache-suffix](#enable-caching) and the cache never gets used.
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
`setup-uv` was initially written and published by [Kevin Stillhammer](https://github.com/eifinger)
|
||||
|
||||
44481
dist/save-cache/index.js
generated
vendored
44481
dist/save-cache/index.js
generated
vendored
File diff suppressed because one or more lines are too long
48835
dist/setup/index.js
generated
vendored
48835
dist/setup/index.js
generated
vendored
File diff suppressed because one or more lines are too long
46773
dist/update-known-checksums/index.js
generated
vendored
46773
dist/update-known-checksums/index.js
generated
vendored
File diff suppressed because one or more lines are too long
124
package-lock.json
generated
124
package-lock.json
generated
@@ -18,7 +18,8 @@
|
||||
"@octokit/core": "^6.1.3",
|
||||
"@octokit/plugin-paginate-rest": "^11.4.0",
|
||||
"@octokit/plugin-rest-endpoint-methods": "^13.3.0",
|
||||
"smol-toml": "^1.3.1"
|
||||
"smol-toml": "^1.3.1",
|
||||
"undici": "^6.19.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "1.9.4",
|
||||
@@ -93,6 +94,17 @@
|
||||
"undici": "^5.25.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/http-client/node_modules/undici": {
|
||||
"version": "5.28.5",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz",
|
||||
"integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==",
|
||||
"dependencies": {
|
||||
"@fastify/busboy": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/io": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz",
|
||||
@@ -1087,9 +1099,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@fastify/busboy": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz",
|
||||
"integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==",
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",
|
||||
"integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
}
|
||||
@@ -1602,9 +1614,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/endpoint": {
|
||||
"version": "10.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.2.tgz",
|
||||
"integrity": "sha512-XybpFv9Ms4hX5OCHMZqyODYqGTZ3H6K6Vva+M9LR7ib/xr1y1ZnlChYv9H680y77Vd/i/k+thXApeRASBQkzhA==",
|
||||
"version": "10.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.3.tgz",
|
||||
"integrity": "sha512-nBRBMpKPhQUxCsQQeW+rCJ/OPSMcj3g0nfHn01zGYZXuNDvvXudF/TYY6APj5THlurerpFN4a/dQAIAaM6BYhA==",
|
||||
"dependencies": {
|
||||
"@octokit/types": "^13.6.2",
|
||||
"universal-user-agent": "^7.0.2"
|
||||
@@ -1632,9 +1644,9 @@
|
||||
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g=="
|
||||
},
|
||||
"node_modules/@octokit/plugin-paginate-rest": {
|
||||
"version": "11.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.4.0.tgz",
|
||||
"integrity": "sha512-ttpGck5AYWkwMkMazNCZMqxKqIq1fJBNxBfsFwwfyYKTf914jKkLF0POMS3YkPBwp5g1c2Y4L79gDz01GhSr1g==",
|
||||
"version": "11.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.4.3.tgz",
|
||||
"integrity": "sha512-tBXaAbXkqVJlRoA/zQVe9mUdb8rScmivqtpv3ovsC5xhje/a+NOCivs7eUhWBwCApJVsR4G5HMeaLbq7PxqZGA==",
|
||||
"dependencies": {
|
||||
"@octokit/types": "^13.7.0"
|
||||
},
|
||||
@@ -1660,12 +1672,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/request": {
|
||||
"version": "9.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.2.0.tgz",
|
||||
"integrity": "sha512-kXLfcxhC4ozCnAXy2ff+cSxpcF0A1UqxjvYMqNuPIeOAzJbVWQ+dy5G2fTylofB/gTbObT8O6JORab+5XtA1Kw==",
|
||||
"version": "9.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.2.2.tgz",
|
||||
"integrity": "sha512-dZl0ZHx6gOQGcffgm1/Sf6JfEpmh34v3Af2Uci02vzUYz6qEN6zepoRtmybWXIGXFIK8K9ylE3b+duCWqhArtg==",
|
||||
"dependencies": {
|
||||
"@octokit/endpoint": "^10.0.0",
|
||||
"@octokit/request-error": "^6.0.1",
|
||||
"@octokit/endpoint": "^10.1.3",
|
||||
"@octokit/request-error": "^6.1.7",
|
||||
"@octokit/types": "^13.6.2",
|
||||
"fast-content-type-parse": "^2.0.0",
|
||||
"universal-user-agent": "^7.0.2"
|
||||
@@ -1675,9 +1687,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/request-error": {
|
||||
"version": "6.1.6",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.6.tgz",
|
||||
"integrity": "sha512-pqnVKYo/at0NuOjinrgcQYpEbv4snvP3bKMRqHaD9kIsk9u1LCpb2smHZi8/qJfgeNqLo5hNW4Z7FezNdEo0xg==",
|
||||
"version": "6.1.7",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.7.tgz",
|
||||
"integrity": "sha512-69NIppAwaauwZv6aOzb+VVLwt+0havz9GT5YplkeJv7fG7a40qpLt/yZKyiDxAhgz0EtgNdNcb96Z0u+Zyuy2g==",
|
||||
"dependencies": {
|
||||
"@octokit/types": "^13.6.2"
|
||||
},
|
||||
@@ -1686,9 +1698,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/types": {
|
||||
"version": "13.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.7.0.tgz",
|
||||
"integrity": "sha512-BXfRP+3P3IN6fd4uF3SniaHKOO4UXWBfkdR3vA8mIvaoO/wLjGN5qivUtW0QRitBHHMcfC41SLhNVYIZZE+wkA==",
|
||||
"version": "13.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
|
||||
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
|
||||
"dependencies": {
|
||||
"@octokit/openapi-types": "^23.0.1"
|
||||
}
|
||||
@@ -4659,14 +4671,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/undici": {
|
||||
"version": "5.28.5",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz",
|
||||
"integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==",
|
||||
"dependencies": {
|
||||
"@fastify/busboy": "^2.0.0"
|
||||
},
|
||||
"version": "6.21.1",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-6.21.1.tgz",
|
||||
"integrity": "sha512-q/1rj5D0/zayJB2FraXdaWxbhWiNKDvu8naDT2dl1yTlvJp4BLtOcp2a5BvgGNQpYYJzau7tf1WgKv3b+7mqpQ==",
|
||||
"engines": {
|
||||
"node": ">=14.0"
|
||||
"node": ">=18.17"
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
@@ -4944,6 +4953,16 @@
|
||||
"requires": {
|
||||
"tunnel": "^0.0.6",
|
||||
"undici": "^5.25.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"undici": {
|
||||
"version": "5.28.5",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz",
|
||||
"integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==",
|
||||
"requires": {
|
||||
"@fastify/busboy": "^2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@actions/io": {
|
||||
@@ -5688,9 +5707,9 @@
|
||||
"optional": true
|
||||
},
|
||||
"@fastify/busboy": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz",
|
||||
"integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA=="
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",
|
||||
"integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA=="
|
||||
},
|
||||
"@istanbuljs/load-nyc-config": {
|
||||
"version": "1.1.0",
|
||||
@@ -6089,9 +6108,9 @@
|
||||
}
|
||||
},
|
||||
"@octokit/endpoint": {
|
||||
"version": "10.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.2.tgz",
|
||||
"integrity": "sha512-XybpFv9Ms4hX5OCHMZqyODYqGTZ3H6K6Vva+M9LR7ib/xr1y1ZnlChYv9H680y77Vd/i/k+thXApeRASBQkzhA==",
|
||||
"version": "10.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.3.tgz",
|
||||
"integrity": "sha512-nBRBMpKPhQUxCsQQeW+rCJ/OPSMcj3g0nfHn01zGYZXuNDvvXudF/TYY6APj5THlurerpFN4a/dQAIAaM6BYhA==",
|
||||
"requires": {
|
||||
"@octokit/types": "^13.6.2",
|
||||
"universal-user-agent": "^7.0.2"
|
||||
@@ -6113,9 +6132,9 @@
|
||||
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g=="
|
||||
},
|
||||
"@octokit/plugin-paginate-rest": {
|
||||
"version": "11.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.4.0.tgz",
|
||||
"integrity": "sha512-ttpGck5AYWkwMkMazNCZMqxKqIq1fJBNxBfsFwwfyYKTf914jKkLF0POMS3YkPBwp5g1c2Y4L79gDz01GhSr1g==",
|
||||
"version": "11.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.4.3.tgz",
|
||||
"integrity": "sha512-tBXaAbXkqVJlRoA/zQVe9mUdb8rScmivqtpv3ovsC5xhje/a+NOCivs7eUhWBwCApJVsR4G5HMeaLbq7PxqZGA==",
|
||||
"requires": {
|
||||
"@octokit/types": "^13.7.0"
|
||||
}
|
||||
@@ -6129,29 +6148,29 @@
|
||||
}
|
||||
},
|
||||
"@octokit/request": {
|
||||
"version": "9.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.2.0.tgz",
|
||||
"integrity": "sha512-kXLfcxhC4ozCnAXy2ff+cSxpcF0A1UqxjvYMqNuPIeOAzJbVWQ+dy5G2fTylofB/gTbObT8O6JORab+5XtA1Kw==",
|
||||
"version": "9.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.2.2.tgz",
|
||||
"integrity": "sha512-dZl0ZHx6gOQGcffgm1/Sf6JfEpmh34v3Af2Uci02vzUYz6qEN6zepoRtmybWXIGXFIK8K9ylE3b+duCWqhArtg==",
|
||||
"requires": {
|
||||
"@octokit/endpoint": "^10.0.0",
|
||||
"@octokit/request-error": "^6.0.1",
|
||||
"@octokit/endpoint": "^10.1.3",
|
||||
"@octokit/request-error": "^6.1.7",
|
||||
"@octokit/types": "^13.6.2",
|
||||
"fast-content-type-parse": "^2.0.0",
|
||||
"universal-user-agent": "^7.0.2"
|
||||
}
|
||||
},
|
||||
"@octokit/request-error": {
|
||||
"version": "6.1.6",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.6.tgz",
|
||||
"integrity": "sha512-pqnVKYo/at0NuOjinrgcQYpEbv4snvP3bKMRqHaD9kIsk9u1LCpb2smHZi8/qJfgeNqLo5hNW4Z7FezNdEo0xg==",
|
||||
"version": "6.1.7",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.7.tgz",
|
||||
"integrity": "sha512-69NIppAwaauwZv6aOzb+VVLwt+0havz9GT5YplkeJv7fG7a40qpLt/yZKyiDxAhgz0EtgNdNcb96Z0u+Zyuy2g==",
|
||||
"requires": {
|
||||
"@octokit/types": "^13.6.2"
|
||||
}
|
||||
},
|
||||
"@octokit/types": {
|
||||
"version": "13.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.7.0.tgz",
|
||||
"integrity": "sha512-BXfRP+3P3IN6fd4uF3SniaHKOO4UXWBfkdR3vA8mIvaoO/wLjGN5qivUtW0QRitBHHMcfC41SLhNVYIZZE+wkA==",
|
||||
"version": "13.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
|
||||
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
|
||||
"requires": {
|
||||
"@octokit/openapi-types": "^23.0.1"
|
||||
}
|
||||
@@ -8365,12 +8384,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"undici": {
|
||||
"version": "5.28.5",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz",
|
||||
"integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==",
|
||||
"requires": {
|
||||
"@fastify/busboy": "^2.0.0"
|
||||
}
|
||||
"version": "6.21.1",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-6.21.1.tgz",
|
||||
"integrity": "sha512-q/1rj5D0/zayJB2FraXdaWxbhWiNKDvu8naDT2dl1yTlvJp4BLtOcp2a5BvgGNQpYYJzau7tf1WgKv3b+7mqpQ=="
|
||||
},
|
||||
"undici-types": {
|
||||
"version": "6.20.0",
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
"@octokit/core": "^6.1.3",
|
||||
"@octokit/plugin-paginate-rest": "^11.4.0",
|
||||
"@octokit/plugin-rest-endpoint-methods": "^13.3.0",
|
||||
"undici": "^6.19.8",
|
||||
"smol-toml": "^1.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
3
src/cache/restore-cache.ts
vendored
3
src/cache/restore-cache.ts
vendored
@@ -53,7 +53,8 @@ async function computeKeys(): Promise<string> {
|
||||
}
|
||||
const suffix = cacheSuffix ? `-${cacheSuffix}` : "";
|
||||
const pythonVersion = await getPythonVersion();
|
||||
return `setup-uv-${CACHE_VERSION}-${getArch()}-${getPlatform()}-${pythonVersion}${cacheDependencyPathHash}${suffix}`;
|
||||
const platform = await getPlatform();
|
||||
return `setup-uv-${CACHE_VERSION}-${getArch()}-${platform}-${pythonVersion}${cacheDependencyPathHash}${suffix}`;
|
||||
}
|
||||
|
||||
async function getPythonVersion(): Promise<string> {
|
||||
|
||||
@@ -1,5 +1,345 @@
|
||||
// AUTOGENERATED_DO_NOT_EDIT
|
||||
export const KNOWN_CHECKSUMS: { [key: string]: string } = {
|
||||
"aarch64-apple-darwin-0.6.3":
|
||||
"51b84818bbfe08358a298ba3389c6d448d3ddc0f2601a2d63c5a62cb7b704062",
|
||||
"aarch64-pc-windows-msvc-0.6.3":
|
||||
"ec3561ca86328aa351919de2d5208f6761a58d42a2e0e50e1d1d80d10039756a",
|
||||
"aarch64-unknown-linux-gnu-0.6.3":
|
||||
"447726788204106ffd8ecc59396fccc75fae7aca998555265b5ea6950b00160c",
|
||||
"aarch64-unknown-linux-musl-0.6.3":
|
||||
"2bb44c9fb8a13e244d502a577d6c32669b680941c996c35524817971e6e56460",
|
||||
"arm-unknown-linux-musleabihf-0.6.3":
|
||||
"d1e508cdbb4b479c496d6a50febe4b0f0159ef1d0693d09d274c119471545aea",
|
||||
"armv7-unknown-linux-gnueabihf-0.6.3":
|
||||
"d067b079991909b3f76279c048c57470aaa2d0fcf1ce3307b7f15fec88b7a99d",
|
||||
"armv7-unknown-linux-musleabihf-0.6.3":
|
||||
"82c7b7aca1855f285db509ae3c957f9b1ca5e3eaa77ecbd80da8349fe0a6491e",
|
||||
"i686-pc-windows-msvc-0.6.3":
|
||||
"83173da302701020c44cefdab5d127e5cde9e4333ca7e7cbefc03e39908b7a39",
|
||||
"i686-unknown-linux-gnu-0.6.3":
|
||||
"7c044bd2db0690cce49b0613abf01daaeb6fb829737ef9ec7978191f218e1542",
|
||||
"i686-unknown-linux-musl-0.6.3":
|
||||
"a3401dd97c1ee55c1def00c5b98419087da2fd0ce81a74df1cf268a95b338998",
|
||||
"powerpc64-unknown-linux-gnu-0.6.3":
|
||||
"6023103b5d761da0e06c70a95197476796ba68ed3f6849529c89d603609a82d5",
|
||||
"powerpc64le-unknown-linux-gnu-0.6.3":
|
||||
"e41eec560bd166f5bd155772ef120ec7220a80dcb4b70e71d8f4781276c5d102",
|
||||
"s390x-unknown-linux-gnu-0.6.3":
|
||||
"2c3c03d95c20adb2e521efaeddf6f9947c427c5e8140e38585595f3c947cebed",
|
||||
"x86_64-apple-darwin-0.6.3":
|
||||
"a675d2d0fcf533f89f4b584bfa8ee3173a1ffbc87d9d1d48fcc3abb8c55d946d",
|
||||
"x86_64-pc-windows-msvc-0.6.3":
|
||||
"40b50b3da3cf74dc5717802acd076b4669b6d7d2c91c4482875b4e5e46c62ba3",
|
||||
"x86_64-unknown-linux-gnu-0.6.3":
|
||||
"b7a37a33d62cb7672716c695226450231e8c02a8eb2b468fa61cd28a8f86eab2",
|
||||
"x86_64-unknown-linux-musl-0.6.3":
|
||||
"7c77a5bc7c5fc56becf266c2ea8dae1e0fd4f9fe2c510110d097ad9066cacfb1",
|
||||
"aarch64-apple-darwin-0.6.2":
|
||||
"4af802a1216053650dd82eee85ea4241994f432937d41c8b0bc90f2639e6ae14",
|
||||
"aarch64-pc-windows-msvc-0.6.2":
|
||||
"02299bd78e4fbd2850532710c52a92368601f77654e3c6c342c651d75e6ca1f6",
|
||||
"aarch64-unknown-linux-gnu-0.6.2":
|
||||
"ca4c08724764a2b6c8f2173c4e3ca9dcde0d9d328e73b4d725cfb6b17a925eed",
|
||||
"aarch64-unknown-linux-musl-0.6.2":
|
||||
"9a90ef4761d75ee1a5158cc2fbd787c78dcfb1c12532a00a3c13b915db720c2e",
|
||||
"arm-unknown-linux-musleabihf-0.6.2":
|
||||
"f3643b8b67d6f711876a5682d4607b4a31e6e2935b4ccb35d7a98ec067b944d9",
|
||||
"armv7-unknown-linux-gnueabihf-0.6.2":
|
||||
"79a0df9c7e1df089722ff5338c7766e2437a2d3e40b4e232c72be4a4e9e3a7b9",
|
||||
"armv7-unknown-linux-musleabihf-0.6.2":
|
||||
"6aff9c4d54a1466be66234a754181f6e48501ac206d02dd5cf5e81df4c9efbfd",
|
||||
"i686-pc-windows-msvc-0.6.2":
|
||||
"29e46887292d4d645cb941731bfbc688fc1689255f9898b25e6b1c96bf1b954c",
|
||||
"i686-unknown-linux-gnu-0.6.2":
|
||||
"66301b549ea0e8e6960dc6d1eb7b9dcf5fc8d8913f2bb480434918af25f1c6c4",
|
||||
"i686-unknown-linux-musl-0.6.2":
|
||||
"b85ec115f14ca15418db3540c597e13a970546df49a85c1905c16286b86eb471",
|
||||
"powerpc64-unknown-linux-gnu-0.6.2":
|
||||
"de17553549280fd877452dd1f7f9d0a604e3544bfad007b8ec0b9943f103796f",
|
||||
"powerpc64le-unknown-linux-gnu-0.6.2":
|
||||
"f341fd4874d2d007135626a0657d1478f331a78991d8a1a06aaa0d52fbe16183",
|
||||
"s390x-unknown-linux-gnu-0.6.2":
|
||||
"17fd89bd8de75da9c91baf918b8079c1f1f92bb6a398f0cfbc5ddefe0c7f0ee5",
|
||||
"x86_64-apple-darwin-0.6.2":
|
||||
"2b9e78b2562aea93f13e42df1177cb07c59a4d4f1c8ff8907d0c31f3a5e5e8db",
|
||||
"x86_64-pc-windows-msvc-0.6.2":
|
||||
"5f33c3cc5c183775cc51b3e661a0d2ce31142d32a50406a67c7ad0321fc841d9",
|
||||
"x86_64-unknown-linux-gnu-0.6.2":
|
||||
"37ea31f099678a3bee56f8a757d73551aad43f8025d377a8dde80dd946c1b7f2",
|
||||
"x86_64-unknown-linux-musl-0.6.2":
|
||||
"fcd01693df76379be5bc325efa43c644cf0704a2e720ccd6695f41ded09934d7",
|
||||
"aarch64-apple-darwin-0.6.1":
|
||||
"90e10cc7f26cbaf3eaa867cf99344ffd550e942fd4b660e88f2f91c23022dc5a",
|
||||
"aarch64-pc-windows-msvc-0.6.1":
|
||||
"a9bce4582ec8dcc93e19e94b4d7ab653b378a68da1a7e72f5ea82ddd2d42fb44",
|
||||
"aarch64-unknown-linux-gnu-0.6.1":
|
||||
"f355989fb5ecf47c9f9087a0b21e2ee7d7c802bc3d0cf6edae07560d4297751f",
|
||||
"aarch64-unknown-linux-musl-0.6.1":
|
||||
"6455886f9aef3392df0af630dee9df892787fdffda0f0800245f86a735bd810d",
|
||||
"arm-unknown-linux-musleabihf-0.6.1":
|
||||
"4bbd397391134dbfedebb938d40845573eafe6dfd1e8e1882e89c21de702104e",
|
||||
"armv7-unknown-linux-gnueabihf-0.6.1":
|
||||
"811e19387997ac14f1b775c3e975a7d560c93f866eb5fd2955132f9718445a0a",
|
||||
"armv7-unknown-linux-musleabihf-0.6.1":
|
||||
"a2022883913d55c0913001869f64208b8b3244ec6286c9e097ad9563b9f747b9",
|
||||
"i686-pc-windows-msvc-0.6.1":
|
||||
"920e08d6d649a414981c2c1814746fcb0a10f25e2c65e359abf534212e1f0c8c",
|
||||
"i686-unknown-linux-gnu-0.6.1":
|
||||
"943a9a4637151d9f950de65725b28f0dfe3f73e7ad5b2b9ab35392cbc44b3cec",
|
||||
"i686-unknown-linux-musl-0.6.1":
|
||||
"63d269c67e7da4f645cd6be593b55e2f0e84a9bb7cf2d45faca791c27c5f9f66",
|
||||
"powerpc64-unknown-linux-gnu-0.6.1":
|
||||
"8775b00b1c44a7400e8a8d5238efc5ecc636f62ed8e865bd612486c67c6272b3",
|
||||
"powerpc64le-unknown-linux-gnu-0.6.1":
|
||||
"becf4913112c475b2713df01a8c0536b38dc2c48f04b1d603cd6f0a74f88caa2",
|
||||
"s390x-unknown-linux-gnu-0.6.1":
|
||||
"ee687d56ba1e359a7a2e20e301b992b83882df5ffb1409d301e1b0d21b3fa16a",
|
||||
"x86_64-apple-darwin-0.6.1":
|
||||
"d8609b53f280d5e784a7586bf7a3fd90c557656af109cee8572b24a0c1443191",
|
||||
"x86_64-pc-windows-msvc-0.6.1":
|
||||
"32de1730597db0a7c5f34e2257ab491b660374b22c016c3d9a59ae279d837697",
|
||||
"x86_64-unknown-linux-gnu-0.6.1":
|
||||
"0dcad9831d3f10f3bc4dcd7678948dfc74c0b3ab3f07aa684eb9e5135b971a58",
|
||||
"x86_64-unknown-linux-musl-0.6.1":
|
||||
"143dba84867f72107048e1f95be8f894d59f456e018a34276d9d2d6bacdf8f99",
|
||||
"aarch64-apple-darwin-0.6.0":
|
||||
"ff4f1ec24a3adb3dd251f9523e4b7a7cba379e9896ae6ed1efa163fcdcd6af8a",
|
||||
"aarch64-pc-windows-msvc-0.6.0":
|
||||
"c29a1bfcc3070a3a4834b9aa8e290f25e82e7b2a1d25cdbae3418fb8b72c2b0b",
|
||||
"aarch64-unknown-linux-gnu-0.6.0":
|
||||
"47fa7ada7352f69a5efd19628b86b83c0bbda34541de3a4254ba75a188414953",
|
||||
"aarch64-unknown-linux-musl-0.6.0":
|
||||
"92b105bb9253a6123a0f8a8412aec9d05b162bf529cbe60fcad75a71a9a43d3f",
|
||||
"arm-unknown-linux-musleabihf-0.6.0":
|
||||
"a36895e6bde3bb0a74f2d61230332bd8f2cb60984e86bbbc69e9b2e742e1b971",
|
||||
"armv7-unknown-linux-gnueabihf-0.6.0":
|
||||
"01cbd440e41eb9fff4e372a534706156fefefe34ac44d6eb9b8abc7d5739b0fd",
|
||||
"armv7-unknown-linux-musleabihf-0.6.0":
|
||||
"62424a2b18a7b4a7cd62912d7cd952a74f755e6b46e46c9bae6029f4b3f2f2cf",
|
||||
"i686-pc-windows-msvc-0.6.0":
|
||||
"40422491d697c2da3f30c2b00b5fbfbe5075e33dd64956137959a6536b851213",
|
||||
"i686-unknown-linux-gnu-0.6.0":
|
||||
"22ee5cacb0139b065e219e43db84f4f21ea2a316f7341b245786d2f3e748488d",
|
||||
"i686-unknown-linux-musl-0.6.0":
|
||||
"1ab5f3ea0e809c5390dbda97558d4176efcbe7e3eb5166eb2c61a41991d7c4f9",
|
||||
"powerpc64-unknown-linux-gnu-0.6.0":
|
||||
"b99ba184663eecbd1197d60c3120b5451879009b69e900eed83b8dd5f9b568ec",
|
||||
"powerpc64le-unknown-linux-gnu-0.6.0":
|
||||
"d782751a6ec8a0775aa57087275225b6562a115004c1f41935bec1609765508d",
|
||||
"s390x-unknown-linux-gnu-0.6.0":
|
||||
"664f4165767a0cd808d1784d1d70243da4789024ec5cd779a861201b54a479b7",
|
||||
"x86_64-apple-darwin-0.6.0":
|
||||
"530ef3b6f563448e8e017a8cd6693d6c72c146fb0a3c43440bb0e93fcf36264f",
|
||||
"x86_64-pc-windows-msvc-0.6.0":
|
||||
"65836dae55d3a63e5fc1d51ae52e6ea175aaab1c82c4a6660d46462b27d19c2a",
|
||||
"x86_64-unknown-linux-gnu-0.6.0":
|
||||
"1a26ce241f7ff1f52634d869f86db533fffba21e528597029ee9d1423bf3df18",
|
||||
"x86_64-unknown-linux-musl-0.6.0":
|
||||
"ac2331cda152aa71fed700c7b1ceec4a0662185e65f544b3c3a607be53f856f0",
|
||||
"aarch64-apple-darwin-0.5.31":
|
||||
"396c9bd6acd98466fdb585da2ed040eecea15228e580d4bd649c09215b490bf9",
|
||||
"aarch64-pc-windows-msvc-0.5.31":
|
||||
"e1c862e67f03f11ff5d359d4b1afa9f624bd52489d09ffb6efcc1c5c743674bc",
|
||||
"aarch64-unknown-linux-gnu-0.5.31":
|
||||
"e7f358efb0718bd8f98dc0c29fd0902323b590381ca765537063a2ca23ed34c7",
|
||||
"aarch64-unknown-linux-musl-0.5.31":
|
||||
"7a49b56be133a756b8ef589beef33f70176a7ce796e118de2911bdae0ffb9a56",
|
||||
"arm-unknown-linux-musleabihf-0.5.31":
|
||||
"2ad1f334295c3ce92c5fd7c3fa9121ffd4569b6db1846c1ecbb6a2007041d09f",
|
||||
"armv7-unknown-linux-gnueabihf-0.5.31":
|
||||
"78270187aebe5f37fdff184f65e8aa537fd9a06cb5d5119f59c6dd7badcf95ef",
|
||||
"armv7-unknown-linux-musleabihf-0.5.31":
|
||||
"329dba251b81dcc840f261148d6466442b23bad54d75f1a21d5005c9c4d04aa0",
|
||||
"i686-pc-windows-msvc-0.5.31":
|
||||
"3860cbf6115f7af85cdf9e83ba1a9ee2bc6cf4da750825014a999738ba6950dd",
|
||||
"i686-unknown-linux-gnu-0.5.31":
|
||||
"4347e44f076448a8b37140a762845d65831819c21f1b6b1da4706640b82d3e4a",
|
||||
"i686-unknown-linux-musl-0.5.31":
|
||||
"54365460d1dbed67a6106ece17ec50900f1209ec1543172364696e7694c7b64c",
|
||||
"powerpc64-unknown-linux-gnu-0.5.31":
|
||||
"1263a21ef5f72d48d03b7051b69102d7addcb647af2e5182b5e6c5313d8ffd48",
|
||||
"powerpc64le-unknown-linux-gnu-0.5.31":
|
||||
"e292dc0a7b23fab01bbf2b6fdddf8bb0c531805b1dbc3905637af70a88ff1f5f",
|
||||
"s390x-unknown-linux-gnu-0.5.31":
|
||||
"66232646bd15a38cf6877c6af6bf8668fadb2af910d7cf7a1159885487a15e70",
|
||||
"x86_64-apple-darwin-0.5.31":
|
||||
"5316b82da14fab9a76b3521c901e7c0a7d641fb9d28eb07874e26a00b0ac2725",
|
||||
"x86_64-pc-windows-msvc-0.5.31":
|
||||
"1ad54dace424c259b603ecd36262cb235af2bc8d6f280e24063d57919545f593",
|
||||
"x86_64-unknown-linux-gnu-0.5.31":
|
||||
"017ce7ed02c967f1b0489f09162e19ee3df4586a44e681211d16206e007fce62",
|
||||
"x86_64-unknown-linux-musl-0.5.31":
|
||||
"b0642eedb1704371f0cf533e2103ebcaebed59e043c71a70c8fa4a971d2032ab",
|
||||
"aarch64-apple-darwin-0.5.30":
|
||||
"654c3e010c9c53b024fa752d08b949e0f80f10ec4e3a1acea9437a1d127a1053",
|
||||
"aarch64-pc-windows-msvc-0.5.30":
|
||||
"aa5331546935864fe0c627fc22f4ffc60cd2d24ec17900780e95e11436d544a8",
|
||||
"aarch64-unknown-linux-gnu-0.5.30":
|
||||
"d1ea4a2299768b2c8263db0abd8ea0de3b8052a34a51f5cf73094051456d4de2",
|
||||
"aarch64-unknown-linux-musl-0.5.30":
|
||||
"e9b51e591a852a5bc432df3411acaf2c03efd5c8a1ea4280e356881a0c689d31",
|
||||
"arm-unknown-linux-musleabihf-0.5.30":
|
||||
"d143460c27df2b8bcafe8a548eb90fb8000a97921754f13a45cb675d04d366f8",
|
||||
"armv7-unknown-linux-gnueabihf-0.5.30":
|
||||
"3d1953151a534e0cbe3c2094e5165a419e75f1ae32444748c5cd69bcfb9906c0",
|
||||
"armv7-unknown-linux-musleabihf-0.5.30":
|
||||
"4ef3aee22dc8feb9665df4339d4689c1262a26d36d34c7c543e0caa31eb8f45b",
|
||||
"i686-pc-windows-msvc-0.5.30":
|
||||
"3389683ab13451b628cfd95ca5bf56fd7137300af5903180d60eed35c4cbfb82",
|
||||
"i686-unknown-linux-gnu-0.5.30":
|
||||
"3ebb74ae2326030c93972f4c1b5e77a17b29bd191349b6244e41e70bb98d8507",
|
||||
"i686-unknown-linux-musl-0.5.30":
|
||||
"bc590e89243cf7688709ba39822d0acaee394dc0b4781eef044af411e6ac26af",
|
||||
"powerpc64-unknown-linux-gnu-0.5.30":
|
||||
"e289eae011dec0fa5d00133c17efde5e427237e876bfb0e1e27146e45959fc26",
|
||||
"powerpc64le-unknown-linux-gnu-0.5.30":
|
||||
"b10ba261377f89e598322f3329beeada6b868119581e2a7294e7585351d3733f",
|
||||
"s390x-unknown-linux-gnu-0.5.30":
|
||||
"7341e6d62b0e02fbd33fe6ce0158e9f68617f43e5ec42fc6904d246bda5f6d34",
|
||||
"x86_64-apple-darwin-0.5.30":
|
||||
"42c4a5d3611928613342958652ab16943d05980b1ab5057bb47e4283ef7e890d",
|
||||
"x86_64-pc-windows-msvc-0.5.30":
|
||||
"43d6b97d2e283f6509a9199fd32411d67a64d5b5dca3e6e63e45ec2faec68f73",
|
||||
"x86_64-unknown-linux-gnu-0.5.30":
|
||||
"9d82816c14c44054f0c679f2bcaecfd910c75f207e08874085cb27b482f17776",
|
||||
"x86_64-unknown-linux-musl-0.5.30":
|
||||
"7cc79871e5fcd2678474d756bfc32c6c3d28e136963dda10902c516fab67fa2d",
|
||||
"aarch64-apple-darwin-0.5.29":
|
||||
"c89e96bde40402cc4db2f59bcb886882ab69e557235279283a2db9dea61135c3",
|
||||
"aarch64-pc-windows-msvc-0.5.29":
|
||||
"172509e9824b925082612f19ab0e030e08108033d7e5c10e67ede69b3bf290d8",
|
||||
"aarch64-unknown-linux-gnu-0.5.29":
|
||||
"d1f716e8362d7da654a154b8331054a987c1fc16562bd719190a42458e945785",
|
||||
"aarch64-unknown-linux-musl-0.5.29":
|
||||
"3f2d03e62b951a3e46e9c1cfae3091235c05ff274c7163162b8726fb56133219",
|
||||
"arm-unknown-linux-musleabihf-0.5.29":
|
||||
"5ee7d5e95f93434845c1e14740c5e957f8747b751af054996f45a9095426a496",
|
||||
"armv7-unknown-linux-gnueabihf-0.5.29":
|
||||
"98b88f2bc2905241ff460529a9d24cdaa70e8b31c573ba07240eb4a163e7fa3d",
|
||||
"armv7-unknown-linux-musleabihf-0.5.29":
|
||||
"95f148fb44c71f817d0f9c7e14591f1364c7da62a3cb9d353a0e45b4332031d3",
|
||||
"i686-pc-windows-msvc-0.5.29":
|
||||
"e35c4bba6af151e3a952629c7054b0f6d901c83aa7a3a21aedc3880424790294",
|
||||
"i686-unknown-linux-gnu-0.5.29":
|
||||
"9e81a4f621500d161ae810a7f68a25a8bfc141d172267a36c19cf491c5bf8fa7",
|
||||
"i686-unknown-linux-musl-0.5.29":
|
||||
"07b4f43a4c561120cd5951c5aa49ad0aa2a1c1ebce870f533f06fa0e0a8ece4f",
|
||||
"powerpc64-unknown-linux-gnu-0.5.29":
|
||||
"0eae3ece0811815cbed9619995486a2d4ba4df47abe3f7fcc27153eff9c5a655",
|
||||
"powerpc64le-unknown-linux-gnu-0.5.29":
|
||||
"0e38436e4068eec23498f88a5c1b721411986e6a983f243680a60b716b7c301c",
|
||||
"s390x-unknown-linux-gnu-0.5.29":
|
||||
"6a42886dd10c6437a1a56982cd0c116d063f05483aa7db1cc0343f705ef96f91",
|
||||
"x86_64-apple-darwin-0.5.29":
|
||||
"2f13ef5a82b91ba137fd6441f478c406a0a8b0df41e9573d1e61551a1de5a3a2",
|
||||
"x86_64-pc-windows-msvc-0.5.29":
|
||||
"2453b17df889822a5b8dcd3467dd6b75a410d61f5e6504362e3852fb3175c19c",
|
||||
"x86_64-unknown-linux-gnu-0.5.29":
|
||||
"46d3fcf04d64be42bded914d648657cd62d968172604e3aaf8386142c09d2317",
|
||||
"x86_64-unknown-linux-musl-0.5.29":
|
||||
"bb06a385a918b7b8d927ef08e283843b66005dfccf0a940bfd0882f22cbc1a7f",
|
||||
"aarch64-apple-darwin-0.5.28":
|
||||
"57cbf655a5bc5c1ffa7315c0b25ff342f44a919fa099311c0d994914011b421e",
|
||||
"aarch64-pc-windows-msvc-0.5.28":
|
||||
"76bb4fe97c78f5de294614cb36294a3204e57117d8ce2f826bf1b8fd28d770ef",
|
||||
"aarch64-unknown-linux-gnu-0.5.28":
|
||||
"fe3c481940c5542d034a863239f23d64ee45abcd636c480c1ea0f34469a66c86",
|
||||
"aarch64-unknown-linux-musl-0.5.28":
|
||||
"d2f622ffbb129c9368a147672e79f9b7c8e33c4ac0bbba6510c7e92d699d7fb3",
|
||||
"arm-unknown-linux-musleabihf-0.5.28":
|
||||
"0bf8b33107e58d15065bce5fd29d24de7b4401ddcaf6791840568876f1247f46",
|
||||
"armv7-unknown-linux-gnueabihf-0.5.28":
|
||||
"6a3ceb156b6ced721792ffa1d9d4fd35a28167960cd5b1847bfd39fd1d2d59bf",
|
||||
"armv7-unknown-linux-musleabihf-0.5.28":
|
||||
"29dec32b29a5f4736f0062ff47aade2c922e08922241783e7af4aba0639658cc",
|
||||
"i686-pc-windows-msvc-0.5.28":
|
||||
"7ff2b7bde705cdca7f6fe6aec9e7047b47e09bf97be9c5ff597ff6e19a369544",
|
||||
"i686-unknown-linux-gnu-0.5.28":
|
||||
"27ff0f4d1ce96b5abe5113e3033e48a16d588c2e855439f0d8fbc59b75c041de",
|
||||
"i686-unknown-linux-musl-0.5.28":
|
||||
"0f72a1c8321d05dbfc3382d28e7bb9f83079198fd5b16c25560b0f66b6a6a8c7",
|
||||
"powerpc64-unknown-linux-gnu-0.5.28":
|
||||
"caf37897a6a3734a706f2d5ffb2c7953f37e903b6a34d02300fbf96f77a44b82",
|
||||
"powerpc64le-unknown-linux-gnu-0.5.28":
|
||||
"74bc6aacea26c67305910bcbe4b6178b96fefe643b2002567cc094ad2c209ef1",
|
||||
"s390x-unknown-linux-gnu-0.5.28":
|
||||
"b3f49b0268ab971ff7f39ca924fb8291ce3d8ffe8f6c0d7ff16bc12055cd1e85",
|
||||
"x86_64-apple-darwin-0.5.28":
|
||||
"36484907ec1988f1553bdc7de659d8bc0b46b8eaca09b0f67359b116caac170d",
|
||||
"x86_64-pc-windows-msvc-0.5.28":
|
||||
"31053741c49624726d5ce8cb1ab8f5fc267ed0333ab8257450bd71a7c2a68d05",
|
||||
"x86_64-unknown-linux-gnu-0.5.28":
|
||||
"1f2a654627e02fed5f8b883592439b842e74d98091bbafe9e71c7101f4f97d74",
|
||||
"x86_64-unknown-linux-musl-0.5.28":
|
||||
"9ca7e51c8ea414aa1a275d12956676da1064e0a1cbf8d5b39b15c45d923a09c3",
|
||||
"aarch64-apple-darwin-0.5.27":
|
||||
"efe367393fc02b8e8609c38bce78d743261d7fc885e5eabfbd08ce881816aea3",
|
||||
"aarch64-pc-windows-msvc-0.5.27":
|
||||
"5b652867d6dc42946953d786aa1e466e9fbcd877a48d4c18f56c26801abb486b",
|
||||
"aarch64-unknown-linux-gnu-0.5.27":
|
||||
"7b8175e7370056efa6e8f4c8fec854f3a026c0ecda628694f5200fdf666167fa",
|
||||
"aarch64-unknown-linux-musl-0.5.27":
|
||||
"5df998660ed17555679c7a6b43b25f1c4d76d76b6062d31491663960804060d5",
|
||||
"arm-unknown-linux-musleabihf-0.5.27":
|
||||
"d80200d7c0c3ef32b2e938872726de29128a3b9bc080038fb3fc6f2eedbf1f34",
|
||||
"armv7-unknown-linux-gnueabihf-0.5.27":
|
||||
"3fa94262b12268c7b9b91ed0ea739752e0c63ef2105396122faa93cd5bbdae8c",
|
||||
"armv7-unknown-linux-musleabihf-0.5.27":
|
||||
"86e688ced31f6322d6b4dc544453ba02021685e553995c2c72eb41f82fd2662b",
|
||||
"i686-pc-windows-msvc-0.5.27":
|
||||
"0158534490ba4b4cf64716116d73220f019688a22a1eba78535d9d95e918ec71",
|
||||
"i686-unknown-linux-gnu-0.5.27":
|
||||
"66b6128cd9b745a312bc81d6d3fedf02850acdf96dfca53ab5a3d11ddb1fe083",
|
||||
"i686-unknown-linux-musl-0.5.27":
|
||||
"8e95b813f804e8670aed79608778582b3f64dcf468ec185e49f5188505c3edf6",
|
||||
"powerpc64-unknown-linux-gnu-0.5.27":
|
||||
"1a129dbc27566be04ce68f5bc10a626954abe7651b35ce73d8a24b2e7a89ffe1",
|
||||
"powerpc64le-unknown-linux-gnu-0.5.27":
|
||||
"b63051bdd5392fa6a3d8d98c661b395c62a2a05a0e96ae877047c4c7be1b92ff",
|
||||
"s390x-unknown-linux-gnu-0.5.27":
|
||||
"07377ed611dbf1548f06b65ad6d2bb84f3ff1ccce936ba972d7b7f5492e47d30",
|
||||
"x86_64-apple-darwin-0.5.27":
|
||||
"a75c9d77c90c4ac367690134cd471108c09b95226c62cd6422ca0db8bbea2197",
|
||||
"x86_64-pc-windows-msvc-0.5.27":
|
||||
"195d43f6578c33838523bf4f3c80d690914496592b2946bda8598b8500e744f6",
|
||||
"x86_64-unknown-linux-gnu-0.5.27":
|
||||
"27261ddf7654d4f34ed4600348415e0c30de2a307cc6eff6a671a849263b2dcf",
|
||||
"x86_64-unknown-linux-musl-0.5.27":
|
||||
"94cb0a392e5cfb82068476462e6c06e19745ea9e74fc828187f6809d97b529b4",
|
||||
"aarch64-apple-darwin-0.5.26":
|
||||
"3b503c630dc65b991502e1d9fe0ffc410ae50c503e8df6d4900f23b9ad436366",
|
||||
"aarch64-pc-windows-msvc-0.5.26":
|
||||
"3319e6f4506fdb2e3d8791bae05995f0aeda947ee87e373c17a699fb39165e3d",
|
||||
"aarch64-unknown-linux-gnu-0.5.26":
|
||||
"6ce061c2f14bf2f0b12c2b7a0f80c65408bf2dcee9743c4fc4ec1f30b85ecb98",
|
||||
"aarch64-unknown-linux-musl-0.5.26":
|
||||
"42ce9a728ecd054268ba5a621002385e79ea10ba4546a8a6a695f430902029f5",
|
||||
"arm-unknown-linux-musleabihf-0.5.26":
|
||||
"87b8a2af3b9784a6b7ab5ddb2fff0c505bbccaae0a457f6b228257ed23adfed0",
|
||||
"armv7-unknown-linux-gnueabihf-0.5.26":
|
||||
"c311f89e6d23a9bd7d2f62e225d6b54a8fc85889f3519219f3308ea7eb687871",
|
||||
"armv7-unknown-linux-musleabihf-0.5.26":
|
||||
"0e4d68538847637c376f51d962796e9336c9ccbcccdfad547e3458cd7cf1a70e",
|
||||
"i686-pc-windows-msvc-0.5.26":
|
||||
"ecf2858d13ba0cbe1b82cc10e9b0538309ee53a7c18f71e8afcc56b1e5e909e0",
|
||||
"i686-unknown-linux-gnu-0.5.26":
|
||||
"833199e00a8187468c49dd315e041dbaf30e6e6340e65dd3df0c5aec8605c3d8",
|
||||
"i686-unknown-linux-musl-0.5.26":
|
||||
"72d4ed889ceac3cf5f7233a7e38eb2dd70a95e36dab0ce9ebed1f6a9a68f19be",
|
||||
"powerpc64-unknown-linux-gnu-0.5.26":
|
||||
"7838adddce0d17aa933cbe843ca673e44eb89de508175cc707473540de6388cd",
|
||||
"powerpc64le-unknown-linux-gnu-0.5.26":
|
||||
"fe1d770840110b59554228b12382881abefc1ab2d2ca009adc1502179422bc0d",
|
||||
"s390x-unknown-linux-gnu-0.5.26":
|
||||
"086c8d03ee4aff702a32d58086accf971ce58a2f000323414935e0f50e816c04",
|
||||
"x86_64-apple-darwin-0.5.26":
|
||||
"7cf20dd534545a74290a244d3e8244d1010ba38d2d5950f504b6c93fab169f57",
|
||||
"x86_64-pc-windows-msvc-0.5.26":
|
||||
"a938eebb7433eb7097ae1cf3d53f9bb083edd4c746045f284a1c8904af1a1a11",
|
||||
"x86_64-unknown-linux-gnu-0.5.26":
|
||||
"555f17717e7663109104b62976e9da6cfda1ad84213407b437fd9c8f573cc0ef",
|
||||
"x86_64-unknown-linux-musl-0.5.26":
|
||||
"6858d7951b9ae20c3955b2b0addbf2f184ab68175d1c659d11e0a14f1472fb81",
|
||||
"aarch64-apple-darwin-0.5.25":
|
||||
"3c29e941d691614bc4eba95629c8f8dee106e5d44d70a03efed66a544588caa1",
|
||||
"aarch64-pc-windows-msvc-0.5.25":
|
||||
|
||||
@@ -5,11 +5,7 @@ import { promises as fs } from "node:fs";
|
||||
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/constants";
|
||||
import type { Architecture, Platform } from "../utils/platforms";
|
||||
import { validateChecksum } from "./checksum/checksum";
|
||||
import { Octokit } from "@octokit/core";
|
||||
import { paginateRest } from "@octokit/plugin-paginate-rest";
|
||||
import { restEndpointMethods } from "@octokit/plugin-rest-endpoint-methods";
|
||||
|
||||
const PaginatingOctokit = Octokit.plugin(paginateRest, restEndpointMethods);
|
||||
import { Octokit } from "../utils/octokit";
|
||||
|
||||
export function tryGetFromToolCache(
|
||||
arch: Architecture,
|
||||
@@ -78,6 +74,7 @@ export async function resolveVersion(
|
||||
versionInput: string,
|
||||
githubToken: string,
|
||||
): Promise<string> {
|
||||
core.debug(`Resolving version: ${versionInput}`);
|
||||
const version =
|
||||
versionInput === "latest"
|
||||
? await getLatestVersion(githubToken)
|
||||
@@ -87,6 +84,7 @@ export async function resolveVersion(
|
||||
return version;
|
||||
}
|
||||
const availableVersions = await getAvailableVersions(githubToken);
|
||||
core.debug(`Available versions: ${availableVersions}`);
|
||||
const resolvedVersion = tc.evaluateVersions(availableVersions, version);
|
||||
if (resolvedVersion === "") {
|
||||
throw new Error(`No version found for ${version}`);
|
||||
@@ -96,7 +94,7 @@ export async function resolveVersion(
|
||||
|
||||
async function getAvailableVersions(githubToken: string): Promise<string[]> {
|
||||
try {
|
||||
const octokit = new PaginatingOctokit({
|
||||
const octokit = new Octokit({
|
||||
auth: githubToken,
|
||||
});
|
||||
return await getReleaseTagNames(octokit);
|
||||
@@ -105,7 +103,7 @@ async function getAvailableVersions(githubToken: string): Promise<string[]> {
|
||||
core.info(
|
||||
"No (valid) GitHub token provided. Falling back to anonymous. Requests might be rate limited.",
|
||||
);
|
||||
const octokit = new PaginatingOctokit();
|
||||
const octokit = new Octokit();
|
||||
return await getReleaseTagNames(octokit);
|
||||
}
|
||||
throw err;
|
||||
@@ -113,7 +111,7 @@ async function getAvailableVersions(githubToken: string): Promise<string[]> {
|
||||
}
|
||||
|
||||
async function getReleaseTagNames(
|
||||
octokit: InstanceType<typeof PaginatingOctokit>,
|
||||
octokit: InstanceType<typeof Octokit>,
|
||||
): Promise<string[]> {
|
||||
const response = await octokit.paginate(octokit.rest.repos.listReleases, {
|
||||
owner: OWNER,
|
||||
@@ -123,7 +121,8 @@ async function getReleaseTagNames(
|
||||
}
|
||||
|
||||
async function getLatestVersion(githubToken: string) {
|
||||
const octokit = new PaginatingOctokit({
|
||||
core.debug("Getting latest version...");
|
||||
const octokit = new Octokit({
|
||||
auth: githubToken,
|
||||
});
|
||||
|
||||
@@ -131,26 +130,24 @@ async function getLatestVersion(githubToken: string) {
|
||||
try {
|
||||
latestRelease = await getLatestRelease(octokit);
|
||||
} catch (err) {
|
||||
if ((err as Error).message.includes("Bad credentials")) {
|
||||
core.info(
|
||||
"No (valid) GitHub token provided. Falling back to anonymous. Requests might be rate limited.",
|
||||
);
|
||||
const octokit = new PaginatingOctokit();
|
||||
latestRelease = await getLatestRelease(octokit);
|
||||
} else {
|
||||
throw err;
|
||||
core.info(
|
||||
"No (valid) GitHub token provided. Falling back to anonymous. Requests might be rate limited.",
|
||||
);
|
||||
if (err instanceof Error) {
|
||||
core.debug(err.message);
|
||||
}
|
||||
const octokit = new Octokit();
|
||||
latestRelease = await getLatestRelease(octokit);
|
||||
}
|
||||
|
||||
if (!latestRelease) {
|
||||
throw new Error("Could not determine latest release.");
|
||||
}
|
||||
core.debug(`Latest version: ${latestRelease.tag_name}`);
|
||||
return latestRelease.tag_name;
|
||||
}
|
||||
|
||||
async function getLatestRelease(
|
||||
octokit: InstanceType<typeof PaginatingOctokit>,
|
||||
) {
|
||||
async function getLatestRelease(octokit: InstanceType<typeof Octokit>) {
|
||||
const { data: latestRelease } = await octokit.rest.repos.getLatestRelease({
|
||||
owner: OWNER,
|
||||
repo: REPO,
|
||||
|
||||
@@ -30,7 +30,7 @@ import fs from "node:fs";
|
||||
import { getUvVersionFromConfigFile } from "./utils/pyproject";
|
||||
|
||||
async function run(): Promise<void> {
|
||||
const platform = getPlatform();
|
||||
const platform = await getPlatform();
|
||||
const arch = getArch();
|
||||
|
||||
try {
|
||||
|
||||
@@ -1,20 +1,16 @@
|
||||
import * as semver from "semver";
|
||||
import * as core from "@actions/core";
|
||||
import { Octokit } from "@octokit/core";
|
||||
import { paginateRest } from "@octokit/plugin-paginate-rest";
|
||||
import { restEndpointMethods } from "@octokit/plugin-rest-endpoint-methods";
|
||||
import { Octokit } from "./utils/octokit";
|
||||
|
||||
import { OWNER, REPO } from "./utils/constants";
|
||||
|
||||
import { updateChecksums } from "./download/checksum/update-known-checksums";
|
||||
|
||||
const PaginatingOctokit = Octokit.plugin(paginateRest, restEndpointMethods);
|
||||
|
||||
async function run(): Promise<void> {
|
||||
const checksumFilePath = process.argv.slice(2)[0];
|
||||
const github_token = process.argv.slice(2)[1];
|
||||
|
||||
const octokit = new PaginatingOctokit({
|
||||
const octokit = new Octokit({
|
||||
auth: github_token,
|
||||
});
|
||||
|
||||
|
||||
58
src/utils/octokit.ts
Normal file
58
src/utils/octokit.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
import { Octokit as Core } from "@octokit/core";
|
||||
import type {
|
||||
Constructor,
|
||||
OctokitOptions,
|
||||
} from "@octokit/core/dist-types/types";
|
||||
import {
|
||||
paginateRest,
|
||||
type PaginateInterface,
|
||||
} from "@octokit/plugin-paginate-rest";
|
||||
import { legacyRestEndpointMethods } from "@octokit/plugin-rest-endpoint-methods";
|
||||
import { fetch as undiciFetch, ProxyAgent, type RequestInit } from "undici";
|
||||
|
||||
export type { RestEndpointMethodTypes } from "@octokit/plugin-rest-endpoint-methods";
|
||||
|
||||
const DEFAULTS = {
|
||||
baseUrl: "https://api.github.com",
|
||||
userAgent: "setup-uv",
|
||||
};
|
||||
|
||||
export function getProxyAgent() {
|
||||
const httpProxy = process.env.HTTP_PROXY || process.env.http_prox;
|
||||
if (httpProxy) {
|
||||
return new ProxyAgent(httpProxy);
|
||||
}
|
||||
|
||||
const httpsProxy = process.env.HTTPS_PROXY || process.env.https_proxy;
|
||||
if (httpsProxy) {
|
||||
return new ProxyAgent(httpsProxy);
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
export const customFetch = async (url: string, opts: RequestInit) =>
|
||||
await undiciFetch(url, {
|
||||
dispatcher: getProxyAgent(),
|
||||
...opts,
|
||||
});
|
||||
|
||||
export const Octokit: typeof Core &
|
||||
Constructor<
|
||||
{
|
||||
paginate: PaginateInterface;
|
||||
} & ReturnType<typeof legacyRestEndpointMethods>
|
||||
> = Core.plugin(paginateRest, legacyRestEndpointMethods).defaults(
|
||||
function buildDefaults(options: OctokitOptions): OctokitOptions {
|
||||
return {
|
||||
...DEFAULTS,
|
||||
...options,
|
||||
request: {
|
||||
fetch: customFetch,
|
||||
...options.request,
|
||||
},
|
||||
};
|
||||
},
|
||||
);
|
||||
|
||||
export type Octokit = InstanceType<typeof Octokit>;
|
||||
@@ -1,10 +1,17 @@
|
||||
import * as exec from "@actions/exec";
|
||||
import * as core from "@actions/core";
|
||||
export type Platform =
|
||||
| "unknown-linux-gnu"
|
||||
| "unknown-linux-musl"
|
||||
| "unknown-linux-musleabihf"
|
||||
| "apple-darwin"
|
||||
| "pc-windows-msvc";
|
||||
export type Architecture = "i686" | "x86_64" | "aarch64";
|
||||
export type Architecture =
|
||||
| "i686"
|
||||
| "x86_64"
|
||||
| "aarch64"
|
||||
| "s390x"
|
||||
| "powerpc64le";
|
||||
|
||||
export function getArch(): Architecture | undefined {
|
||||
const arch = process.arch;
|
||||
@@ -12,6 +19,8 @@ export function getArch(): Architecture | undefined {
|
||||
ia32: "i686",
|
||||
x64: "x86_64",
|
||||
arm64: "aarch64",
|
||||
s390x: "s390x",
|
||||
ppc64: "powerpc64le",
|
||||
};
|
||||
|
||||
if (arch in archMapping) {
|
||||
@@ -19,15 +28,49 @@ export function getArch(): Architecture | undefined {
|
||||
}
|
||||
}
|
||||
|
||||
export function getPlatform(): Platform | undefined {
|
||||
const platform = process.platform;
|
||||
export async function getPlatform(): Promise<Platform | undefined> {
|
||||
const processPlatform = process.platform;
|
||||
const platformMapping: { [key: string]: Platform } = {
|
||||
linux: "unknown-linux-gnu",
|
||||
darwin: "apple-darwin",
|
||||
win32: "pc-windows-msvc",
|
||||
};
|
||||
|
||||
if (platform in platformMapping) {
|
||||
return platformMapping[platform];
|
||||
if (processPlatform in platformMapping) {
|
||||
const platform = platformMapping[processPlatform];
|
||||
if (platform === "unknown-linux-gnu") {
|
||||
const isMusl = await isMuslOs();
|
||||
return isMusl ? "unknown-linux-musl" : platform;
|
||||
}
|
||||
return platform;
|
||||
}
|
||||
}
|
||||
|
||||
async function isMuslOs(): Promise<boolean> {
|
||||
let stdOutput = "";
|
||||
let errOutput = "";
|
||||
const options: exec.ExecOptions = {
|
||||
silent: !core.isDebug(),
|
||||
listeners: {
|
||||
stdout: (data: Buffer) => {
|
||||
stdOutput += data.toString();
|
||||
},
|
||||
stderr: (data: Buffer) => {
|
||||
errOutput += data.toString();
|
||||
},
|
||||
},
|
||||
ignoreReturnCode: true,
|
||||
};
|
||||
|
||||
try {
|
||||
const execArgs = ["--version"];
|
||||
await exec.exec("ldd", execArgs, options);
|
||||
return stdOutput.includes("musl") || errOutput.includes("musl");
|
||||
} catch (error) {
|
||||
const err = error as Error;
|
||||
core.warning(
|
||||
`Failed to determine glibc or musl. Falling back to glibc. Error: ${err.message}`,
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import * as toml from "smol-toml";
|
||||
export function getUvVersionFromConfigFile(
|
||||
filePath: string,
|
||||
): string | undefined {
|
||||
core.debug(`Trying to find required-version for uv in: ${filePath}`);
|
||||
if (!fs.existsSync(filePath)) {
|
||||
core.warning(`Could not find file: ${filePath}`);
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user