Compare commits

...

19 Commits
v7.0.0 ... main

Author SHA1 Message Date
Tom Gillam
b7bf78939d Fix "lowest" resolution strategy with lower-bound only (#649)
Some checks failed
test / test-python-version (macos-latest) (push) Has been cancelled
test / test-python-version (windows-latest) (push) Has been cancelled
test / test-activate-environment (macos-latest) (push) Has been cancelled
test / test-setup-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-activate-environment (windows-latest) (push) Has been cancelled
test / test-setup-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (auto, windows-latest) (push) Has been cancelled
test / test-setup-cache (false, windows-latest) (push) Has been cancelled
test / test-setup-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (true, windows-latest) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:/home/ubuntu/.cache/uv os:selfhosted-ubuntu-arm64]) (push) Has been cancelled
test / test-setup-cache-local (push) Has been cancelled
test / test-restore-cache (auto, windows-latest) (push) Has been cancelled
test / test-restore-cache (false, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Has been cancelled
test / test-tilde-expansion-cache-local-path (push) Has been cancelled
test / test-tilde-expansion-cache-dependency-glob (push) Has been cancelled
test / test-python-install-dir (map[expected-python-dir:/home/ubuntu/.local/share/uv/python os:selfhosted-ubuntu-arm64]) (push) Has been cancelled
test / test-python-install-dir (map[expected-python-dir:D:\a\_temp\uv-python-dir os:windows-latest]) (push) Has been cancelled
test / test-restore-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (auto, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (false, windows-latest) (push) Has been cancelled
test / test-restore-cache (true, windows-latest) (push) Has been cancelled
test / test-restore-cache-local (push) Has been cancelled
test / cleanup-tilde-expansion-tests (push) Has been cancelled
test / all-tests-passed (push) Has been cancelled
Update known versions / build (push) Has been cancelled
- towards https://github.com/astral-sh/setup-uv/issues/648

Fix the bug described there, but this doesn't add the fast-path
optimisation suggested in that issue.
2025-10-16 13:41:50 +02:00
Kevin Stillhammer
cb6c0a53d9 Change version in docs to v7 (#647)
Some checks failed
test / test-checksum (map[checksum:a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218 os:macos-latest]) (push) Has been cancelled
test / test-tilde-expansion-tool-dirs (push) Has been cancelled
test / test-python-version (macos-latest) (push) Has been cancelled
test / test-python-version (windows-latest) (push) Has been cancelled
test / test-activate-environment (macos-latest) (push) Has been cancelled
test / test-activate-environment (windows-latest) (push) Has been cancelled
test / test-setup-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (auto, windows-latest) (push) Has been cancelled
test / test-setup-cache (false, windows-latest) (push) Has been cancelled
test / test-setup-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (true, windows-latest) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:/home/ubuntu/.cache/uv os:selfhosted-ubuntu-arm64]) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Has been cancelled
test / test-setup-cache-local (push) Has been cancelled
test / test-tilde-expansion-cache-local-path (push) Has been cancelled
test / test-tilde-expansion-cache-dependency-glob (push) Has been cancelled
test / test-python-install-dir (map[expected-python-dir:/home/ubuntu/.local/share/uv/python os:selfhosted-ubuntu-arm64]) (push) Has been cancelled
test / test-python-install-dir (map[expected-python-dir:D:\a\_temp\uv-python-dir os:windows-latest]) (push) Has been cancelled
test / test-restore-cache (auto, windows-latest) (push) Has been cancelled
test / test-restore-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (auto, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (false, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (false, windows-latest) (push) Has been cancelled
test / test-restore-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (true, windows-latest) (push) Has been cancelled
test / test-restore-cache-local (push) Has been cancelled
test / cleanup-tilde-expansion-tests (push) Has been cancelled
test / all-tests-passed (push) Has been cancelled
2025-10-16 08:23:23 +02:00
Kevin Stillhammer
dffc6292f2 Use working-directory to detect empty workdir (#645)
Fixes: #642
2025-10-16 08:21:58 +02:00
github-actions[bot]
6e346e1653 chore: update known checksums for 0.9.3 (#644)
chore: update known checksums for 0.9.3

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2025-10-16 07:45:10 +02:00
dependabot[bot]
3ccd0fd498 Bump github/codeql-action from 4.30.7 to 4.30.8 (#639)
Some checks failed
test / test-default-version (macos-latest) (push) Has been cancelled
test / test-default-version (windows-latest) (push) Has been cancelled
test / test-checksum (map[checksum:a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218 os:macos-latest]) (push) Has been cancelled
test / test-activate-environment (macos-latest) (push) Has been cancelled
test / test-activate-environment (windows-latest) (push) Has been cancelled
test / test-setup-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (false, windows-latest) (push) Has been cancelled
test / test-setup-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (true, windows-latest) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:/home/ubuntu/.cache/uv os:selfhosted-ubuntu-arm64]) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Has been cancelled
test / test-setup-cache-local (push) Has been cancelled
test / test-tilde-expansion-cache-local-path (push) Has been cancelled
test / test-tilde-expansion-cache-dependency-glob (push) Has been cancelled
test / test-python-install-dir (map[expected-python-dir:/home/ubuntu/.local/share/uv/python os:selfhosted-ubuntu-arm64]) (push) Has been cancelled
test / test-python-install-dir (map[expected-python-dir:D:\a\_temp\uv-python-dir os:windows-latest]) (push) Has been cancelled
test / test-restore-cache (true, windows-latest) (push) Has been cancelled
test / test-restore-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (auto, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (auto, windows-latest) (push) Has been cancelled
test / test-restore-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (false, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (false, windows-latest) (push) Has been cancelled
test / test-restore-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache-local (push) Has been cancelled
test / cleanup-tilde-expansion-tests (push) Has been cancelled
test / all-tests-passed (push) Has been cancelled
Update known versions / build (push) Has been cancelled
Bumps [github/codeql-action](https://github.com/github/codeql-action)
from 4.30.7 to 4.30.8.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/github/codeql-action/releases">github/codeql-action's
releases</a>.</em></p>
<blockquote>
<h2>v4.30.8</h2>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<h2>4.30.8 - 10 Oct 2025</h2>
<p>No user facing changes.</p>
<p>See the full <a
href="https://github.com/github/codeql-action/blob/v4.30.8/CHANGELOG.md">CHANGELOG.md</a>
for more information.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/github/codeql-action/blob/main/CHANGELOG.md">github/codeql-action's
changelog</a>.</em></p>
<blockquote>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<h2>[UNRELEASED]</h2>
<p>No user facing changes.</p>
<h2>4.30.8 - 10 Oct 2025</h2>
<p>No user facing changes.</p>
<h2>4.30.7 - 06 Oct 2025</h2>
<ul>
<li>[v4+ only] The CodeQL Action now runs on Node.js v24. <a
href="https://redirect.github.com/github/codeql-action/pull/3169">#3169</a></li>
</ul>
<h2>3.30.6 - 02 Oct 2025</h2>
<ul>
<li>Update default CodeQL bundle version to 2.23.2. <a
href="https://redirect.github.com/github/codeql-action/pull/3168">#3168</a></li>
</ul>
<h2>3.30.5 - 26 Sep 2025</h2>
<ul>
<li>We fixed a bug that was introduced in <code>3.30.4</code> with
<code>upload-sarif</code> which resulted in files without a
<code>.sarif</code> extension not getting uploaded. <a
href="https://redirect.github.com/github/codeql-action/pull/3160">#3160</a></li>
</ul>
<h2>3.30.4 - 25 Sep 2025</h2>
<ul>
<li>We have improved the CodeQL Action's ability to validate that the
workflow it is used in does not use different versions of the CodeQL
Action for different workflow steps. Mixing different versions of the
CodeQL Action in the same workflow is unsupported and can lead to
unpredictable results. A warning will now be emitted from the
<code>codeql-action/init</code> step if different versions of the CodeQL
Action are detected in the workflow file. Additionally, an error will
now be thrown by the other CodeQL Action steps if they load a
configuration file that was generated by a different version of the
<code>codeql-action/init</code> step. <a
href="https://redirect.github.com/github/codeql-action/pull/3099">#3099</a>
and <a
href="https://redirect.github.com/github/codeql-action/pull/3100">#3100</a></li>
<li>We added support for reducing the size of dependency caches for Java
analyses, which will reduce cache usage and speed up workflows. This
will be enabled automatically at a later time. <a
href="https://redirect.github.com/github/codeql-action/pull/3107">#3107</a></li>
<li>You can now run the latest CodeQL nightly bundle by passing
<code>tools: nightly</code> to the <code>init</code> action. In general,
the nightly bundle is unstable and we only recommend running it when
directed by GitHub staff. <a
href="https://redirect.github.com/github/codeql-action/pull/3130">#3130</a></li>
<li>Update default CodeQL bundle version to 2.23.1. <a
href="https://redirect.github.com/github/codeql-action/pull/3118">#3118</a></li>
</ul>
<h2>3.30.3 - 10 Sep 2025</h2>
<p>No user facing changes.</p>
<h2>3.30.2 - 09 Sep 2025</h2>
<ul>
<li>Fixed a bug which could cause language autodetection to fail. <a
href="https://redirect.github.com/github/codeql-action/pull/3084">#3084</a></li>
<li>Experimental: The <code>quality-queries</code> input that was added
in <code>3.29.2</code> as part of an internal experiment is now
deprecated and will be removed in an upcoming version of the CodeQL
Action. It has been superseded by a new <code>analysis-kinds</code>
input, which is part of the same internal experiment. Do not use this in
production as it is subject to change at any time. <a
href="https://redirect.github.com/github/codeql-action/pull/3064">#3064</a></li>
</ul>
<h2>3.30.1 - 05 Sep 2025</h2>
<ul>
<li>Update default CodeQL bundle version to 2.23.0. <a
href="https://redirect.github.com/github/codeql-action/pull/3077">#3077</a></li>
</ul>
<h2>3.30.0 - 01 Sep 2025</h2>
<ul>
<li>Reduce the size of the CodeQL Action, speeding up workflows by
approximately 4 seconds. <a
href="https://redirect.github.com/github/codeql-action/pull/3054">#3054</a></li>
</ul>
<h2>3.29.11 - 21 Aug 2025</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f443b600d9"><code>f443b60</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/3198">#3198</a>
from github/update-v4.30.8-527f0f324</li>
<li><a
href="7a2cb623ed"><code>7a2cb62</code></a>
Update changelog for v4.30.8</li>
<li><a
href="527f0f324a"><code>527f0f3</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/3195">#3195</a>
from github/dependabot/npm_and_yarn/npm-minor-37415c...</li>
<li><a
href="f402506f0f"><code>f402506</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/3196">#3196</a>
from github/dependabot/github_actions/dot-github/wor...</li>
<li><a
href="f5e53f9476"><code>f5e53f9</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/3197">#3197</a>
from github/dependabot/github_actions/dot-github/wor...</li>
<li><a
href="4e90a42a3e"><code>4e90a42</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/3193">#3193</a>
from github/mbg/ff/tools-toolcache</li>
<li><a
href="413a4a4df1"><code>413a4a4</code></a>
Rebuild</li>
<li><a
href="452186448a"><code>4521864</code></a>
Bump github/codeql-action from 3 to 4 in /.github/workflows</li>
<li><a
href="eadf14bf6e"><code>eadf14b</code></a>
Bump ruby/setup-ruby</li>
<li><a
href="e1257b6fda"><code>e1257b6</code></a>
Rebuild</li>
<li>Additional commits viewable in <a
href="e296a93559...f443b600d9">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github/codeql-action&package-manager=github_actions&previous-version=4.30.7&new-version=4.30.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-14 13:40:58 +02:00
dependabot[bot]
ce6dbd84e1 Bump actions/setup-node from 5.0.0 to 6.0.0 (#641)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from
5.0.0 to 6.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/setup-node/releases">actions/setup-node's
releases</a>.</em></p>
<blockquote>
<h2>v6.0.0</h2>
<h2>What's Changed</h2>
<p><strong>Breaking Changes</strong></p>
<ul>
<li>Limit automatic caching to npm, update workflows and documentation
by <a
href="https://github.com/priyagupta108"><code>@​priyagupta108</code></a>
in <a
href="https://redirect.github.com/actions/setup-node/pull/1374">actions/setup-node#1374</a></li>
</ul>
<p><strong>Dependency Upgrades</strong></p>
<ul>
<li>Upgrade ts-jest from 29.1.2 to 29.4.1 and document breaking changes
in v5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/setup-node/pull/1336">#1336</a></li>
<li>Upgrade prettier from 2.8.8 to 3.6.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/setup-node/pull/1334">#1334</a></li>
<li>Upgrade actions/publish-action from 0.3.0 to 0.4.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/setup-node/pull/1362">#1362</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/setup-node/compare/v5...v6.0.0">https://github.com/actions/setup-node/compare/v5...v6.0.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2028fbc5c2"><code>2028fbc</code></a>
Limit automatic caching to npm, update workflows and documentation (<a
href="https://redirect.github.com/actions/setup-node/issues/1374">#1374</a>)</li>
<li><a
href="13427813f7"><code>1342781</code></a>
Bump actions/publish-action from 0.3.0 to 0.4.0 (<a
href="https://redirect.github.com/actions/setup-node/issues/1362">#1362</a>)</li>
<li><a
href="89d709d423"><code>89d709d</code></a>
Bump prettier from 2.8.8 to 3.6.2 (<a
href="https://redirect.github.com/actions/setup-node/issues/1334">#1334</a>)</li>
<li><a
href="cd2651c462"><code>cd2651c</code></a>
Bump ts-jest from 29.1.2 to 29.4.1 (<a
href="https://redirect.github.com/actions/setup-node/issues/1336">#1336</a>)</li>
<li>See full diff in <a
href="a0853c2454...2028fbc5c2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-node&package-manager=github_actions&previous-version=5.0.0&new-version=6.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-14 13:40:46 +02:00
dependabot[bot]
2382069a66 Bump eifinger/actionlint-action from 1.9.1 to 1.9.2 (#634)
Some checks failed
test / test-python-version (macos-latest) (push) Has been cancelled
test / test-python-version (windows-latest) (push) Has been cancelled
test / test-activate-environment (macos-latest) (push) Has been cancelled
test / test-activate-environment (windows-latest) (push) Has been cancelled
test / test-setup-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (auto, windows-latest) (push) Has been cancelled
test / test-setup-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (false, windows-latest) (push) Has been cancelled
test / test-setup-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (true, windows-latest) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:/home/ubuntu/.cache/uv os:selfhosted-ubuntu-arm64]) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Has been cancelled
test / test-setup-cache-local (push) Has been cancelled
test / test-tilde-expansion-cache-local-path (push) Has been cancelled
test / test-tilde-expansion-cache-dependency-glob (push) Has been cancelled
test / test-python-install-dir (map[expected-python-dir:/home/ubuntu/.local/share/uv/python os:selfhosted-ubuntu-arm64]) (push) Has been cancelled
test / test-python-install-dir (map[expected-python-dir:D:\a\_temp\uv-python-dir os:windows-latest]) (push) Has been cancelled
test / test-restore-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (true, windows-latest) (push) Has been cancelled
test / test-restore-cache (auto, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (auto, windows-latest) (push) Has been cancelled
test / test-restore-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (false, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (false, windows-latest) (push) Has been cancelled
test / test-restore-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache-local (push) Has been cancelled
test / cleanup-tilde-expansion-tests (push) Has been cancelled
test / all-tests-passed (push) Has been cancelled
Update known versions / build (push) Has been cancelled
Bumps
[eifinger/actionlint-action](https://github.com/eifinger/actionlint-action)
from 1.9.1 to 1.9.2.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="03ff1f78c0"><code>03ff1f7</code></a>
Bump actions/checkout to v5 (<a
href="https://redirect.github.com/eifinger/actionlint-action/issues/26">#26</a>)</li>
<li><a
href="5f8fad542a"><code>5f8fad5</code></a>
Replace haya14busa/action-update-semver</li>
<li><a
href="04e640ab28"><code>04e640a</code></a>
set default actionlint version to 1.7.8</li>
<li>See full diff in <a
href="23c85443d8...03ff1f78c0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=eifinger/actionlint-action&package-manager=github_actions&previous-version=1.9.1&new-version=1.9.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-13 13:30:22 +02:00
Kevin Stillhammer
b1daf91f4e Update lockfile with latest npm (#636) 2025-10-13 13:15:28 +02:00
Kevin Stillhammer
3259c6206f Bump deps (#633)
Some checks failed
test / test-tilde-expansion-tool-dirs (push) Has been cancelled
test / test-python-version (macos-latest) (push) Has been cancelled
test / test-python-version (windows-latest) (push) Has been cancelled
test / test-activate-environment (macos-latest) (push) Has been cancelled
test / test-activate-environment (windows-latest) (push) Has been cancelled
test / test-setup-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (auto, windows-latest) (push) Has been cancelled
test / test-setup-cache (false, windows-latest) (push) Has been cancelled
test / test-setup-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (true, windows-latest) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:/home/ubuntu/.cache/uv os:selfhosted-ubuntu-arm64]) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Has been cancelled
test / test-setup-cache-local (push) Has been cancelled
test / test-tilde-expansion-cache-local-path (push) Has been cancelled
test / test-tilde-expansion-cache-dependency-glob (push) Has been cancelled
test / test-python-install-dir (map[expected-python-dir:/home/ubuntu/.local/share/uv/python os:selfhosted-ubuntu-arm64]) (push) Has been cancelled
test / test-python-install-dir (map[expected-python-dir:D:\a\_temp\uv-python-dir os:windows-latest]) (push) Has been cancelled
test / test-restore-cache (auto, windows-latest) (push) Has been cancelled
test / test-restore-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (false, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (false, windows-latest) (push) Has been cancelled
test / test-restore-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (auto, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (true, windows-latest) (push) Has been cancelled
test / test-restore-cache-local (push) Has been cancelled
test / cleanup-tilde-expansion-tests (push) Has been cancelled
test / all-tests-passed (push) Has been cancelled
Update known versions / build (push) Has been cancelled
2025-10-12 20:47:54 +02:00
Kevin Stillhammer
bf8e8ed895 Split up documentation (#632)
Closes: #558
2025-10-12 20:27:08 +02:00
Copilot
9c6b5e9fb5 Add resolution-strategy input to support oldest compatible version selection (#631)
Some checks failed
test / test-tool-install (macos-14) (push) Has been cancelled
test / test-python-version (windows-latest) (push) Has been cancelled
test / test-activate-environment (macos-latest) (push) Has been cancelled
test / test-activate-environment (windows-latest) (push) Has been cancelled
test / test-setup-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (auto, windows-latest) (push) Has been cancelled
test / test-setup-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (false, windows-latest) (push) Has been cancelled
test / test-setup-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (true, windows-latest) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:/home/ubuntu/.cache/uv os:selfhosted-ubuntu-arm64]) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Has been cancelled
test / test-setup-cache-local (push) Has been cancelled
test / test-tilde-expansion-cache-local-path (push) Has been cancelled
test / test-tilde-expansion-cache-dependency-glob (push) Has been cancelled
test / test-python-install-dir (map[expected-python-dir:/home/ubuntu/.local/share/uv/python os:selfhosted-ubuntu-arm64]) (push) Has been cancelled
test / test-restore-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / cleanup-tilde-expansion-tests (push) Has been cancelled
test / all-tests-passed (push) Has been cancelled
test / test-python-install-dir (map[expected-python-dir:D:\a\_temp\uv-python-dir os:windows-latest]) (push) Has been cancelled
test / test-restore-cache (false, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (false, windows-latest) (push) Has been cancelled
test / test-restore-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (true, windows-latest) (push) Has been cancelled
test / test-restore-cache (auto, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (auto, windows-latest) (push) Has been cancelled
test / test-restore-cache-local (push) Has been cancelled
Update known versions / build (push) Has been cancelled
Adds a new `resolution-strategy` input that allows users to choose
between installing the highest (default) or lowest compatible version
when resolving version ranges.
2025-10-11 21:02:04 +02:00
Kevin Stillhammer
a5129e99f4 Add copilot-instructions.md (#630) 2025-10-11 19:18:50 +02:00
Kevin Stillhammer
d18bcc753a Add value of UV_PYTHON_INSTALL_DIR to path (#628)
Closes: #610
2025-10-11 18:42:06 +02:00
Kevin Stillhammer
bd1f875aba Set output venv when activate-environment is used (#627)
Closes: #622
2025-10-11 15:17:25 +02:00
github-actions[bot]
1a91c3851d chore: update known checksums for 0.9.2 (#626)
Some checks failed
test / test-default-version (macos-latest) (push) Has been cancelled
test / test-default-version (windows-latest) (push) Has been cancelled
test / test-checksum (map[checksum:a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218 os:macos-latest]) (push) Has been cancelled
test / test-python-version (macos-latest) (push) Has been cancelled
test / test-python-version (windows-latest) (push) Has been cancelled
test / test-activate-environment (macos-latest) (push) Has been cancelled
test / test-activate-environment (windows-latest) (push) Has been cancelled
test / test-setup-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (auto, windows-latest) (push) Has been cancelled
test / test-setup-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (false, windows-latest) (push) Has been cancelled
test / test-setup-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (true, windows-latest) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:/home/ubuntu/.cache/uv os:selfhosted-ubuntu-arm64]) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Has been cancelled
test / test-setup-cache-local (push) Has been cancelled
test / test-tilde-expansion-cache-local-path (push) Has been cancelled
test / test-tilde-expansion-cache-dependency-glob (push) Has been cancelled
test / test-restore-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (true, windows-latest) (push) Has been cancelled
test / test-restore-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (false, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (false, windows-latest) (push) Has been cancelled
test / test-restore-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (auto, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (auto, windows-latest) (push) Has been cancelled
test / test-restore-cache-local (push) Has been cancelled
test / cleanup-tilde-expansion-tests (push) Has been cancelled
test / all-tests-passed (push) Has been cancelled
Co-authored-by: woodruffw <woodruffw@users.noreply.github.com>
2025-10-10 17:11:01 -04:00
github-actions[bot]
c79f606987 chore: update known checksums for 0.9.1 (#625)
Some checks failed
test / test-tool-install (macos-14) (push) Has been cancelled
test / test-tilde-expansion-tool-dirs (push) Has been cancelled
test / test-python-version (macos-latest) (push) Has been cancelled
test / test-python-version (windows-latest) (push) Has been cancelled
test / test-activate-environment (macos-latest) (push) Has been cancelled
test / test-activate-environment (windows-latest) (push) Has been cancelled
test / test-setup-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (auto, windows-latest) (push) Has been cancelled
test / test-setup-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (false, windows-latest) (push) Has been cancelled
test / test-setup-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (true, windows-latest) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:/home/ubuntu/.cache/uv os:selfhosted-ubuntu-arm64]) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Has been cancelled
test / test-setup-cache-local (push) Has been cancelled
test / test-tilde-expansion-cache-local-path (push) Has been cancelled
test / test-tilde-expansion-cache-dependency-glob (push) Has been cancelled
test / test-restore-cache (true, windows-latest) (push) Has been cancelled
test / test-restore-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (auto, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (auto, windows-latest) (push) Has been cancelled
test / test-restore-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (false, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (false, windows-latest) (push) Has been cancelled
test / test-restore-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache-local (push) Has been cancelled
test / all-tests-passed (push) Has been cancelled
test / test-restore-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / cleanup-tilde-expansion-tests (push) Has been cancelled
Update known versions / build (push) Has been cancelled
chore: update known checksums for 0.9.1

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2025-10-10 17:24:01 +02:00
Kevin Stillhammer
e0249f1599 Fall back to PR for updating known versions (#623) 2025-10-10 17:23:48 +02:00
Merlin
6d2eb15b49 Cache python installs (#621)
Some checks failed
test / test-default-version (windows-latest) (push) Has been cancelled
test / test-tilde-expansion-tool-dirs (push) Has been cancelled
test / test-checksum (map[checksum:a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218 os:macos-latest]) (push) Has been cancelled
test / test-python-version (macos-latest) (push) Has been cancelled
test / test-python-version (windows-latest) (push) Has been cancelled
test / test-activate-environment (macos-latest) (push) Has been cancelled
test / test-activate-environment (windows-latest) (push) Has been cancelled
test / test-setup-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (auto, windows-latest) (push) Has been cancelled
test / test-setup-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (false, windows-latest) (push) Has been cancelled
test / test-setup-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (true, windows-latest) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:/home/ubuntu/.cache/uv os:selfhosted-ubuntu-arm64]) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Has been cancelled
test / test-setup-cache-local (push) Has been cancelled
test / test-tilde-expansion-cache-local-path (push) Has been cancelled
test / test-tilde-expansion-cache-dependency-glob (push) Has been cancelled
test / test-restore-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (true, windows-latest) (push) Has been cancelled
test / test-restore-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (false, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (false, windows-latest) (push) Has been cancelled
test / test-restore-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (auto, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (auto, windows-latest) (push) Has been cancelled
test / test-restore-cache-local (push) Has been cancelled
test / cleanup-tilde-expansion-tests (push) Has been cancelled
test / all-tests-passed (push) Has been cancelled
This pull request introduces support for caching Python installs in the
GitHub Action, allowing users to cache not only dependencies but also
the Python interpreter itself.

This works by setting the `UV_PYTHON_INSTALL_DIR` to a subdirectory of
the dependency cache path so that Python installs are directed there.

Fixes #135

---------

Co-authored-by: Kevin Stillhammer <kevin.stillhammer@gmail.com>
2025-10-09 22:47:24 +02:00
dependabot[bot]
3495667518 Bump github/codeql-action from 3.30.6 to 4.30.7 (#614)
Some checks failed
test / test-checksum (map[checksum:a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218 os:macos-latest]) (push) Has been cancelled
test / test-tool-install (macos-14) (push) Has been cancelled
test / test-python-version (macos-latest) (push) Has been cancelled
test / test-python-version (windows-latest) (push) Has been cancelled
test / test-activate-environment (macos-latest) (push) Has been cancelled
test / test-activate-environment (windows-latest) (push) Has been cancelled
test / test-setup-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (auto, windows-latest) (push) Has been cancelled
test / test-setup-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (false, windows-latest) (push) Has been cancelled
test / test-setup-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (true, windows-latest) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:/home/ubuntu/.cache/uv os:selfhosted-ubuntu-arm64]) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Has been cancelled
test / test-setup-cache-local (push) Has been cancelled
test / test-tilde-expansion-cache-local-path (push) Has been cancelled
test / test-tilde-expansion-cache-dependency-glob (push) Has been cancelled
test / test-restore-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (false, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (false, windows-latest) (push) Has been cancelled
test / test-restore-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (auto, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (auto, windows-latest) (push) Has been cancelled
test / test-restore-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache-local (push) Has been cancelled
test / test-restore-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (true, windows-latest) (push) Has been cancelled
test / cleanup-tilde-expansion-tests (push) Has been cancelled
test / all-tests-passed (push) Has been cancelled
Update known versions / build (push) Has been cancelled
Bumps [github/codeql-action](https://github.com/github/codeql-action)
from 3.30.6 to 4.30.7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/github/codeql-action/releases">github/codeql-action's
releases</a>.</em></p>
<blockquote>
<h2>v4.30.7</h2>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<h2>4.30.7 - 06 Oct 2025</h2>
<ul>
<li>[v4+ only] The CodeQL Action now runs on Node.js v24. <a
href="https://redirect.github.com/github/codeql-action/pull/3169">#3169</a></li>
</ul>
<p>See the full <a
href="https://github.com/github/codeql-action/blob/v4.30.7/CHANGELOG.md">CHANGELOG.md</a>
for more information.</p>
<h2>v3.30.7</h2>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<h2>3.30.7 - 06 Oct 2025</h2>
<p>No user facing changes.</p>
<p>See the full <a
href="https://github.com/github/codeql-action/blob/v3.30.7/CHANGELOG.md">CHANGELOG.md</a>
for more information.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/github/codeql-action/blob/main/CHANGELOG.md">github/codeql-action's
changelog</a>.</em></p>
<blockquote>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<h2>[UNRELEASED]</h2>
<p>No user facing changes.</p>
<h2>4.30.7 - 06 Oct 2025</h2>
<ul>
<li>[v4+ only] The CodeQL Action now runs on Node.js v24. <a
href="https://redirect.github.com/github/codeql-action/pull/3169">#3169</a></li>
</ul>
<h2>3.30.6 - 02 Oct 2025</h2>
<ul>
<li>Update default CodeQL bundle version to 2.23.2. <a
href="https://redirect.github.com/github/codeql-action/pull/3168">#3168</a></li>
</ul>
<h2>3.30.5 - 26 Sep 2025</h2>
<ul>
<li>We fixed a bug that was introduced in <code>3.30.4</code> with
<code>upload-sarif</code> which resulted in files without a
<code>.sarif</code> extension not getting uploaded. <a
href="https://redirect.github.com/github/codeql-action/pull/3160">#3160</a></li>
</ul>
<h2>3.30.4 - 25 Sep 2025</h2>
<ul>
<li>We have improved the CodeQL Action's ability to validate that the
workflow it is used in does not use different versions of the CodeQL
Action for different workflow steps. Mixing different versions of the
CodeQL Action in the same workflow is unsupported and can lead to
unpredictable results. A warning will now be emitted from the
<code>codeql-action/init</code> step if different versions of the CodeQL
Action are detected in the workflow file. Additionally, an error will
now be thrown by the other CodeQL Action steps if they load a
configuration file that was generated by a different version of the
<code>codeql-action/init</code> step. <a
href="https://redirect.github.com/github/codeql-action/pull/3099">#3099</a>
and <a
href="https://redirect.github.com/github/codeql-action/pull/3100">#3100</a></li>
<li>We added support for reducing the size of dependency caches for Java
analyses, which will reduce cache usage and speed up workflows. This
will be enabled automatically at a later time. <a
href="https://redirect.github.com/github/codeql-action/pull/3107">#3107</a></li>
<li>You can now run the latest CodeQL nightly bundle by passing
<code>tools: nightly</code> to the <code>init</code> action. In general,
the nightly bundle is unstable and we only recommend running it when
directed by GitHub staff. <a
href="https://redirect.github.com/github/codeql-action/pull/3130">#3130</a></li>
<li>Update default CodeQL bundle version to 2.23.1. <a
href="https://redirect.github.com/github/codeql-action/pull/3118">#3118</a></li>
</ul>
<h2>3.30.3 - 10 Sep 2025</h2>
<p>No user facing changes.</p>
<h2>3.30.2 - 09 Sep 2025</h2>
<ul>
<li>Fixed a bug which could cause language autodetection to fail. <a
href="https://redirect.github.com/github/codeql-action/pull/3084">#3084</a></li>
<li>Experimental: The <code>quality-queries</code> input that was added
in <code>3.29.2</code> as part of an internal experiment is now
deprecated and will be removed in an upcoming version of the CodeQL
Action. It has been superseded by a new <code>analysis-kinds</code>
input, which is part of the same internal experiment. Do not use this in
production as it is subject to change at any time. <a
href="https://redirect.github.com/github/codeql-action/pull/3064">#3064</a></li>
</ul>
<h2>3.30.1 - 05 Sep 2025</h2>
<ul>
<li>Update default CodeQL bundle version to 2.23.0. <a
href="https://redirect.github.com/github/codeql-action/pull/3077">#3077</a></li>
</ul>
<h2>3.30.0 - 01 Sep 2025</h2>
<ul>
<li>Reduce the size of the CodeQL Action, speeding up workflows by
approximately 4 seconds. <a
href="https://redirect.github.com/github/codeql-action/pull/3054">#3054</a></li>
</ul>
<h2>3.29.11 - 21 Aug 2025</h2>
<ul>
<li>Update default CodeQL bundle version to 2.22.4. <a
href="https://redirect.github.com/github/codeql-action/pull/3044">#3044</a></li>
</ul>
<h2>3.29.10 - 18 Aug 2025</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="e296a93559"><code>e296a93</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/3183">#3183</a>
from github/update-v4.30.7-55283843c</li>
<li><a
href="93c16735fa"><code>93c1673</code></a>
Update changelog for v4.30.7</li>
<li><a
href="55283843ca"><code>5528384</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/3169">#3169</a>
from github/mario-campos/node24</li>
<li><a
href="b66db86c84"><code>b66db86</code></a>
Hoist CHANGELOG note back to &quot;UNRELEASED&quot; section.</li>
<li><a
href="b2e22323e2"><code>b2e2232</code></a>
Merge remote-tracking branch 'origin/main' into mario-campos/node24</li>
<li><a
href="065c6cfb78"><code>065c6cf</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/3174">#3174</a>
from github/mbg/fix/start-proxy-matrix</li>
<li><a
href="7fb8378d93"><code>7fb8378</code></a>
Re-throw exception in <code>createStatusReportBase</code> when in test
mode</li>
<li><a
href="dddf033776"><code>dddf033</code></a>
Revert changes to build.mjs</li>
<li><a
href="54ae8ba5b1"><code>54ae8ba</code></a>
Simplify PR check by reverting changes to <code>@types/node</code>.</li>
<li><a
href="65e9e640ee"><code>65e9e64</code></a>
Make <code>matrix</code> available to <code>start-proxy</code>
action</li>
<li>Additional commits viewable in <a
href="64d10c1313...e296a93559">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github/codeql-action&package-manager=github_actions&previous-version=3.30.6&new-version=4.30.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-09 07:56:50 +02:00
24 changed files with 3699 additions and 1421 deletions

263
.github/copilot-instructions.md vendored Normal file
View File

@@ -0,0 +1,263 @@
# Copilot Instructions for setup-uv
This document provides essential information for GitHub Copilot coding agents working on the `astral-sh/setup-uv` repository.
## Repository Overview
**setup-uv** is a GitHub Action that sets up the [uv](https://docs.astral.sh/uv/)
Python package installer in GitHub Actions workflows.
It's a TypeScript-based action that downloads uv binaries, manages caching, handles version resolution,
and configures the environment for subsequent workflow steps.
### Key Features
- Downloads and installs specific uv versions from GitHub releases
- Supports version resolution from config files (pyproject.toml, uv.toml, .tool-versions)
- Implements intelligent caching for both uv cache and Python installations
- Provides cross-platform support (Linux, macOS, Windows, including ARM architectures)
- Includes problem matchers for Python error reporting
- Supports environment activation and custom tool directories
## Repository Structure
**Size**: Small-medium repository (~50 source files, ~400 total files including dependencies)
**Languages**: TypeScript (primary), JavaScript (compiled output), JSON (configuration)
**Runtime**: Node.js 24 (GitHub Actions runtime)
**Key Dependencies**: @actions/core, @actions/cache, @actions/tool-cache, @octokit/core
### Core Architecture
```
src/
├── setup-uv.ts # Main entry point and orchestration
├── save-cache.ts # Post-action cache saving logic
├── update-known-versions.ts # Maintenance script for version updates
├── cache/ # Cache management functionality
├── download/ # Version resolution and binary downloading
├── utils/ # Input parsing, platform detection, configuration
└── version/ # Version resolution from various file formats
```
### Key Files and Locations
- **Action Definition**: `action.yml` - Defines all inputs/outputs and entry points
- **Main Source**: `src/setup-uv.ts` - Primary action logic
- **Configuration**: `biome.json` (linting), `tsconfig.json` (TypeScript), `jest.config.js` (testing)
- **Compiled Output**: `dist/` - Contains compiled Node.js bundles (auto-generated, committed)
- **Test Fixtures**: `__tests__/fixtures/` - Sample projects for different configuration scenarios
- **Workflows**: `.github/workflows/test.yml` - Comprehensive CI/CD pipeline
## Build and Development Process
### Prerequisites
- Node.js 24+ (matches GitHub Actions runtime)
- npm (included with Node.js)
### Essential Commands (ALWAYS run in this order)
#### 1. Install Dependencies
```bash
npm install
```
**Timing**: ~20-30 seconds
**Note**: Always run this first after cloning or when package.json changes
#### 2. Build TypeScript
```bash
npm run build
```
**Timing**: ~5-10 seconds
**Purpose**: Compiles TypeScript source to JavaScript in `lib/` directory
#### 3. Lint and Format Code
```bash
npm run check
```
**Timing**: ~2-5 seconds
**Tool**: Biome (replaces ESLint/Prettier)
**Auto-fixes**: Formatting, import organization, basic linting issues
#### 4. Package for Distribution
```bash
npm run package
```
**Timing**: ~20-30 seconds
**Purpose**: Creates bundled distributions in `dist/` using @vercel/ncc
**Critical**: This step MUST be run before committing - the `dist/` files are used by GitHub Actions
#### 5. Run Tests
```bash
npm test
```
**Timing**: ~10-15 seconds
**Framework**: Jest with TypeScript support
**Coverage**: Unit tests for version resolution, input parsing, checksum validation
#### 6. Complete Validation (Recommended)
```bash
npm run all
```
**Timing**: ~60-90 seconds
**Purpose**: Runs build → check → package → test in sequence
**Use**: Before making pull requests or when unsure about build state
### Important Build Notes
**CRITICAL**: Always run `npm run package` after making code changes. The `dist/` directory contains the compiled bundles that GitHub Actions actually executes. Forgetting this step will cause your changes to have no effect.
**TypeScript Warnings**: You may see ts-jest warnings about "isolatedModules" - these are harmless and don't affect functionality.
**Biome**: This project uses Biome instead of ESLint/Prettier. Run `npm run check` to fix formatting and linting issues automatically.
## Testing Strategy
### Unit Tests
- **Location**: `__tests__/` directory
- **Framework**: Jest with ts-jest transformer
- **Coverage**: Version resolution, input parsing, checksum validation, utility functions
### Integration Tests
- **Location**: `.github/workflows/test.yml`
- **Scope**: Full end-to-end testing across multiple platforms and scenarios
- **Key Test Categories**:
- Version installation (specific, latest, semver ranges)
- Cache behavior (setup, restore, invalidation)
- Cross-platform compatibility (Ubuntu, macOS, Windows, ARM)
- Configuration file parsing (pyproject.toml, uv.toml, requirements.txt)
- Error handling and edge cases
### Test Fixtures
Located in `__tests__/fixtures/`, these provide sample projects with different configurations:
- `pyproject-toml-project/` - Standard Python project with uv version specification
- `uv-toml-project/` - Project using uv.toml configuration
- `requirements-txt-project/` - Legacy requirements.txt format
- `cache-dir-defined-project/` - Custom cache directory configuration
## Continuous Integration
### GitHub Workflows
#### Primary Test Suite (`.github/workflows/test.yml`)
- **Triggers**: PRs, pushes to main, manual dispatch
- **Matrix**: Multiple OS (Ubuntu, macOS, Windows), architecture (x64, ARM), and configuration combinations
- **Duration**: ~5 minutes for full matrix
- **Key Validations**:
- Cross-platform installation and functionality
- Cache behavior and performance
- Version resolution from various sources
- Tool directory configurations
- Problem matcher functionality
#### Maintenance Workflows
- **CodeQL Analysis**: Security scanning on pushes/PRs
- **Update Known Versions**: Daily job to sync with latest uv releases
- **Dependabot**: Automated dependency updates
### Pre-commit Validation
The CI runs these checks that you should run locally:
1. `npm run all` - Complete build and test suite
2. ActionLint - GitHub Actions workflow validation
3. Change detection - Ensures no uncommitted build artifacts
## Key Configuration Files
### Action Configuration (`action.yml`)
Defines 20+ inputs including version specifications,
cache settings, tool directories, and environment options.
This file is the authoritative source for understanding available action parameters.
### TypeScript Configuration (`tsconfig.json`)
- Target: ES2024
- Module: nodenext (Node.js modules)
- Strict mode enabled
- Output directory: `lib/`
### Linting Configuration (`biome.json`)
- Formatter and linter combined
- Enforces consistent code style
- Automatically organizes imports and sorts object keys
## Common Development Patterns
### Making Code Changes
1. Edit TypeScript source files in `src/`
2. Run `npm run build` to compile
3. Run `npm run check` to format and lint
4. Run `npm run package` to update distribution bundles
5. Run `npm test` to verify functionality
6. Commit all changes including `dist/` files
### Adding New Features
- Follow existing patterns in `src/utils/inputs.ts` for new action inputs
- Update `action.yml` to declare new inputs/outputs
- Add corresponding tests in `__tests__/`
- Add a test in `.github/workflows/test.yml` if it affects integration
- Update README.md with usage examples
### Cache-Related Changes
- Cache logic is complex and affects performance significantly
- Test with multiple cache scenarios (hit, miss, invalidation)
- Consider impact on both GitHub-hosted and self-hosted runners
- Validate cache key generation and dependency detection
### Version Resolution Changes
- Version resolution supports multiple file formats and precedence rules
- Test with fixtures in `__tests__/fixtures/`
- Consider backward compatibility with existing projects
- Validate semver and PEP 440 specification handling
## Troubleshooting
### Build Failures
- **"Module not found"**: Run `npm install` to ensure dependencies are installed
- **TypeScript errors**: Check `tsconfig.json` and ensure all imports are valid
- **Test failures**: Check if test fixtures have been modified or if logic changes broke assumptions
### Action Failures in Workflows
- **Changes not taking effect**: Ensure `npm run package` was run and `dist/` files committed
- **Version resolution issues**: Check version specification format and file existence
- **Cache problems**: Verify cache key generation and dependency glob patterns
### Common Gotchas
- **Forgetting to package**: Code changes won't work without running `npm run package`
- **Platform differences**: Windows paths use backslashes, test cross-platform behavior
- **Cache invalidation**: Cache keys are sensitive to dependency file changes
- **Tool directory permissions**: Some platforms require specific directory setups
## Trust These Instructions
These instructions are comprehensive and current. Only search for additional information if:
- You encounter specific error messages not covered here
- You need to understand implementation details of specific functions
- The instructions appear outdated (check repository commit history)
For most development tasks, following the build process and development patterns outlined above will be sufficient.

View File

@@ -47,7 +47,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # v3.30.6
uses: github/codeql-action/init@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v4.30.8
with:
languages: ${{ matrix.language }}
source-root: src
@@ -59,7 +59,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # v3.30.6
uses: github/codeql-action/autobuild@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v4.30.8
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -73,4 +73,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # v3.30.6
uses: github/codeql-action/analyze@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v4.30.8

View File

@@ -25,10 +25,10 @@ jobs:
with:
persist-credentials: false
- name: Actionlint
uses: eifinger/actionlint-action@23c85443d840cd73bbecb9cddfc933cc21649a38 # v1.9.1
uses: eifinger/actionlint-action@03ff1f78c0670b71017616a37170f327df932030 # v1.9.2
- name: Run zizmor
uses: zizmorcore/zizmor-action@e673c3917a1aef3c65c972347ed84ccd013ecda4 # v0.2.0
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: "24"
- run: |
@@ -111,15 +111,28 @@ jobs:
expected-version: "0.3.5"
- version-input: ">=0.4.25,<0.5"
expected-version: "0.4.30"
- version-input: ">=0.4.25,<0.5"
expected-version: "0.4.25"
resolution-strategy: "lowest"
- version-input: ">=0.4.25"
expected-version: "0.4.25"
resolution-strategy: "lowest"
- version-input: ">=0.1,<0.2"
expected-version: "0.1.45"
resolution-strategy: "highest"
- version-input: ">=0.1.0,<0.2"
expected-version: "0.1.0"
resolution-strategy: "lowest"
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Install version ${{ matrix.input.version-input }}
- name: Install version ${{ matrix.input.version-input }} with strategy ${{ matrix.input.resolution-strategy || 'highest' }}
id: setup-uv
uses: ./
with:
version: ${{ matrix.input.version-input }}
resolution-strategy: ${{ matrix.input.resolution-strategy || 'highest' }}
- name: Correct version gets installed
run: |
if [ "$(uv --version)" != "uv ${{ matrix.input.expected-version }}" ]; then
@@ -269,13 +282,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
[
ubuntu-latest,
macos-latest,
macos-14,
windows-latest,
]
os: [ubuntu-latest, macos-latest, macos-14, windows-latest]
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
@@ -334,12 +341,13 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Install latest version
id: setup-uv
uses: ./
with:
python-version: 3.13.1t
@@ -354,6 +362,19 @@ jobs:
exit 1
fi
shell: bash
- name: Verify output venv is set
run: |
if [ -z "$UV_VENV" ]; then
echo "output venv is not set"
exit 1
fi
if [ ! -d "$UV_VENV" ]; then
echo "output venv not point to a directory: $UV_VENV"
exit 1
fi
shell: bash
env:
UV_VENV: ${{ steps.setup-uv.outputs.venv }}
test-musl:
runs-on: ubuntu-latest
@@ -371,8 +392,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
enable-cache: [ "true", "false", "auto" ]
os: [ "ubuntu-latest", "selfhosted-ubuntu-arm64", "windows-latest" ]
enable-cache: ["true", "false", "auto"]
os: ["ubuntu-latest", "selfhosted-ubuntu-arm64", "windows-latest"]
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
@@ -389,8 +410,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
enable-cache: [ "true", "false", "auto" ]
os: [ "ubuntu-latest", "selfhosted-ubuntu-arm64", "windows-latest" ]
enable-cache: ["true", "false", "auto"]
os: ["ubuntu-latest", "selfhosted-ubuntu-arm64", "windows-latest"]
needs: test-setup-cache
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -836,6 +857,96 @@ jobs:
exit 1
fi
test-cache-python-installs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Verify Python install dir is not populated
run: |
if [ -d /home/runner/work/_temp/uv-python-dir ]; then
echo "Python install dir should not exist"
exit 1
fi
- name: Setup uv with cache
uses: ./
with:
enable-cache: true
cache-python: true
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-cache-python-installs
- run: uv sync --managed-python
working-directory: __tests__/fixtures/uv-project
- name: Verify Python install dir exists
run: |
if [ ! -d /home/runner/work/_temp/uv-python-dir ]; then
echo "Python install dir should exist"
exit 1
fi
test-restore-python-installs:
runs-on: ubuntu-latest
needs: test-cache-python-installs
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Verify Python install dir does not exist
run: |
if [ -d /home/runner/work/_temp/uv-python-dir ]; then
echo "Python install dir should not exist"
exit 1
fi
- name: Restore with cache
id: restore
uses: ./
with:
enable-cache: true
cache-python: true
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-cache-python-installs
- name: Verify Python install dir exists
run: |
if [ ! -d /home/runner/work/_temp/uv-python-dir ]; then
echo "Python install dir should exist"
exit 1
fi
- name: Cache was hit
run: |
if [ "$CACHE_HIT" != "true" ]; then
exit 1
fi
env:
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
- run: uv sync --managed-python
working-directory: __tests__/fixtures/uv-project
test-python-install-dir:
strategy:
matrix:
inputs:
- os: ubuntu-latest
expected-python-dir: "/home/runner/work/_temp/uv-python-dir"
- os: windows-latest
expected-python-dir: "D:\\a\\_temp\\uv-python-dir"
- os: selfhosted-ubuntu-arm64
expected-python-dir: "/home/ubuntu/.local/share/uv/python"
runs-on: ${{ matrix.inputs.os }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Install latest version
id: setup-uv
uses: ./
- name: Check Python dir is expected dir
run: |
if [ "$UV_PYTHON_INSTALL_DIR" != "${{ matrix.inputs.expected-python-dir }}" ]; then
echo "Wrong UV_PYTHON_INSTALL_DIR: UV_PYTHON_INSTALL_DIR"
exit 1
fi
shell: bash
- name: Install python works
run: uv python install
all-tests-passed:
runs-on: ubuntu-latest
needs:
@@ -878,6 +989,9 @@ jobs:
- test-relative-path
- test-cache-prune-force
- test-cache-dir-from-file
- test-cache-python-installs
- test-restore-python-installs
- test-python-install-dir
if: always()
steps:
- name: All tests passed

View File

@@ -13,11 +13,12 @@ jobs:
runs-on: ubuntu-24.04-arm
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: true
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: "20"
- name: Update known versions
@@ -28,19 +29,21 @@ jobs:
version-manifest.json
${{ secrets.GITHUB_TOKEN }}
- name: Check for changes
id: changes_exist
id: changes-exist
run: |
git status --porcelain
if [ -n "$(git status --porcelain)" ]; then
echo "changes_exist=true" >> "$GITHUB_OUTPUT"
echo "changes-exist=true" >> "$GITHUB_OUTPUT"
else
echo "changes_exist=false" >> "$GITHUB_OUTPUT"
echo "changes-exist=false" >> "$GITHUB_OUTPUT"
fi
- name: Compile changes
if: ${{ steps.changes_exist.outputs.changes_exist == 'true' }}
if: ${{ steps.changes-exist.outputs.changes-exist == 'true' }}
run: npm ci && npm run all
- name: Commit and push changes
if: ${{ steps.changes_exist.outputs.changes_exist == 'true' }}
if: ${{ steps.changes-exist.outputs.changes-exist == 'true' }}
id: commit-and-push
continue-on-error: true
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
@@ -49,3 +52,19 @@ jobs:
git push origin HEAD:refs/heads/main
env:
LATEST_VERSION: ${{ steps.update-known-versions.outputs.latest-version }}
- name: Create Pull Request
if: ${{ steps.changes-exist.outputs.changes-exist == 'true' && steps.commit-and-push.outcome != 'success' }}
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
with:
commit-message: "chore: update known checksums"
title:
"chore: update known checksums for ${{
steps.update-known-versions.outputs.latest-version }}"
body:
"chore: update known checksums for ${{
steps.update-known-versions.outputs.latest-version }}"
base: main
labels: "automated-pr,update-known-versions"
branch: update-known-versions-pr
delete-branch: true

3
.gitignore vendored
View File

@@ -100,3 +100,6 @@ lib/**/*
# Idea IDEs (PyCharm, WebStorm, IntelliJ, etc)
.idea/
# Compiled scripts
.github/scripts/*.js

545
README.md
View File

@@ -12,27 +12,11 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
- [Usage](#usage)
- [Install a required-version or latest (default)](#install-a-required-version-or-latest-default)
- [Install the latest version](#install-the-latest-version)
- [Install a specific version](#install-a-specific-version)
- [Install a version by supplying a semver range or pep440 specifier](#install-a-version-by-supplying-a-semver-range-or-pep440-specifier)
- [Install a version defined in a requirements or config file](#install-a-version-defined-in-a-requirements-or-config-file)
- [Inputs](#inputs)
- [Outputs](#outputs)
- [Python version](#python-version)
- [Activate environment](#activate-environment)
- [Working directory](#working-directory)
- [Validate checksum](#validate-checksum)
- [Enable Caching](#enable-caching)
- [Cache dependency glob](#cache-dependency-glob)
- [Restore cache](#restore-cache)
- [Save cache](#save-cache)
- [Local cache path](#local-cache-path)
- [Disable cache pruning](#disable-cache-pruning)
- [Ignore nothing to cache](#ignore-nothing-to-cache)
- [GitHub authentication token](#github-authentication-token)
- [UV_TOOL_DIR](#uv_tool_dir)
- [UV_TOOL_BIN_DIR](#uv_tool_bin_dir)
- [Tilde Expansion](#tilde-expansion)
- [Manifest file](#manifest-file)
- [Add problem matchers](#add-problem-matchers)
- [Advanced Configuration](#advanced-configuration)
- [How it works](#how-it-works)
- [FAQ](#faq)
@@ -42,7 +26,7 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
```yaml
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7
```
If you do not specify a version, this action will look for a [required-version](https://docs.astral.sh/uv/reference/settings/#required-version)
@@ -51,65 +35,96 @@ in a `uv.toml` or `pyproject.toml` file in the repository root. If none is found
For an example workflow, see
[here](https://github.com/charliermarsh/autobot/blob/e42c66659bf97b90ca9ff305a19cc99952d0d43f/.github/workflows/ci.yaml).
### Install the latest version
### Inputs
All inputs and their defaults.
Have a look under [Advanced Configuration](#advanced-configuration) for detailed documentation on most of them.
```yaml
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
- name: Install uv with all available options
uses: astral-sh/setup-uv@v7
with:
version: "latest"
# The version of uv to install (default: searches for version in config files, then latest)
version: ""
# Path to a file containing the version of uv to install (default: searches uv.toml then pyproject.toml)
version-file: ""
# Resolution strategy when resolving version ranges: 'highest' or 'lowest'
resolution-strategy: "highest"
# The version of Python to set UV_PYTHON to
python-version: ""
# Use uv venv to activate a venv ready to be used by later steps
activate-environment: "false"
# The directory to execute all commands in and look for files such as pyproject.toml
working-directory: ""
# The checksum of the uv version to install
checksum: ""
# Used to increase the rate limit when retrieving versions and downloading uv
github-token: ${{ github.token }}
# Enable uploading of the uv cache: true, false, or auto (enabled on GitHub-hosted runners, disabled on self-hosted runners)
enable-cache: "auto"
# Glob pattern to match files relative to the repository root to control the cache
cache-dependency-glob: |
**/*requirements*.txt
**/*requirements*.in
**/*constraints*.txt
**/*constraints*.in
**/pyproject.toml
**/uv.lock
**/*.py.lock
# Whether to restore the cache if found
restore-cache: "true"
# Whether to save the cache after the run
save-cache: "true"
# Suffix for the cache key
cache-suffix: ""
# Local path to store the cache (default: "" - uses system temp directory)
cache-local-path: ""
# Prune cache before saving
prune-cache: "true"
# Upload managed Python installations to the GitHub Actions cache
cache-python: "false"
# Ignore when nothing is found to cache
ignore-nothing-to-cache: "false"
# Ignore when the working directory is empty
ignore-empty-workdir: "false"
# Custom path to set UV_TOOL_DIR to
tool-dir: ""
# Custom path to set UV_TOOL_BIN_DIR to
tool-bin-dir: ""
# URL to the manifest file containing available versions and download URLs
manifest-file: ""
# Add problem matchers
add-problem-matchers: "true"
```
### Install a specific version
### Outputs
```yaml
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v6
with:
version: "0.4.4"
```
### Install a version by supplying a semver range or pep440 specifier
You can specify a [semver range](https://github.com/npm/node-semver?tab=readme-ov-file#ranges)
or [pep440 specifier](https://peps.python.org/pep-0440/#version-specifiers)
to install the latest version that satisfies the range.
```yaml
- name: Install a semver range of uv
uses: astral-sh/setup-uv@v6
with:
version: ">=0.4.0"
```
```yaml
- name: Pinning a minor version of uv
uses: astral-sh/setup-uv@v6
with:
version: "0.4.x"
```
```yaml
- name: Install a pep440-specifier-satisfying version of uv
uses: astral-sh/setup-uv@v6
with:
version: ">=0.4.25,<0.5"
```
### Install a version defined in a requirements or config file
You can use the `version-file` input to specify a file that contains the version of uv to install.
This can either be a `pyproject.toml` or `uv.toml` file which defines a `required-version` or
uv defined as a dependency in `pyproject.toml` or `requirements.txt`.
[asdf](https://asdf-vm.com/) `.tool-versions` is also supported, but without the `ref` syntax.
```yaml
- name: Install uv based on the version defined in pyproject.toml
uses: astral-sh/setup-uv@v6
with:
version-file: "pyproject.toml"
```
- `uv-version`: The installed uv version. Useful when using latest.
- `uv-path`: The path to the installed uv binary.
- `uvx-path`: The path to the installed uvx binary.
- `cache-hit`: A boolean value to indicate a cache entry was found.
- `venv`: Path to the activated venv if activate-environment is true.
### Python version
@@ -119,7 +134,7 @@ This will override any python version specifications in `pyproject.toml` and `.p
```yaml
- name: Install the latest version of uv and set the python version to 3.13t
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7
with:
python-version: 3.13t
- run: uv pip install --python=3.13t pip
@@ -137,36 +152,13 @@ jobs:
steps:
- uses: actions/checkout@v5
- name: Install the latest version of uv and set the python version
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- name: Test with python ${{ matrix.python-version }}
run: uv run --frozen pytest
```
### Activate environment
You can set `activate-environment` to `true` to automatically activate a venv.
This allows directly using it in later steps:
```yaml
- name: Install the latest version of uv and activate the environment
uses: astral-sh/setup-uv@v6
with:
activate-environment: true
- run: uv pip install pip
```
> [!WARNING]
>
> Activating the environment adds your dependencies to the `PATH`, which could break some workflows.
> For example, if you have a dependency which requires uv, e.g., `hatch`, activating the
> environment will shadow the `uv` binary installed by this action and may result in a different uv
> version being used.
>
> We do not recommend using this setting for most use-cases. Instead, use `uv run` to execute
> commands in the environment.
### Working directory
You can set the working directory with the `working-directory` input.
@@ -177,337 +169,19 @@ It also controls where [the venv gets created](#activate-environment).
```yaml
- name: Install uv based on the config files in the working-directory
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7
with:
working-directory: my/subproject/dir
```
### Validate checksum
## Advanced Configuration
You can specify a checksum to validate the downloaded executable. Checksums up to the default version
are automatically verified by this action. The sha256 hashes can be found on the
[releases page](https://github.com/astral-sh/uv/releases) of the uv repo.
For more advanced configuration options, see our detailed documentation:
```yaml
- name: Install a specific version and validate the checksum
uses: astral-sh/setup-uv@v6
with:
version: "0.3.1"
checksum: "e11b01402ab645392c7ad6044db63d37e4fd1e745e015306993b07695ea5f9f8"
```
### Enable caching
> [!NOTE]
> The cache is pruned before it is uploaded to the GitHub Actions cache. This can lead to
> a small or empty cache. See [Disable cache pruning](#disable-cache-pruning) for more details.
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]
>
> On self-hosted runners this is usually not needed since the cache generated by uv on the runner's
> filesystem is not removed after a run. For more details see [Local cache path](#local-cache-path).
You can optionally define a custom cache key suffix.
```yaml
- name: Enable caching and define a custom cache key suffix
id: setup-uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-suffix: "optional-suffix"
```
When the cache was successfully restored, the output `cache-hit` will be set to `true` and you can
use it in subsequent steps. For example, to use the cache in the above case:
```yaml
- name: Do something if the cache was restored
if: steps.setup-uv.outputs.cache-hit == 'true'
run: echo "Cache was restored"
```
#### Cache dependency glob
If you want to control when the GitHub Actions cache is invalidated, specify a glob pattern with the
`cache-dependency-glob` input. The GitHub Actions cache will be invalidated if any file matching the glob pattern
changes. If you use relative paths, they are relative to the repository root.
> [!NOTE]
>
> You can look up supported patterns [here](https://github.com/actions/toolkit/tree/main/packages/glob#patterns)
>
> The default is
> ```yaml
> cache-dependency-glob: |
> **/*requirements*.txt
> **/*requirements*.in
> **/*constraints*.txt
> **/*constraints*.in
> **/pyproject.toml
> **/uv.lock
> **/*.py.lock
> ```
```yaml
- name: Define a cache dependency glob
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
```
```yaml
- name: Define a list of cache dependency globs
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: |
**/requirements*.txt
**/pyproject.toml
```
```yaml
- name: Define an absolute cache dependency glob
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "/tmp/my-folder/requirements*.txt"
```
```yaml
- name: Never invalidate the cache
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: ""
```
#### Restore cache
Restoring an existing cache can be enabled or disabled with the `restore-cache` input.
By default, the cache will be restored.
```yaml
- name: Don't restore an existing cache
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
restore-cache: false
```
#### Save cache
You can also disable saving the cache after the run with the `save-cache` input.
This can be useful to save cache storage when you know you will not use the cache of the run again.
By default, the cache will be saved.
```yaml
- name: Don't save the cache after the run
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
save-cache: false
```
### Local cache path
If caching is enabled, this action controls where uv stores its cache on the runner's filesystem
by setting `UV_CACHE_DIR`.
It defaults to `setup-uv-cache` in the `TMP` dir, `D:\a\_temp\uv-tool-dir` on Windows and
`/tmp/setup-uv-cache` on Linux/macOS. You can change the default by specifying the path with the
`cache-local-path` input.
> [!NOTE]
> If the environment variable `UV_CACHE_DIR` is already set this action will not override it.
> If you configured [cache-dir](https://docs.astral.sh/uv/reference/settings/#cache-dir) in your
> config file then it is also respected and this action will not set `UV_CACHE_DIR`.
```yaml
- name: Define a custom uv cache path
uses: astral-sh/setup-uv@v6
with:
cache-local-path: "/path/to/cache"
```
### Disable cache pruning
By default, the uv cache is pruned after every run, removing pre-built wheels, but retaining any
wheels that were built from source. On GitHub-hosted runners, it's typically faster to omit those
pre-built wheels from the cache (and instead re-download them from the registry on each run).
However, on self-hosted or local runners, preserving the cache may be more efficient. See
the [documentation](https://docs.astral.sh/uv/concepts/cache/#caching-in-continuous-integration) for
more information.
If you want to persist the entire cache across runs, disable cache pruning with the `prune-cache`
input.
```yaml
- name: Don't prune the cache before saving it
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
prune-cache: false
```
### Ignore nothing to cache
By default, the action will fail if caching is enabled but there is nothing to upload (the uv cache directory does not exist).
If you want to ignore this, set the `ignore-nothing-to-cache` input to `true`.
```yaml
- name: Ignore nothing to cache
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
ignore-nothing-to-cache: true
```
### Ignore empty workdir
By default, the action will warn if the workdir is empty, because this is usually the case when
`actions/checkout` is configured to run after `setup-uv`, which is not supported.
If you want to ignore this, set the `ignore-empty-workdir` input to `true`.
```yaml
- name: Ignore empty workdir
uses: astral-sh/setup-uv@v6
with:
ignore-empty-workdir: true
```
### GitHub authentication token
This action uses the GitHub API to fetch the uv release artifacts. To avoid hitting the GitHub API
rate limit too quickly, an authentication token can be provided via the `github-token` input. By
default, the `GITHUB_TOKEN` secret is used, which is automatically provided by GitHub Actions.
If the default
[permissions for the GitHub token](https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)
are not sufficient, you can provide a custom GitHub token with the necessary permissions.
```yaml
- name: Install the latest version of uv with a custom GitHub token
uses: astral-sh/setup-uv@v6
with:
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
```
### UV_TOOL_DIR
On Windows `UV_TOOL_DIR` is set to `uv-tool-dir` in the `TMP` dir (e.g. `D:\a\_temp\uv-tool-dir`).
On GitHub hosted runners this is on the much faster `D:` drive.
On all other platforms the tool environments are placed in the
[default location](https://docs.astral.sh/uv/concepts/tools/#tools-directory).
If you want to change this behaviour (especially on self-hosted runners) you can use the `tool-dir`
input:
```yaml
- name: Install the latest version of uv with a custom tool dir
uses: astral-sh/setup-uv@v6
with:
tool-dir: "/path/to/tool/dir"
```
### UV_TOOL_BIN_DIR
On Windows `UV_TOOL_BIN_DIR` is set to `uv-tool-bin-dir` in the `TMP` dir (e.g.
`D:\a\_temp\uv-tool-bin-dir`). On GitHub hosted runners this is on the much faster `D:` drive. This
path is also automatically added to the PATH.
On all other platforms the tool binaries get installed to the
[default location](https://docs.astral.sh/uv/concepts/tools/#the-bin-directory).
If you want to change this behaviour (especially on self-hosted runners) you can use the
`tool-bin-dir` input:
```yaml
- name: Install the latest version of uv with a custom tool bin dir
uses: astral-sh/setup-uv@v6
with:
tool-bin-dir: "/path/to/tool-bin/dir"
```
### Tilde Expansion
This action supports expanding the `~` character to the user's home directory for the following inputs:
- `version-file`
- `cache-local-path`
- `tool-dir`
- `tool-bin-dir`
- `cache-dependency-glob`
```yaml
- name: Expand the tilde character
uses: astral-sh/setup-uv@v6
with:
cache-local-path: "~/path/to/cache"
tool-dir: "~/path/to/tool/dir"
tool-bin-dir: "~/path/to/tool-bin/dir"
cache-dependency-glob: "~/my-cache-buster"
```
### Manifest file
The `manifest-file` input allows you to specify a JSON manifest that lists available uv versions,
architectures, and their download URLs. By default, this action uses the manifest file contained
in this repository, which is automatically updated with each release of uv.
The manifest file contains an array of objects, each describing a version,
architecture, platform, and the corresponding download URL. For example:
```json
[
{
"version": "0.7.13",
"artifactName": "uv-aarch64-apple-darwin.tar.gz",
"arch": "aarch64",
"platform": "apple-darwin",
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.7.13/uv-aarch64-apple-darwin.tar.gz"
},
...
]
```
You can supply a custom manifest file URL to define additional versions,
architectures, or different download URLs.
This is useful if you maintain your own uv builds or want to override the default sources.
```yaml
- name: Use a custom manifest file
uses: astral-sh/setup-uv@v6
with:
manifest-file: "https://example.com/my-custom-manifest.json"
```
> [!NOTE]
> When you use a custom manifest file and do not set the `version` input, its default value is `latest`.
> This means the action will install the latest version available in the custom manifest file.
> This is different from the default behavior of installing the latest version from the official uv releases.
### Add problem matchers
This action automatically adds
[problem matchers](https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md)
for python errors.
You can disable this by setting the `add-problem-matchers` input to `false`.
```yaml
- name: Install the latest version of uv without problem matchers
uses: astral-sh/setup-uv@v6
with:
add-problem-matchers: false
```
- **[Advanced Version Configuration](docs/advanced-version-configuration.md)** - Resolution strategies and version files
- **[Caching](docs/caching.md)** - Complete guide to caching configuration
- **[Environment and Tools](docs/environment-and-tools.md)** - Environment activation, tool directories, authentication, and environment variables
- **[Customization](docs/customization.md)** - Checksum validation, custom manifests, and problem matchers
## How it works
@@ -534,7 +208,7 @@ For example:
- name: Checkout the repository
uses: actions/checkout@main
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Test
@@ -546,7 +220,7 @@ To install a specific version of Python, use
```yaml
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install Python 3.12
@@ -565,7 +239,7 @@ output:
uses: actions/checkout@main
- name: Install the default version of uv
id: setup-uv
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7
- name: Print the installed version
run: echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}"
```
@@ -574,14 +248,13 @@ output:
**Yes!**
The cache key gets computed by using the [cache-dependency-glob](#cache-dependency-glob).
The cache key gets computed by using the cache-dependency-glob (see [Caching documentation](docs/caching.md)).
If you
have jobs which use the same dependency definitions from `requirements.txt` or
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),
But if you do not add the resolution strategy as a cache-suffix (see [Caching documentation](docs/caching.md)),
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
@@ -594,15 +267,15 @@ You might see errors like
### Why do I see warnings like `No GitHub Actions cache found for key`
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),
cache-dependency-glob (see [Caching documentation](docs/caching.md)) found changed files (changed dependencies),
the cache will not be found and the warning `No GitHub Actions cache found for key` 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.
cache key or the user accidentally misconfigured the cache-dependency-glob
or cache-suffix (see [Caching documentation](docs/caching.md)) and the cache never gets used.
### Do I have to run `actions/checkout` before or after `setup-uv`?
@@ -627,11 +300,11 @@ if an uploaded cache exists for this key.
If yes (e.g. contents of `uv.lock` did not change since last run) the dependencies in the cache
are up to date and the cache will be downloaded and used.
Details on determining which files will lead to different caches can be read under
[cache-dependency-glob](#cache-dependency-glob)
Details on determining which files will lead to different caches can be read in the
[Caching documentation](docs/caching.md).
Some dependencies will never be uploaded to the cache and will be downloaded again on each run
as described in [disable-cache-pruning](#disable-cache-pruning)
as described in the [Caching documentation](docs/caching.md).
## Acknowledgements

View File

@@ -56,6 +56,9 @@ inputs:
prune-cache:
description: "Prune cache before saving."
default: "true"
cache-python:
description: "Upload managed Python installations to the Github Actions cache."
default: "false"
ignore-nothing-to-cache:
description: "Ignore when nothing is found to cache."
default: "false"
@@ -74,6 +77,9 @@ inputs:
add-problem-matchers:
description: "Add problem matchers."
default: "true"
resolution-strategy:
description: "Resolution strategy to use when resolving version ranges. 'highest' uses the latest compatible version, 'lowest' uses the oldest compatible version."
default: "highest"
outputs:
uv-version:
description: "The installed uv version. Useful when using latest."
@@ -83,6 +89,8 @@ outputs:
description: "The path to the installed uvx binary."
cache-hit:
description: "A boolean value to indicate a cache entry was found"
venv:
description: "Path to the activated venv if activate-environment is true"
runs:
using: "node24"
main: "dist/setup/index.js"

View File

@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
"$schema": "https://biomejs.dev/schemas/2.2.5/schema.json",
"assist": {
"actions": {
"source": {

104
dist/save-cache/index.js generated vendored
View File

@@ -39,7 +39,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.saveCache = exports.restoreCache = exports.isFeatureAvailable = exports.ReserveCacheError = exports.ValidationError = void 0;
exports.saveCache = exports.restoreCache = exports.isFeatureAvailable = exports.FinalizeCacheError = exports.ReserveCacheError = exports.ValidationError = void 0;
const core = __importStar(__nccwpck_require__(7484));
const path = __importStar(__nccwpck_require__(6928));
const utils = __importStar(__nccwpck_require__(8299));
@@ -47,7 +47,6 @@ const cacheHttpClient = __importStar(__nccwpck_require__(3171));
const cacheTwirpClient = __importStar(__nccwpck_require__(6819));
const config_1 = __nccwpck_require__(7606);
const tar_1 = __nccwpck_require__(5321);
const constants_1 = __nccwpck_require__(8287);
const http_client_1 = __nccwpck_require__(4844);
class ValidationError extends Error {
constructor(message) {
@@ -65,6 +64,14 @@ class ReserveCacheError extends Error {
}
}
exports.ReserveCacheError = ReserveCacheError;
class FinalizeCacheError extends Error {
constructor(message) {
super(message);
this.name = 'FinalizeCacheError';
Object.setPrototypeOf(this, FinalizeCacheError.prototype);
}
}
exports.FinalizeCacheError = FinalizeCacheError;
function checkPaths(paths) {
if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -441,10 +448,6 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
}
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core.debug(`File Size: ${archiveFileSize}`);
// For GHES, this check will take place in ReserveCache API with enterprise file size limit
if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) {
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
}
// Set the archive size in the options, will be used to display the upload progress
options.archiveSizeBytes = archiveFileSize;
core.debug('Reserving Cache');
@@ -457,7 +460,10 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
try {
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
throw new Error('Response was not ok');
if (response.message) {
core.warning(`Cache reservation failed: ${response.message}`);
}
throw new Error(response.message || 'Response was not ok');
}
signedUploadUrl = response.signedUploadUrl;
}
@@ -475,6 +481,9 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!finalizeResponse.ok) {
if (finalizeResponse.message) {
throw new FinalizeCacheError(finalizeResponse.message);
}
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
}
cacheId = parseInt(finalizeResponse.entryId);
@@ -487,6 +496,9 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
else if (typedError.name === ReserveCacheError.name) {
core.info(`Failed to save: ${typedError.message}`);
}
else if (typedError.name === FinalizeCacheError.name) {
core.warning(typedError.message);
}
else {
// Log server errors (5xx) as errors, all other errors as warnings
if (typedError instanceof http_client_1.HttpClientError &&
@@ -598,11 +610,12 @@ class CreateCacheEntryResponse$Type extends runtime_5.MessageType {
constructor() {
super("github.actions.results.api.v1.CreateCacheEntryResponse", [
{ no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
{ no: 2, name: "signed_upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
{ no: 2, name: "signed_upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value) {
const message = { ok: false, signedUploadUrl: "" };
const message = { ok: false, signedUploadUrl: "", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -619,6 +632,9 @@ class CreateCacheEntryResponse$Type extends runtime_5.MessageType {
case /* string signed_upload_url */ 2:
message.signedUploadUrl = reader.string();
break;
case /* string message */ 3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -637,6 +653,9 @@ class CreateCacheEntryResponse$Type extends runtime_5.MessageType {
/* string signed_upload_url = 2; */
if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
/* string message = 3; */
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -720,11 +739,12 @@ class FinalizeCacheEntryUploadResponse$Type extends runtime_5.MessageType {
constructor() {
super("github.actions.results.api.v1.FinalizeCacheEntryUploadResponse", [
{ no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
{ no: 2, name: "entry_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ }
{ no: 2, name: "entry_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ },
{ no: 3, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value) {
const message = { ok: false, entryId: "0" };
const message = { ok: false, entryId: "0", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -741,6 +761,9 @@ class FinalizeCacheEntryUploadResponse$Type extends runtime_5.MessageType {
case /* int64 entry_id */ 2:
message.entryId = reader.int64().toString();
break;
case /* string message */ 3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -759,6 +782,9 @@ class FinalizeCacheEntryUploadResponse$Type extends runtime_5.MessageType {
/* int64 entry_id = 2; */
if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
/* string message = 3; */
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -90593,8 +90619,12 @@ async function restoreCache() {
}
let matchedKey;
core.info(`Trying to restore uv cache from GitHub Actions cache with key: ${cacheKey}`);
const cachePaths = [inputs_1.cacheLocalPath];
if (inputs_1.cachePython) {
cachePaths.push(inputs_1.pythonDir);
}
try {
matchedKey = await cache.restoreCache([inputs_1.cacheLocalPath], cacheKey);
matchedKey = await cache.restoreCache(cachePaths, cacheKey);
}
catch (err) {
const message = err.message;
@@ -90620,7 +90650,8 @@ async function computeKeys() {
const pythonVersion = await getPythonVersion();
const platform = await (0, platforms_1.getPlatform)();
const pruned = inputs_1.pruneCache ? "-pruned" : "";
return `setup-uv-${CACHE_VERSION}-${(0, platforms_1.getArch)()}-${platform}-${pythonVersion}${pruned}${cacheDependencyPathHash}${suffix}`;
const python = inputs_1.cachePython ? "-py" : "";
return `setup-uv-${CACHE_VERSION}-${(0, platforms_1.getArch)()}-${platform}-${pythonVersion}${pruned}${python}${cacheDependencyPathHash}${suffix}`;
}
async function getPythonVersion() {
if (inputs_1.pythonVersion !== "") {
@@ -90844,8 +90875,17 @@ async function saveCache() {
if (!fs.existsSync(actualCachePath) && !inputs_1.ignoreNothingToCache) {
throw new Error(`Cache path ${actualCachePath} does not exist on disk. This likely indicates that there are no dependencies to cache. Consider disabling the cache input if it is not needed.`);
}
const cachePaths = [actualCachePath];
if (inputs_1.cachePython) {
core.info(`Including Python cache path: ${inputs_1.pythonDir}`);
if (!fs.existsSync(inputs_1.pythonDir) && !inputs_1.ignoreNothingToCache) {
throw new Error(`Python cache path ${inputs_1.pythonDir} does not exist on disk. This likely indicates that there are no dependencies to cache. Consider disabling the cache input if it is not needed.`);
}
cachePaths.push(inputs_1.pythonDir);
}
core.info(`Final cache paths: ${cachePaths.join(", ")}`);
try {
await cache.saveCache([actualCachePath], cacheKey);
await cache.saveCache(cachePaths, cacheKey);
core.info(`cache saved with the key: ${cacheKey}`);
}
catch (e) {
@@ -90996,7 +91036,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.addProblemMatchers = exports.manifestFile = exports.githubToken = exports.toolDir = exports.toolBinDir = exports.ignoreEmptyWorkdir = exports.ignoreNothingToCache = exports.pruneCache = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.saveCache = exports.restoreCache = exports.enableCache = exports.checkSum = exports.activateEnvironment = exports.pythonVersion = exports.versionFile = exports.version = exports.workingDirectory = void 0;
exports.resolutionStrategy = exports.addProblemMatchers = exports.manifestFile = exports.githubToken = exports.pythonDir = exports.toolDir = exports.toolBinDir = exports.ignoreEmptyWorkdir = exports.ignoreNothingToCache = exports.cachePython = exports.pruneCache = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.saveCache = exports.restoreCache = exports.enableCache = exports.checkSum = exports.activateEnvironment = exports.pythonVersion = exports.versionFile = exports.version = exports.workingDirectory = void 0;
exports.getUvPythonDir = getUvPythonDir;
const node_path_1 = __importDefault(__nccwpck_require__(6760));
const core = __importStar(__nccwpck_require__(7484));
const config_file_1 = __nccwpck_require__(5465);
@@ -91013,13 +91054,16 @@ exports.cacheSuffix = core.getInput("cache-suffix") || "";
exports.cacheLocalPath = getCacheLocalPath();
exports.cacheDependencyGlob = getCacheDependencyGlob();
exports.pruneCache = core.getInput("prune-cache") === "true";
exports.cachePython = core.getInput("cache-python") === "true";
exports.ignoreNothingToCache = core.getInput("ignore-nothing-to-cache") === "true";
exports.ignoreEmptyWorkdir = core.getInput("ignore-empty-workdir") === "true";
exports.toolBinDir = getToolBinDir();
exports.toolDir = getToolDir();
exports.pythonDir = getUvPythonDir();
exports.githubToken = core.getInput("github-token");
exports.manifestFile = getManifestFile();
exports.addProblemMatchers = core.getInput("add-problem-matchers") === "true";
exports.resolutionStrategy = getResolutionStrategy();
function getVersionFile() {
const versionFileInput = core.getInput("version-file");
if (versionFileInput !== "") {
@@ -91106,6 +91150,24 @@ function getCacheDirFromConfig() {
}
return undefined;
}
function getUvPythonDir() {
if (process.env.UV_PYTHON_INSTALL_DIR !== undefined) {
core.info(`UV_PYTHON_INSTALL_DIR is already set to ${process.env.UV_PYTHON_INSTALL_DIR}`);
return process.env.UV_PYTHON_INSTALL_DIR;
}
if (process.env.RUNNER_ENVIRONMENT !== "github-hosted") {
if (process.platform === "win32") {
return `${process.env.APPDATA}${node_path_1.default.sep}uv${node_path_1.default.sep}python`;
}
else {
return `${process.env.HOME}${node_path_1.default.sep}.local${node_path_1.default.sep}share${node_path_1.default.sep}uv${node_path_1.default.sep}python`;
}
}
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${node_path_1.default.sep}uv-python-dir`;
}
throw Error("Could not determine UV_PYTHON_INSTALL_DIR. Please make sure RUNNER_TEMP is set or provide the UV_PYTHON_INSTALL_DIR environment variable");
}
function getCacheDependencyGlob() {
const cacheDependencyGlobInput = core.getInput("cache-dependency-glob");
if (cacheDependencyGlobInput !== "") {
@@ -91138,6 +91200,16 @@ function getManifestFile() {
}
return undefined;
}
function getResolutionStrategy() {
const resolutionStrategyInput = core.getInput("resolution-strategy");
if (resolutionStrategyInput === "lowest") {
return "lowest";
}
if (resolutionStrategyInput === "highest" || resolutionStrategyInput === "") {
return "highest";
}
throw new Error(`Invalid resolution-strategy: ${resolutionStrategyInput}. Must be 'highest' or 'lowest'.`);
}
/***/ }),
@@ -94062,7 +94134,7 @@ var index_default = { parse, stringify, TomlDate, TomlError };
/***/ ((module) => {
"use strict";
module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"4.0.5","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@protobuf-ts/runtime-rpc":"^2.11.1","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","semver":"^6.3.1"},"devDependencies":{"@types/node":"^22.13.9","@types/semver":"^6.0.0","@protobuf-ts/plugin":"^2.9.4","typescript":"^5.2.2"}}');
module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"4.1.0","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@protobuf-ts/runtime-rpc":"^2.11.1","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","semver":"^6.3.1"},"devDependencies":{"@types/node":"^22.13.9","@types/semver":"^6.0.0","@protobuf-ts/plugin":"^2.9.4","typescript":"^5.2.2"}}');
/***/ }),

307
dist/setup/index.js generated vendored
View File

@@ -39,7 +39,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.saveCache = exports.restoreCache = exports.isFeatureAvailable = exports.ReserveCacheError = exports.ValidationError = void 0;
exports.saveCache = exports.restoreCache = exports.isFeatureAvailable = exports.FinalizeCacheError = exports.ReserveCacheError = exports.ValidationError = void 0;
const core = __importStar(__nccwpck_require__(37484));
const path = __importStar(__nccwpck_require__(16928));
const utils = __importStar(__nccwpck_require__(98299));
@@ -47,7 +47,6 @@ const cacheHttpClient = __importStar(__nccwpck_require__(73171));
const cacheTwirpClient = __importStar(__nccwpck_require__(96819));
const config_1 = __nccwpck_require__(17606);
const tar_1 = __nccwpck_require__(95321);
const constants_1 = __nccwpck_require__(58287);
const http_client_1 = __nccwpck_require__(54844);
class ValidationError extends Error {
constructor(message) {
@@ -65,6 +64,14 @@ class ReserveCacheError extends Error {
}
}
exports.ReserveCacheError = ReserveCacheError;
class FinalizeCacheError extends Error {
constructor(message) {
super(message);
this.name = 'FinalizeCacheError';
Object.setPrototypeOf(this, FinalizeCacheError.prototype);
}
}
exports.FinalizeCacheError = FinalizeCacheError;
function checkPaths(paths) {
if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -441,10 +448,6 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
}
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
core.debug(`File Size: ${archiveFileSize}`);
// For GHES, this check will take place in ReserveCache API with enterprise file size limit
if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) {
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
}
// Set the archive size in the options, will be used to display the upload progress
options.archiveSizeBytes = archiveFileSize;
core.debug('Reserving Cache');
@@ -457,7 +460,10 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
try {
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
throw new Error('Response was not ok');
if (response.message) {
core.warning(`Cache reservation failed: ${response.message}`);
}
throw new Error(response.message || 'Response was not ok');
}
signedUploadUrl = response.signedUploadUrl;
}
@@ -475,6 +481,9 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
core.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`);
if (!finalizeResponse.ok) {
if (finalizeResponse.message) {
throw new FinalizeCacheError(finalizeResponse.message);
}
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
}
cacheId = parseInt(finalizeResponse.entryId);
@@ -487,6 +496,9 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
else if (typedError.name === ReserveCacheError.name) {
core.info(`Failed to save: ${typedError.message}`);
}
else if (typedError.name === FinalizeCacheError.name) {
core.warning(typedError.message);
}
else {
// Log server errors (5xx) as errors, all other errors as warnings
if (typedError instanceof http_client_1.HttpClientError &&
@@ -598,11 +610,12 @@ class CreateCacheEntryResponse$Type extends runtime_5.MessageType {
constructor() {
super("github.actions.results.api.v1.CreateCacheEntryResponse", [
{ no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
{ no: 2, name: "signed_upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
{ no: 2, name: "signed_upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value) {
const message = { ok: false, signedUploadUrl: "" };
const message = { ok: false, signedUploadUrl: "", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -619,6 +632,9 @@ class CreateCacheEntryResponse$Type extends runtime_5.MessageType {
case /* string signed_upload_url */ 2:
message.signedUploadUrl = reader.string();
break;
case /* string message */ 3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -637,6 +653,9 @@ class CreateCacheEntryResponse$Type extends runtime_5.MessageType {
/* string signed_upload_url = 2; */
if (message.signedUploadUrl !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
/* string message = 3; */
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -720,11 +739,12 @@ class FinalizeCacheEntryUploadResponse$Type extends runtime_5.MessageType {
constructor() {
super("github.actions.results.api.v1.FinalizeCacheEntryUploadResponse", [
{ no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
{ no: 2, name: "entry_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ }
{ no: 2, name: "entry_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ },
{ no: 3, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value) {
const message = { ok: false, entryId: "0" };
const message = { ok: false, entryId: "0", message: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
@@ -741,6 +761,9 @@ class FinalizeCacheEntryUploadResponse$Type extends runtime_5.MessageType {
case /* int64 entry_id */ 2:
message.entryId = reader.int64().toString();
break;
case /* string message */ 3:
message.message = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -759,6 +782,9 @@ class FinalizeCacheEntryUploadResponse$Type extends runtime_5.MessageType {
/* int64 entry_id = 2; */
if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
/* string message = 3; */
if (message.message !== "")
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -125151,8 +125177,12 @@ async function restoreCache() {
}
let matchedKey;
core.info(`Trying to restore uv cache from GitHub Actions cache with key: ${cacheKey}`);
const cachePaths = [inputs_1.cacheLocalPath];
if (inputs_1.cachePython) {
cachePaths.push(inputs_1.pythonDir);
}
try {
matchedKey = await cache.restoreCache([inputs_1.cacheLocalPath], cacheKey);
matchedKey = await cache.restoreCache(cachePaths, cacheKey);
}
catch (err) {
const message = err.message;
@@ -125178,7 +125208,8 @@ async function computeKeys() {
const pythonVersion = await getPythonVersion();
const platform = await (0, platforms_1.getPlatform)();
const pruned = inputs_1.pruneCache ? "-pruned" : "";
return `setup-uv-${CACHE_VERSION}-${(0, platforms_1.getArch)()}-${platform}-${pythonVersion}${pruned}${cacheDependencyPathHash}${suffix}`;
const python = inputs_1.cachePython ? "-py" : "";
return `setup-uv-${CACHE_VERSION}-${(0, platforms_1.getArch)()}-${platform}-${pythonVersion}${pruned}${python}${cacheDependencyPathHash}${suffix}`;
}
async function getPythonVersion() {
if (inputs_1.pythonVersion !== "") {
@@ -125320,6 +125351,150 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.KNOWN_CHECKSUMS = void 0;
// AUTOGENERATED_DO_NOT_EDIT
exports.KNOWN_CHECKSUMS = {
"aarch64-apple-darwin-0.9.3": "d6b2eaa1025b24b4779602763ad92f20112cbf19732fc6e0c72bb57a6a592c6c",
"aarch64-pc-windows-msvc-0.9.3": "cf14a72d3a53e9cd63a0d87b6f2d1e92429dea9cd133d77c8ebffd57248191f1",
"aarch64-unknown-linux-gnu-0.9.3": "2094a3ead5a026a2f6894c4d3f71026129c8878939a57f17f0c8246a737bed1d",
"aarch64-unknown-linux-musl-0.9.3": "0544bdb24daffe91e3c14373875767e0be31e85e85e532171ab53d8c744149ac",
"arm-unknown-linux-musleabihf-0.9.3": "d120656ddfd22cbcf751c3cf7173992ab4fccf83282868ba1e3ffb79cea4fee6",
"armv7-unknown-linux-gnueabihf-0.9.3": "a524b78c31a43131ad0872e56fcaeb36616f11e5323acb74b547157272723eb6",
"armv7-unknown-linux-musleabihf-0.9.3": "acb2a76a585e27b3ded59eeba114771cc76303ea1d3e53c7b9df6b60ed44b952",
"i686-pc-windows-msvc-0.9.3": "dd054d5a92c1b88daa757e913c85f2f1b9c8bd3b6e530916cfc4d4a612f5638f",
"i686-unknown-linux-gnu-0.9.3": "fd16f999a437157d7a0fce41963373d994480431412b465bda9d818c4070c952",
"i686-unknown-linux-musl-0.9.3": "c77e3cd1ac93cf04695f952bc53f79f93b5ff2f126f0d1fa6a347b7099aca0b2",
"powerpc64-unknown-linux-gnu-0.9.3": "98eee12b4bab516bdea0be3a6c5ea0077c6f90d8d745382fc1f41256fcbacddb",
"powerpc64le-unknown-linux-gnu-0.9.3": "ae6e1c44e6291041dfcef21bedb5ea528992ff52ae193c5a17d4ac0bf94188e5",
"riscv64gc-unknown-linux-gnu-0.9.3": "369eb1efe7126228a77eab55eafb53f176025b67c9c73c53cd176a173d2d3485",
"s390x-unknown-linux-gnu-0.9.3": "3864b46a71bc7873d712a4b38d89df47c9e654b09a535d21a4280feb325e7c7a",
"x86_64-apple-darwin-0.9.3": "ad57ed22bf793267ea97cfc0022afa096149e894dd161ee4ae5401b7c4a6db83",
"x86_64-pc-windows-msvc-0.9.3": "9f7595313b44e57dcaeef63fe4f3de9a0cf4f92a53302b429341f457f70ca3b9",
"x86_64-unknown-linux-gnu-0.9.3": "4d6f84490da4b21bb6075ffc1c6b22e0cf37bc98d7cca8aff9fbb759093cdc23",
"x86_64-unknown-linux-musl-0.9.3": "bee6515c7476baea4a491a088ad7750cf599d25f4adcd37e0f987d4192c68f24",
"aarch64-apple-darwin-0.9.2": "90b1e69da3d04772565dd556ae8e72c86bdb7da85a8dfc2c6b50c400b0e6aa97",
"aarch64-pc-windows-msvc-0.9.2": "b28ae90188f00c6d9e6f32fe252ace25a3698eeca1458d435ac1ca55049607ff",
"aarch64-unknown-linux-gnu-0.9.2": "0f0ecf2abcb50f8fb5d2b52c8095af4c133897086e3f2e0259f4fcb3d8ddf273",
"aarch64-unknown-linux-musl-0.9.2": "1456894c855d38a56d541b201abae306780d8494c3a3497aff2815abd3eba12f",
"arm-unknown-linux-musleabihf-0.9.2": "f6a969f0506b4d9e1d73d223243457825a2544ef9cd8dabc0a8e7e7bea697a62",
"armv7-unknown-linux-gnueabihf-0.9.2": "93bbf2c8612174548822086487eef982bb19d95b569d3df83328cff6f5bf7660",
"armv7-unknown-linux-musleabihf-0.9.2": "0f96d45eb4edfff26faaac58d9d5761b3f2628519557534e6969ec2777f35984",
"i686-pc-windows-msvc-0.9.2": "f0cc299f9cfd9850d30f073794cda9523ac7fa2b90de3d1ed47e3fdcbda69ab6",
"i686-unknown-linux-gnu-0.9.2": "5623618c4a99694b24eb3388577495873847ccae716c0827fdb03035ddd4d441",
"i686-unknown-linux-musl-0.9.2": "c9d60b1e09611e3b36d91d5b520687ac15d765fe2a06a47dae068c6ebf23ada1",
"powerpc64-unknown-linux-gnu-0.9.2": "d2c92ae4df26b4f62181b3e8840f85f5a9474cfac707f0f8fdbef03f573836ae",
"powerpc64le-unknown-linux-gnu-0.9.2": "216e11a9001d7985990b0c4b6efd734b27e5e96222f9815d23c6fc8a5a406718",
"riscv64gc-unknown-linux-gnu-0.9.2": "3fdbc9dc623a992c39ea4c126d4ebe1f78dc2013e9056f2ec93f42b0deb154eb",
"s390x-unknown-linux-gnu-0.9.2": "4e4aa34554891bcfb92d50fc2067e99cbbc5bec473ce4b8e3dedad0d42017c85",
"x86_64-apple-darwin-0.9.2": "c887d2c4f629eee99b80a347880870f3bc77f7746db81923efe520f609f80857",
"x86_64-pc-windows-msvc-0.9.2": "ba61d01b7470b282e09e7c82a053472723c2a737fb3d137bd0f111e420cc1d9f",
"x86_64-unknown-linux-gnu-0.9.2": "b775bb84c72210c6c0b9670cfaad0ac2e3953f12a2947d52b57603b4fbae3798",
"x86_64-unknown-linux-musl-0.9.2": "42e4ac8e9dab04d560a9d44be2091cae994d14653238e779177c026e0dbf5779",
"aarch64-apple-darwin-0.9.1": "cc84b5c86fbde176c0e1908abd65cec6e989ff755b6e68a912652beb1311de31",
"aarch64-pc-windows-msvc-0.9.1": "862e0fef8e68f229c99ce05de70a712221bc552403f480379d03f5b05a6886fe",
"aarch64-unknown-linux-gnu-0.9.1": "450cf31a80cf1335b0169b82310ea589e51b12711ca84b1f5b322b87d26b16c5",
"aarch64-unknown-linux-musl-0.9.1": "a171e7335fc2e05767fe0d151db5a6af7d1ba93debfc8c91721763eff457d0a3",
"arm-unknown-linux-musleabihf-0.9.1": "cc290a14f3ffa286b8c5a437f50d5c9bb76e1d27f3d51dd701b0487e62987ea0",
"armv7-unknown-linux-gnueabihf-0.9.1": "1f0d511f7776deaf40bae03102020f939c96c3d12eec741edf81f581546d2232",
"armv7-unknown-linux-musleabihf-0.9.1": "790728d01dd0d252e3151b57b5a716f84d851d0802962144ea822118ae61b2f6",
"i686-pc-windows-msvc-0.9.1": "8880c92097c5410c3bbad5e72cf7d38b57523ed374bcd7462d309b9a11b6df33",
"i686-unknown-linux-gnu-0.9.1": "4eccf96c57c30edf6c11477351f536b1a6191d13854c8ffa6d8eee58637d82e6",
"i686-unknown-linux-musl-0.9.1": "9763ef30957011ce61c56117ef3078c40960c7521c9ee7cbb3ce8aed5b6207a4",
"powerpc64-unknown-linux-gnu-0.9.1": "4a0965091073115314f9fc935cfa3eed43c3f46a48dfa370583a019b052a950c",
"powerpc64le-unknown-linux-gnu-0.9.1": "cd9e06feaccd26dce79fd6930afbe1210edf69b4181304b4c7143871e8fadbe2",
"riscv64gc-unknown-linux-gnu-0.9.1": "394edca0f59b6cf31ee6e3d252442e1e2708483265199d390ac1fc4161f97510",
"s390x-unknown-linux-gnu-0.9.1": "8f4eedabfe57cf1d3ef29633be444ad9fd1c1ce9db89450a548e50ac88436cf0",
"x86_64-apple-darwin-0.9.1": "df530fc06d2fd51ed2efeb75b1ea5eeb77a631eb945efe5f9d90ef5969cd3672",
"x86_64-pc-windows-msvc-0.9.1": "8dba20107ebcd38f3a8e4acfeb7b209d594e112a3be8d1cea69fe6d501a69fdf",
"x86_64-unknown-linux-gnu-0.9.1": "da55e00c6399a34a47c1f10973d8618b425a530e149836305bcca7ff68d955ff",
"x86_64-unknown-linux-musl-0.9.1": "104bbd393104f09f84db474310b0fc0327c5f6566bd903c9a9cac00d137208b7",
"aarch64-apple-darwin-0.9.0": "136e70984e3fd359f4119ef445bfd67d6e0d50f15400226ef8db7b738ebef6d0",
"aarch64-pc-windows-msvc-0.9.0": "a816625eae0117c8ca0cd618716ddc11c68522d1ecfa7d2738f1c670099fef10",
"aarch64-unknown-linux-gnu-0.9.0": "ca410766024d2d726c937bda2e9441823e2848894ac5a2f8b608902384fc391f",
"aarch64-unknown-linux-musl-0.9.0": "041d8f56ffe82cbbc0f63f187f4e1935ac8b32531cf071bf5fa7abcb0441b147",
"arm-unknown-linux-musleabihf-0.9.0": "ec1ec28a7cc584a8a06632b717f89747fa8b8ba58277ad68c8f289aaeac35a0d",
"armv7-unknown-linux-gnueabihf-0.9.0": "3063c9adb4786ed49d699de9cf24c721ff2cb96bd2bb39465cab3e42d4e4efcc",
"armv7-unknown-linux-musleabihf-0.9.0": "b425603d3ef20c579b94681a587eaa3f8a2198a86473c7cd5f687a93f8a0fdb0",
"i686-pc-windows-msvc-0.9.0": "fd1dc1c9f7f9bc66186188894e24864e3def2232e1de0d49416037161932bdd7",
"i686-unknown-linux-gnu-0.9.0": "02f4b4070af6e0c591d676543b97f7f5d2c0ebf5b1d01d9e116391289f44afc0",
"i686-unknown-linux-musl-0.9.0": "41fc684a948ec2ff9255b484e11b99a0b504a4fc19d466b549e51b690a6325d5",
"powerpc64-unknown-linux-gnu-0.9.0": "122b9216414a8a89b0a716dd7bf5995d03cded62747deef68dacca6a9839f96f",
"powerpc64le-unknown-linux-gnu-0.9.0": "affbf883bfe4ae0204943b7d936fc2269e806a2534d65da0e75da713ac71ce4e",
"riscv64gc-unknown-linux-gnu-0.9.0": "86c9596204fecdacf038f498553a7e8be81aabebe430a1eb08f8ae8215610b10",
"s390x-unknown-linux-gnu-0.9.0": "8f41968e5eceda304d9cd70d83a9dc7e205e221c651572862b74845d045203ee",
"x86_64-apple-darwin-0.9.0": "8fce2fe15b227ca38c706acda7cf0ebc43d5ec4be537f1badd58d5e938c7ed89",
"x86_64-pc-windows-msvc-0.9.0": "4bad2c47dafb52ad774072fb7a260e5c9f3dbf73441658db1128eb2aec5818eb",
"x86_64-unknown-linux-gnu-0.9.0": "4dadaa5ff5009ccd6a0a43f6ccfa32bf36ed2eff18df7011275a9b1d81950e7b",
"x86_64-unknown-linux-musl-0.9.0": "8b045dceb6f13f2ce36285c72ed2d6a51241aea9da5636637c020bcecea205c8",
"aarch64-apple-darwin-0.8.24": "5f0d9d14b17ba3f0af4602a7a5a2e4faececf0a9463736cf8e6269c49569b2fa",
"aarch64-pc-windows-msvc-0.8.24": "349e5f26ea4db6459578db210bb8d676e5b2acc13962877637a95f3e951a6899",
"aarch64-unknown-linux-gnu-0.8.24": "9526f8b0eddd13f5162c18df5ecf35c21e4f96567d21849750356b60121882df",
"aarch64-unknown-linux-musl-0.8.24": "2b8f7383b19d408c680a74a6dbd41c70976516922234eb0075fd2de67413cf29",
"arm-unknown-linux-musleabihf-0.8.24": "e25ead24c0809fd81c67b72a30c81f2e76eff0d702d341c468326e3e374559f5",
"armv7-unknown-linux-gnueabihf-0.8.24": "3c0d984f55bcde6c16c8b4b749d2249b6a61125418dd6b333f249d846e759c71",
"armv7-unknown-linux-musleabihf-0.8.24": "3e980197c242f36cf93cba0ebdad8f772ebf442ee856ba694daab624affab146",
"i686-pc-windows-msvc-0.8.24": "7a8b3cdd8c02a662a19c426fbae99809d83dbedf172e52d30ba4c266ccd9a8b9",
"i686-unknown-linux-gnu-0.8.24": "7957fbdc4538d706440173d14e91b6a2098b95701654125ebc2d05824aa233e6",
"i686-unknown-linux-musl-0.8.24": "1a2b59dddc206106fb19a66dd665bfe85411281ace07825ba60988a00e230afd",
"powerpc64-unknown-linux-gnu-0.8.24": "22dfcf44c1e8b273640e13aa41c72856654da650d58e0b39d1143dbdb4ee7997",
"powerpc64le-unknown-linux-gnu-0.8.24": "0e757a7109aecbe5b6759470164d466e2a2a234808d84095e6db52a13a62f399",
"riscv64gc-unknown-linux-gnu-0.8.24": "45342e4477dfde1f1d50a8c223706377ddb861cf5c4e1a323a936401472ed2da",
"s390x-unknown-linux-gnu-0.8.24": "8167af20bf336179f5ffb96421d38cc7cb5d54dfa9b90820154cffbb456032de",
"x86_64-apple-darwin-0.8.24": "b75ccf924654ad168efac2ec6934704b3d6b9cbff1650b35e17fa3d26d2bea1f",
"x86_64-pc-windows-msvc-0.8.24": "5055be7909a844f703c54e8846d14ab676c34be6ea0d969ee74c5747feaedda0",
"x86_64-unknown-linux-gnu-0.8.24": "db8179fffd97b7557b9a519bae82eaa4f499b02ef546f738a35e74e26c47e6b7",
"x86_64-unknown-linux-musl-0.8.24": "b38ce629a8653a6b444b7c1bff2d8b99bdafd274e66a4900c5838051e3d99d26",
"aarch64-apple-darwin-0.8.23": "e9128449ea08a3c953f0e08dabc78c7588361a898e6bd8163e7e8f8c96adeb66",
"aarch64-pc-windows-msvc-0.8.23": "b4720ff1e3dcab3f41ce8135ae6c87d27682428088ce9e9b6802f2645e189a9e",
"aarch64-unknown-linux-gnu-0.8.23": "503d1df80abe76c1f30264de817c9c847ff5fa457d4085517aecde1f5749ed66",
"aarch64-unknown-linux-musl-0.8.23": "d745f61cdd3a845da6484785995bc6d19ceb3117dc3fa609bd304ecbedb87fea",
"arm-unknown-linux-musleabihf-0.8.23": "55fd7161d526080dc07fec87aed63734cf18a20f4ef2fa9b870dd99cfb4e1b07",
"armv7-unknown-linux-gnueabihf-0.8.23": "160e9522965702a31bfcb86ee28318f7d83f3ffdf330739670703fa0a85ce012",
"armv7-unknown-linux-musleabihf-0.8.23": "8cc14b0b7b5118a13c80d9245f0aa540c2596c757d7cbfab622b4f798ce90dd5",
"i686-pc-windows-msvc-0.8.23": "9ca7cc83d6730762bb811ec96aff9c95c5c9a131d4305229348df61bbfc9241a",
"i686-unknown-linux-gnu-0.8.23": "bd578dc12e1170bf14cecd17b343e308edaaee5b44f0cb066076366353567856",
"i686-unknown-linux-musl-0.8.23": "3237b711f1c313b328be0d42395319a2ffdab5f67cd2338fbf77155b6bf425f5",
"powerpc64-unknown-linux-gnu-0.8.23": "92f30e2adc8c4ec75b8dc85a82df7b74a617346c7748c41cb4672a61e42791d6",
"powerpc64le-unknown-linux-gnu-0.8.23": "b3f9b147022053b792fd82f7722b527323378c5130a227b7ec667c08b600d1be",
"riscv64gc-unknown-linux-gnu-0.8.23": "a4925b51f0810e44075d336c3fa5b7534c086111dce0d0d9d92a2e2270aea0a8",
"s390x-unknown-linux-gnu-0.8.23": "6bafdbed0e750930a2af123e3cf8b782228aef88d24bf25dc6b0f280bc8ad461",
"x86_64-apple-darwin-0.8.23": "bbb1db369de63d85334e2c43bb925fce63261cefa8c1a8569a6bd4c520f03c0d",
"x86_64-pc-windows-msvc-0.8.23": "454c727fe05ec3763cae9436bb409a6bc5156e9c8ee55a09218191faf8c32445",
"x86_64-unknown-linux-gnu-0.8.23": "b8d378bf1cbdefa6fd18570c3d5e7ea85066f75549cf3840212f505ed37522ed",
"x86_64-unknown-linux-musl-0.8.23": "598f7939cae516de105075d55eb20d906787de307a0011904e301346a13de2ff",
"aarch64-apple-darwin-0.8.22": "3f61099e261e449527141dbf125629fab33ad696468c8c90cebbac40185a306c",
"aarch64-pc-windows-msvc-0.8.22": "dbb3a5bd06d20c9ab8bb9a79c7c4fb5832ca1c7ba5f231a020bc92e5a3c6dcf4",
"aarch64-unknown-linux-gnu-0.8.22": "726b72a137fda33565143325f7d31c42cd30ff9ccdf067e00d124d37b4081cb2",
"aarch64-unknown-linux-musl-0.8.22": "3cb3c891f56891f0027f0287980014930b18875c9396c1d8a19d607b0a6049d9",
"arm-unknown-linux-musleabihf-0.8.22": "78c4898abb5285cbcb53bc2544d93158a705bf2024393d203b7df89406ffd5d7",
"armv7-unknown-linux-gnueabihf-0.8.22": "96f7e526b7cac851f4448ca773ee82216d3d8564161486f5c0ab0d84418cc3bc",
"armv7-unknown-linux-musleabihf-0.8.22": "763bd2b60642c68e2d2d5ce43f741fe9cdb77b6fa771cd8b45971e4a380411d7",
"i686-pc-windows-msvc-0.8.22": "e84c697e29afc76223e020edb3786acebed34779a9cc2ab88e570ff93d69a617",
"i686-unknown-linux-gnu-0.8.22": "f6cfe03095b9cafdbf530cf228803e9ec329511d45e5901e3baa355f96ba37f3",
"i686-unknown-linux-musl-0.8.22": "6ea34f5e656ee0f2085436513e9b6a2caeae7ff14d14871f177a7797f79db20e",
"powerpc64-unknown-linux-gnu-0.8.22": "87b1f9b6452540d1b3e3286e9209fcae39a692c323544c10f6b4f096bfc04673",
"powerpc64le-unknown-linux-gnu-0.8.22": "2f639a402031e62dabd6ca534635d73b26e8b72afeb063f8abc9abc6ba97a8e3",
"riscv64gc-unknown-linux-gnu-0.8.22": "75c83abe161c6e673f7d21e46cd27df539081a9ccf74e4d053e90ba8d2d715e0",
"s390x-unknown-linux-gnu-0.8.22": "a0f671106b8b4c128aad3b52becc34691d7669c3d40bbd5a18df2c60b4d67971",
"x86_64-apple-darwin-0.8.22": "76638fdcfa91357858771551a1c88de1f7c3b270b33ab1866f8a0618d9e442d8",
"x86_64-pc-windows-msvc-0.8.22": "5049375aa2a5162f132b2c1cb992e25d42d47d934cab8c174dbe6f60973dcc12",
"x86_64-unknown-linux-gnu-0.8.22": "741ff1f5742c5a4a25d2f829e8395355e43f7a5ae2ebc6368e9ae2df0efb69cf",
"x86_64-unknown-linux-musl-0.8.22": "06b891ef144bd8390fecb150838f0ff8a34ccaeecf9d744d97945d02ec7389c0",
"aarch64-apple-darwin-0.8.21": "51a10a0ba94139911266779e61296b07fffc98eedf3d8f6e206f86375ac7fb31",
"aarch64-pc-windows-msvc-0.8.21": "ad60ed2fd2c95957c55041d2e61146f0f41aedc7afe87f3f79a8648802713fb5",
"aarch64-unknown-linux-gnu-0.8.21": "5ebc05755ee1688434993d3bf346b6fbdbcbd2f17f1a8339f175e76af18de50c",
"aarch64-unknown-linux-musl-0.8.21": "2afeee16b09d40cbe4de445fe82e1ecc00ed51dd8e118ed7800ca537ee4cf0c2",
"arm-unknown-linux-musleabihf-0.8.21": "f45daacdd988284b011137ba017e5b151252922eec52b457d50770f0cde18387",
"armv7-unknown-linux-gnueabihf-0.8.21": "f6b5fa5a6cfad7fd9fa80c11b24cef18acb8d99c137a6144a4bb1c50dbfb5b1b",
"armv7-unknown-linux-musleabihf-0.8.21": "d53ad3c1c5b549654c2da6f9369df7a68b961f18fcaf847cb8242dc48fe17e20",
"i686-pc-windows-msvc-0.8.21": "8ee8cd0cc5d49a9e3c6f176bdc9d09ece03144dbc0914c20b27e67ff72c0570e",
"i686-unknown-linux-gnu-0.8.21": "327ef2b81967cb2e8407255d3580dd67ddf15fdb18fd3d6e945dc13f76462b0c",
"i686-unknown-linux-musl-0.8.21": "18b7a77c37155ea15166a3a212e69b53f0e6b8d1d399b87c1b3ac4cc646e9b4f",
"powerpc64-unknown-linux-gnu-0.8.21": "1fae8052ce8a9663438ba332f930062b14621adb395eff2950928d7cf8323d16",
"powerpc64le-unknown-linux-gnu-0.8.21": "cca5f83f59251fced9056ecf8ae90e89a83252dda1eb53eab96a76e484776e0d",
"riscv64gc-unknown-linux-gnu-0.8.21": "485f2654720d9fca3c85b147e837f0dc32bb869113bde58e979fc76f0c37547e",
"s390x-unknown-linux-gnu-0.8.21": "5757570db02d2ed3ef5742a1a484b921e716d8412daf45e85c4c79c0a75bf0c1",
"x86_64-apple-darwin-0.8.21": "df0fae941f83f796ea8100958f5d31a185dacc34777f346019123b6cb5571101",
"x86_64-pc-windows-msvc-0.8.21": "ed4f66aacea41026675bca18699958cda13112c77ef5eff3a2f3d376bd1f9177",
"x86_64-unknown-linux-gnu-0.8.21": "166bfa522cc836a3b68bdcef78e40b263ea62f12bb80a8d9c6fda4ce5f2a3994",
"x86_64-unknown-linux-musl-0.8.21": "ff6f6ffca9a026cc99bc43df46e70e33df09bcb544b43e8ef97a5176dd68b516",
"aarch64-apple-darwin-0.8.20": "a87008d013efd78d94102e5268a24990c409bfb39b80df4de32d1c97f093e7ef",
"aarch64-pc-windows-msvc-0.8.20": "ac33f921e0d48d14a106a6cc84b146da7a1f4a3c329c7fb0e1a8e6ff4cf541e6",
"aarch64-unknown-linux-gnu-0.8.20": "b434851cd94e9e2083bc9a5851f1d13748771726bd2ac30027f820fc134b2104",
@@ -128983,6 +129158,7 @@ const path = __importStar(__nccwpck_require__(76760));
const core = __importStar(__nccwpck_require__(37484));
const tc = __importStar(__nccwpck_require__(33472));
const pep440 = __importStar(__nccwpck_require__(63297));
const semver = __importStar(__nccwpck_require__(39318));
const constants_1 = __nccwpck_require__(56156);
const octokit_1 = __nccwpck_require__(73352);
const checksum_1 = __nccwpck_require__(17772);
@@ -129034,28 +129210,29 @@ async function downloadVersion(downloadUrl, artifactName, platform, arch, versio
function getExtension(platform) {
return platform === "pc-windows-msvc" ? ".zip" : ".tar.gz";
}
async function resolveVersion(versionInput, manifestFile, githubToken) {
async function resolveVersion(versionInput, manifestFile, githubToken, resolutionStrategy = "highest") {
core.debug(`Resolving version: ${versionInput}`);
let version;
const isSimpleMinimumVersionSpecifier = versionInput.includes(">") && !versionInput.includes(",");
if (isSimpleMinimumVersionSpecifier) {
const resolveVersionSpecifierToLatest = isSimpleMinimumVersionSpecifier && resolutionStrategy === "highest";
if (resolveVersionSpecifierToLatest) {
core.info("Found minimum version specifier, using latest version");
}
if (manifestFile) {
version =
versionInput === "latest" || isSimpleMinimumVersionSpecifier
versionInput === "latest" || resolveVersionSpecifierToLatest
? await (0, version_manifest_1.getLatestKnownVersion)(manifestFile)
: versionInput;
}
else {
version =
versionInput === "latest" || isSimpleMinimumVersionSpecifier
versionInput === "latest" || resolveVersionSpecifierToLatest
? await getLatestVersion(githubToken)
: versionInput;
}
if (tc.isExplicitVersion(version)) {
core.debug(`Version ${version} is an explicit version.`);
if (isSimpleMinimumVersionSpecifier) {
if (resolveVersionSpecifierToLatest) {
if (!pep440.satisfies(version, versionInput)) {
throw new Error(`No version found for ${versionInput}`);
}
@@ -129064,7 +129241,9 @@ async function resolveVersion(versionInput, manifestFile, githubToken) {
}
const availableVersions = await getAvailableVersions(githubToken);
core.debug(`Available versions: ${availableVersions}`);
const resolvedVersion = maxSatisfying(availableVersions, version);
const resolvedVersion = resolutionStrategy === "lowest"
? minSatisfying(availableVersions, version)
: maxSatisfying(availableVersions, version);
if (resolvedVersion === undefined) {
throw new Error(`No version found for ${version}`);
}
@@ -129144,6 +129323,21 @@ function maxSatisfying(versions, version) {
}
return undefined;
}
function minSatisfying(versions, version) {
// For semver, we need to use a different approach since tc.evaluateVersions only returns max
// Let's use semver directly for min satisfying
const minSemver = semver.minSatisfying(versions, version);
if (minSemver !== null) {
core.debug(`Found a version that satisfies the semver range: ${minSemver}`);
return minSemver;
}
const minPep440 = pep440.minSatisfying(versions, version);
if (minPep440 !== null) {
core.debug(`Found a version that satisfies the pep440 specifier: ${minPep440}`);
return minPep440;
}
return undefined;
}
/***/ }),
@@ -129407,6 +129601,7 @@ async function run() {
addToolBinToPath();
addUvToPathAndOutput(setupResult.uvDir);
setToolDir();
addPythonDirToPath();
setupPython();
await activateEnvironment();
addMatchers();
@@ -129424,7 +129619,7 @@ async function run() {
}
}
function detectEmptyWorkdir() {
if (node_fs_1.default.readdirSync(".").length === 0) {
if (node_fs_1.default.readdirSync(inputs_1.workingDirectory).length === 0) {
if (inputs_1.ignoreEmptyWorkdir) {
core.info("Empty workdir detected. Ignoring because ignore-empty-workdir is enabled");
}
@@ -129451,21 +129646,21 @@ async function setupUv(platform, arch, checkSum, githubToken) {
}
async function determineVersion(manifestFile) {
if (inputs_1.version !== "") {
return await (0, download_version_1.resolveVersion)(inputs_1.version, manifestFile, inputs_1.githubToken);
return await (0, download_version_1.resolveVersion)(inputs_1.version, manifestFile, inputs_1.githubToken, inputs_1.resolutionStrategy);
}
if (inputs_1.versionFile !== "") {
const versionFromFile = (0, resolve_1.getUvVersionFromFile)(inputs_1.versionFile);
if (versionFromFile === undefined) {
throw new Error(`Could not determine uv version from file: ${inputs_1.versionFile}`);
}
return await (0, download_version_1.resolveVersion)(versionFromFile, manifestFile, inputs_1.githubToken);
return await (0, download_version_1.resolveVersion)(versionFromFile, manifestFile, inputs_1.githubToken, inputs_1.resolutionStrategy);
}
const versionFromUvToml = (0, resolve_1.getUvVersionFromFile)(`${inputs_1.workingDirectory}${path.sep}uv.toml`);
const versionFromPyproject = (0, resolve_1.getUvVersionFromFile)(`${inputs_1.workingDirectory}${path.sep}pyproject.toml`);
if (versionFromUvToml === undefined && versionFromPyproject === undefined) {
core.info("Could not determine uv version from uv.toml or pyproject.toml. Falling back to latest.");
}
return await (0, download_version_1.resolveVersion)(versionFromUvToml || versionFromPyproject || "latest", manifestFile, inputs_1.githubToken);
return await (0, download_version_1.resolveVersion)(versionFromUvToml || versionFromPyproject || "latest", manifestFile, inputs_1.githubToken, inputs_1.resolutionStrategy);
}
function addUvToPathAndOutput(cachedPath) {
core.setOutput("uv-path", `${cachedPath}${path.sep}uv`);
@@ -129516,6 +129711,17 @@ function setToolDir() {
core.info(`Set UV_TOOL_DIR to ${inputs_1.toolDir}`);
}
}
function addPythonDirToPath() {
core.exportVariable("UV_PYTHON_INSTALL_DIR", inputs_1.pythonDir);
core.info(`Set UV_PYTHON_INSTALL_DIR to ${inputs_1.pythonDir}`);
if (process.env.UV_NO_MODIFY_PATH !== undefined) {
core.info("UV_NO_MODIFY_PATH is set, not adding python dir to path");
}
else {
core.addPath(inputs_1.pythonDir);
core.info(`Added ${inputs_1.pythonDir} to the path`);
}
}
function setupPython() {
if (inputs_1.pythonVersion !== "") {
core.exportVariable("UV_PYTHON", inputs_1.pythonVersion);
@@ -129530,12 +129736,14 @@ async function activateEnvironment() {
const execArgs = ["venv", ".venv", "--directory", inputs_1.workingDirectory];
core.info("Activating python venv...");
await exec.exec("uv", execArgs);
let venvBinPath = `${inputs_1.workingDirectory}${path.sep}.venv${path.sep}bin`;
const venvPath = path.resolve(`${inputs_1.workingDirectory}${path.sep}.venv`);
let venvBinPath = `${venvPath}${path.sep}bin`;
if (process.platform === "win32") {
venvBinPath = `${inputs_1.workingDirectory}${path.sep}.venv${path.sep}Scripts`;
venvBinPath = `${venvPath}${path.sep}Scripts`;
}
core.addPath(path.resolve(venvBinPath));
core.exportVariable("VIRTUAL_ENV", path.resolve(`${inputs_1.workingDirectory}${path.sep}.venv`));
core.exportVariable("VIRTUAL_ENV", venvPath);
core.setOutput("venv", venvPath);
}
}
function setCacheDir() {
@@ -129708,7 +129916,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.addProblemMatchers = exports.manifestFile = exports.githubToken = exports.toolDir = exports.toolBinDir = exports.ignoreEmptyWorkdir = exports.ignoreNothingToCache = exports.pruneCache = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.saveCache = exports.restoreCache = exports.enableCache = exports.checkSum = exports.activateEnvironment = exports.pythonVersion = exports.versionFile = exports.version = exports.workingDirectory = void 0;
exports.resolutionStrategy = exports.addProblemMatchers = exports.manifestFile = exports.githubToken = exports.pythonDir = exports.toolDir = exports.toolBinDir = exports.ignoreEmptyWorkdir = exports.ignoreNothingToCache = exports.cachePython = exports.pruneCache = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.saveCache = exports.restoreCache = exports.enableCache = exports.checkSum = exports.activateEnvironment = exports.pythonVersion = exports.versionFile = exports.version = exports.workingDirectory = void 0;
exports.getUvPythonDir = getUvPythonDir;
const node_path_1 = __importDefault(__nccwpck_require__(76760));
const core = __importStar(__nccwpck_require__(37484));
const config_file_1 = __nccwpck_require__(27846);
@@ -129725,13 +129934,16 @@ exports.cacheSuffix = core.getInput("cache-suffix") || "";
exports.cacheLocalPath = getCacheLocalPath();
exports.cacheDependencyGlob = getCacheDependencyGlob();
exports.pruneCache = core.getInput("prune-cache") === "true";
exports.cachePython = core.getInput("cache-python") === "true";
exports.ignoreNothingToCache = core.getInput("ignore-nothing-to-cache") === "true";
exports.ignoreEmptyWorkdir = core.getInput("ignore-empty-workdir") === "true";
exports.toolBinDir = getToolBinDir();
exports.toolDir = getToolDir();
exports.pythonDir = getUvPythonDir();
exports.githubToken = core.getInput("github-token");
exports.manifestFile = getManifestFile();
exports.addProblemMatchers = core.getInput("add-problem-matchers") === "true";
exports.resolutionStrategy = getResolutionStrategy();
function getVersionFile() {
const versionFileInput = core.getInput("version-file");
if (versionFileInput !== "") {
@@ -129818,6 +130030,24 @@ function getCacheDirFromConfig() {
}
return undefined;
}
function getUvPythonDir() {
if (process.env.UV_PYTHON_INSTALL_DIR !== undefined) {
core.info(`UV_PYTHON_INSTALL_DIR is already set to ${process.env.UV_PYTHON_INSTALL_DIR}`);
return process.env.UV_PYTHON_INSTALL_DIR;
}
if (process.env.RUNNER_ENVIRONMENT !== "github-hosted") {
if (process.platform === "win32") {
return `${process.env.APPDATA}${node_path_1.default.sep}uv${node_path_1.default.sep}python`;
}
else {
return `${process.env.HOME}${node_path_1.default.sep}.local${node_path_1.default.sep}share${node_path_1.default.sep}uv${node_path_1.default.sep}python`;
}
}
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${node_path_1.default.sep}uv-python-dir`;
}
throw Error("Could not determine UV_PYTHON_INSTALL_DIR. Please make sure RUNNER_TEMP is set or provide the UV_PYTHON_INSTALL_DIR environment variable");
}
function getCacheDependencyGlob() {
const cacheDependencyGlobInput = core.getInput("cache-dependency-glob");
if (cacheDependencyGlobInput !== "") {
@@ -129850,6 +130080,16 @@ function getManifestFile() {
}
return undefined;
}
function getResolutionStrategy() {
const resolutionStrategyInput = core.getInput("resolution-strategy");
if (resolutionStrategyInput === "lowest") {
return "lowest";
}
if (resolutionStrategyInput === "highest" || resolutionStrategyInput === "") {
return "highest";
}
throw new Error(`Invalid resolution-strategy: ${resolutionStrategyInput}. Must be 'highest' or 'lowest'.`);
}
/***/ }),
@@ -134590,9 +134830,11 @@ var paginatingEndpoints = [
"GET /networks/{owner}/{repo}/events",
"GET /notifications",
"GET /organizations",
"GET /organizations/{org}/dependabot/repository-access",
"GET /orgs/{org}/actions/cache/usage-by-repository",
"GET /orgs/{org}/actions/hosted-runners",
"GET /orgs/{org}/actions/permissions/repositories",
"GET /orgs/{org}/actions/permissions/self-hosted-runners/repositories",
"GET /orgs/{org}/actions/runner-groups",
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners",
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories",
@@ -134642,6 +134884,9 @@ var paginatingEndpoints = [
"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories",
"GET /orgs/{org}/private-registries",
"GET /orgs/{org}/projects",
"GET /orgs/{org}/projectsV2",
"GET /orgs/{org}/projectsV2/{project_number}/fields",
"GET /orgs/{org}/projectsV2/{project_number}/items",
"GET /orgs/{org}/properties/values",
"GET /orgs/{org}/public_members",
"GET /orgs/{org}/repos",
@@ -134662,7 +134907,6 @@ var paginatingEndpoints = [
"GET /orgs/{org}/teams/{team_slug}/projects",
"GET /orgs/{org}/teams/{team_slug}/repos",
"GET /orgs/{org}/teams/{team_slug}/teams",
"GET /projects/columns/{column_id}/cards",
"GET /projects/{project_id}/collaborators",
"GET /projects/{project_id}/columns",
"GET /repos/{owner}/{repo}/actions/artifacts",
@@ -134722,6 +134966,8 @@ var paginatingEndpoints = [
"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions",
"GET /repos/{owner}/{repo}/issues/events",
"GET /repos/{owner}/{repo}/issues/{issue_number}/comments",
"GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by",
"GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocking",
"GET /repos/{owner}/{repo}/issues/{issue_number}/events",
"GET /repos/{owner}/{repo}/issues/{issue_number}/labels",
"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions",
@@ -134802,6 +135048,8 @@ var paginatingEndpoints = [
"GET /user/subscriptions",
"GET /user/teams",
"GET /users",
"GET /users/{user_id}/projectsV2/{project_number}/fields",
"GET /users/{user_id}/projectsV2/{project_number}/items",
"GET /users/{username}/attestations/{subject_digest}",
"GET /users/{username}/events",
"GET /users/{username}/events/orgs/{org}",
@@ -134814,6 +135062,7 @@ var paginatingEndpoints = [
"GET /users/{username}/orgs",
"GET /users/{username}/packages",
"GET /users/{username}/projects",
"GET /users/{username}/projectsV2",
"GET /users/{username}/received_events",
"GET /users/{username}/received_events/public",
"GET /users/{username}/repos",
@@ -137212,7 +137461,7 @@ legacyRestEndpointMethods.VERSION = VERSION;
/***/ ((module) => {
"use strict";
module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"4.0.5","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@protobuf-ts/runtime-rpc":"^2.11.1","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","semver":"^6.3.1"},"devDependencies":{"@types/node":"^22.13.9","@types/semver":"^6.0.0","@protobuf-ts/plugin":"^2.9.4","typescript":"^5.2.2"}}');
module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"4.1.0","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@protobuf-ts/runtime-rpc":"^2.11.1","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","semver":"^6.3.1"},"devDependencies":{"@types/node":"^22.13.9","@types/semver":"^6.0.0","@protobuf-ts/plugin":"^2.9.4","typescript":"^5.2.2"}}');
/***/ }),

155
dist/update-known-versions/index.js generated vendored
View File

@@ -61851,6 +61851,150 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.KNOWN_CHECKSUMS = void 0;
// AUTOGENERATED_DO_NOT_EDIT
exports.KNOWN_CHECKSUMS = {
"aarch64-apple-darwin-0.9.3": "d6b2eaa1025b24b4779602763ad92f20112cbf19732fc6e0c72bb57a6a592c6c",
"aarch64-pc-windows-msvc-0.9.3": "cf14a72d3a53e9cd63a0d87b6f2d1e92429dea9cd133d77c8ebffd57248191f1",
"aarch64-unknown-linux-gnu-0.9.3": "2094a3ead5a026a2f6894c4d3f71026129c8878939a57f17f0c8246a737bed1d",
"aarch64-unknown-linux-musl-0.9.3": "0544bdb24daffe91e3c14373875767e0be31e85e85e532171ab53d8c744149ac",
"arm-unknown-linux-musleabihf-0.9.3": "d120656ddfd22cbcf751c3cf7173992ab4fccf83282868ba1e3ffb79cea4fee6",
"armv7-unknown-linux-gnueabihf-0.9.3": "a524b78c31a43131ad0872e56fcaeb36616f11e5323acb74b547157272723eb6",
"armv7-unknown-linux-musleabihf-0.9.3": "acb2a76a585e27b3ded59eeba114771cc76303ea1d3e53c7b9df6b60ed44b952",
"i686-pc-windows-msvc-0.9.3": "dd054d5a92c1b88daa757e913c85f2f1b9c8bd3b6e530916cfc4d4a612f5638f",
"i686-unknown-linux-gnu-0.9.3": "fd16f999a437157d7a0fce41963373d994480431412b465bda9d818c4070c952",
"i686-unknown-linux-musl-0.9.3": "c77e3cd1ac93cf04695f952bc53f79f93b5ff2f126f0d1fa6a347b7099aca0b2",
"powerpc64-unknown-linux-gnu-0.9.3": "98eee12b4bab516bdea0be3a6c5ea0077c6f90d8d745382fc1f41256fcbacddb",
"powerpc64le-unknown-linux-gnu-0.9.3": "ae6e1c44e6291041dfcef21bedb5ea528992ff52ae193c5a17d4ac0bf94188e5",
"riscv64gc-unknown-linux-gnu-0.9.3": "369eb1efe7126228a77eab55eafb53f176025b67c9c73c53cd176a173d2d3485",
"s390x-unknown-linux-gnu-0.9.3": "3864b46a71bc7873d712a4b38d89df47c9e654b09a535d21a4280feb325e7c7a",
"x86_64-apple-darwin-0.9.3": "ad57ed22bf793267ea97cfc0022afa096149e894dd161ee4ae5401b7c4a6db83",
"x86_64-pc-windows-msvc-0.9.3": "9f7595313b44e57dcaeef63fe4f3de9a0cf4f92a53302b429341f457f70ca3b9",
"x86_64-unknown-linux-gnu-0.9.3": "4d6f84490da4b21bb6075ffc1c6b22e0cf37bc98d7cca8aff9fbb759093cdc23",
"x86_64-unknown-linux-musl-0.9.3": "bee6515c7476baea4a491a088ad7750cf599d25f4adcd37e0f987d4192c68f24",
"aarch64-apple-darwin-0.9.2": "90b1e69da3d04772565dd556ae8e72c86bdb7da85a8dfc2c6b50c400b0e6aa97",
"aarch64-pc-windows-msvc-0.9.2": "b28ae90188f00c6d9e6f32fe252ace25a3698eeca1458d435ac1ca55049607ff",
"aarch64-unknown-linux-gnu-0.9.2": "0f0ecf2abcb50f8fb5d2b52c8095af4c133897086e3f2e0259f4fcb3d8ddf273",
"aarch64-unknown-linux-musl-0.9.2": "1456894c855d38a56d541b201abae306780d8494c3a3497aff2815abd3eba12f",
"arm-unknown-linux-musleabihf-0.9.2": "f6a969f0506b4d9e1d73d223243457825a2544ef9cd8dabc0a8e7e7bea697a62",
"armv7-unknown-linux-gnueabihf-0.9.2": "93bbf2c8612174548822086487eef982bb19d95b569d3df83328cff6f5bf7660",
"armv7-unknown-linux-musleabihf-0.9.2": "0f96d45eb4edfff26faaac58d9d5761b3f2628519557534e6969ec2777f35984",
"i686-pc-windows-msvc-0.9.2": "f0cc299f9cfd9850d30f073794cda9523ac7fa2b90de3d1ed47e3fdcbda69ab6",
"i686-unknown-linux-gnu-0.9.2": "5623618c4a99694b24eb3388577495873847ccae716c0827fdb03035ddd4d441",
"i686-unknown-linux-musl-0.9.2": "c9d60b1e09611e3b36d91d5b520687ac15d765fe2a06a47dae068c6ebf23ada1",
"powerpc64-unknown-linux-gnu-0.9.2": "d2c92ae4df26b4f62181b3e8840f85f5a9474cfac707f0f8fdbef03f573836ae",
"powerpc64le-unknown-linux-gnu-0.9.2": "216e11a9001d7985990b0c4b6efd734b27e5e96222f9815d23c6fc8a5a406718",
"riscv64gc-unknown-linux-gnu-0.9.2": "3fdbc9dc623a992c39ea4c126d4ebe1f78dc2013e9056f2ec93f42b0deb154eb",
"s390x-unknown-linux-gnu-0.9.2": "4e4aa34554891bcfb92d50fc2067e99cbbc5bec473ce4b8e3dedad0d42017c85",
"x86_64-apple-darwin-0.9.2": "c887d2c4f629eee99b80a347880870f3bc77f7746db81923efe520f609f80857",
"x86_64-pc-windows-msvc-0.9.2": "ba61d01b7470b282e09e7c82a053472723c2a737fb3d137bd0f111e420cc1d9f",
"x86_64-unknown-linux-gnu-0.9.2": "b775bb84c72210c6c0b9670cfaad0ac2e3953f12a2947d52b57603b4fbae3798",
"x86_64-unknown-linux-musl-0.9.2": "42e4ac8e9dab04d560a9d44be2091cae994d14653238e779177c026e0dbf5779",
"aarch64-apple-darwin-0.9.1": "cc84b5c86fbde176c0e1908abd65cec6e989ff755b6e68a912652beb1311de31",
"aarch64-pc-windows-msvc-0.9.1": "862e0fef8e68f229c99ce05de70a712221bc552403f480379d03f5b05a6886fe",
"aarch64-unknown-linux-gnu-0.9.1": "450cf31a80cf1335b0169b82310ea589e51b12711ca84b1f5b322b87d26b16c5",
"aarch64-unknown-linux-musl-0.9.1": "a171e7335fc2e05767fe0d151db5a6af7d1ba93debfc8c91721763eff457d0a3",
"arm-unknown-linux-musleabihf-0.9.1": "cc290a14f3ffa286b8c5a437f50d5c9bb76e1d27f3d51dd701b0487e62987ea0",
"armv7-unknown-linux-gnueabihf-0.9.1": "1f0d511f7776deaf40bae03102020f939c96c3d12eec741edf81f581546d2232",
"armv7-unknown-linux-musleabihf-0.9.1": "790728d01dd0d252e3151b57b5a716f84d851d0802962144ea822118ae61b2f6",
"i686-pc-windows-msvc-0.9.1": "8880c92097c5410c3bbad5e72cf7d38b57523ed374bcd7462d309b9a11b6df33",
"i686-unknown-linux-gnu-0.9.1": "4eccf96c57c30edf6c11477351f536b1a6191d13854c8ffa6d8eee58637d82e6",
"i686-unknown-linux-musl-0.9.1": "9763ef30957011ce61c56117ef3078c40960c7521c9ee7cbb3ce8aed5b6207a4",
"powerpc64-unknown-linux-gnu-0.9.1": "4a0965091073115314f9fc935cfa3eed43c3f46a48dfa370583a019b052a950c",
"powerpc64le-unknown-linux-gnu-0.9.1": "cd9e06feaccd26dce79fd6930afbe1210edf69b4181304b4c7143871e8fadbe2",
"riscv64gc-unknown-linux-gnu-0.9.1": "394edca0f59b6cf31ee6e3d252442e1e2708483265199d390ac1fc4161f97510",
"s390x-unknown-linux-gnu-0.9.1": "8f4eedabfe57cf1d3ef29633be444ad9fd1c1ce9db89450a548e50ac88436cf0",
"x86_64-apple-darwin-0.9.1": "df530fc06d2fd51ed2efeb75b1ea5eeb77a631eb945efe5f9d90ef5969cd3672",
"x86_64-pc-windows-msvc-0.9.1": "8dba20107ebcd38f3a8e4acfeb7b209d594e112a3be8d1cea69fe6d501a69fdf",
"x86_64-unknown-linux-gnu-0.9.1": "da55e00c6399a34a47c1f10973d8618b425a530e149836305bcca7ff68d955ff",
"x86_64-unknown-linux-musl-0.9.1": "104bbd393104f09f84db474310b0fc0327c5f6566bd903c9a9cac00d137208b7",
"aarch64-apple-darwin-0.9.0": "136e70984e3fd359f4119ef445bfd67d6e0d50f15400226ef8db7b738ebef6d0",
"aarch64-pc-windows-msvc-0.9.0": "a816625eae0117c8ca0cd618716ddc11c68522d1ecfa7d2738f1c670099fef10",
"aarch64-unknown-linux-gnu-0.9.0": "ca410766024d2d726c937bda2e9441823e2848894ac5a2f8b608902384fc391f",
"aarch64-unknown-linux-musl-0.9.0": "041d8f56ffe82cbbc0f63f187f4e1935ac8b32531cf071bf5fa7abcb0441b147",
"arm-unknown-linux-musleabihf-0.9.0": "ec1ec28a7cc584a8a06632b717f89747fa8b8ba58277ad68c8f289aaeac35a0d",
"armv7-unknown-linux-gnueabihf-0.9.0": "3063c9adb4786ed49d699de9cf24c721ff2cb96bd2bb39465cab3e42d4e4efcc",
"armv7-unknown-linux-musleabihf-0.9.0": "b425603d3ef20c579b94681a587eaa3f8a2198a86473c7cd5f687a93f8a0fdb0",
"i686-pc-windows-msvc-0.9.0": "fd1dc1c9f7f9bc66186188894e24864e3def2232e1de0d49416037161932bdd7",
"i686-unknown-linux-gnu-0.9.0": "02f4b4070af6e0c591d676543b97f7f5d2c0ebf5b1d01d9e116391289f44afc0",
"i686-unknown-linux-musl-0.9.0": "41fc684a948ec2ff9255b484e11b99a0b504a4fc19d466b549e51b690a6325d5",
"powerpc64-unknown-linux-gnu-0.9.0": "122b9216414a8a89b0a716dd7bf5995d03cded62747deef68dacca6a9839f96f",
"powerpc64le-unknown-linux-gnu-0.9.0": "affbf883bfe4ae0204943b7d936fc2269e806a2534d65da0e75da713ac71ce4e",
"riscv64gc-unknown-linux-gnu-0.9.0": "86c9596204fecdacf038f498553a7e8be81aabebe430a1eb08f8ae8215610b10",
"s390x-unknown-linux-gnu-0.9.0": "8f41968e5eceda304d9cd70d83a9dc7e205e221c651572862b74845d045203ee",
"x86_64-apple-darwin-0.9.0": "8fce2fe15b227ca38c706acda7cf0ebc43d5ec4be537f1badd58d5e938c7ed89",
"x86_64-pc-windows-msvc-0.9.0": "4bad2c47dafb52ad774072fb7a260e5c9f3dbf73441658db1128eb2aec5818eb",
"x86_64-unknown-linux-gnu-0.9.0": "4dadaa5ff5009ccd6a0a43f6ccfa32bf36ed2eff18df7011275a9b1d81950e7b",
"x86_64-unknown-linux-musl-0.9.0": "8b045dceb6f13f2ce36285c72ed2d6a51241aea9da5636637c020bcecea205c8",
"aarch64-apple-darwin-0.8.24": "5f0d9d14b17ba3f0af4602a7a5a2e4faececf0a9463736cf8e6269c49569b2fa",
"aarch64-pc-windows-msvc-0.8.24": "349e5f26ea4db6459578db210bb8d676e5b2acc13962877637a95f3e951a6899",
"aarch64-unknown-linux-gnu-0.8.24": "9526f8b0eddd13f5162c18df5ecf35c21e4f96567d21849750356b60121882df",
"aarch64-unknown-linux-musl-0.8.24": "2b8f7383b19d408c680a74a6dbd41c70976516922234eb0075fd2de67413cf29",
"arm-unknown-linux-musleabihf-0.8.24": "e25ead24c0809fd81c67b72a30c81f2e76eff0d702d341c468326e3e374559f5",
"armv7-unknown-linux-gnueabihf-0.8.24": "3c0d984f55bcde6c16c8b4b749d2249b6a61125418dd6b333f249d846e759c71",
"armv7-unknown-linux-musleabihf-0.8.24": "3e980197c242f36cf93cba0ebdad8f772ebf442ee856ba694daab624affab146",
"i686-pc-windows-msvc-0.8.24": "7a8b3cdd8c02a662a19c426fbae99809d83dbedf172e52d30ba4c266ccd9a8b9",
"i686-unknown-linux-gnu-0.8.24": "7957fbdc4538d706440173d14e91b6a2098b95701654125ebc2d05824aa233e6",
"i686-unknown-linux-musl-0.8.24": "1a2b59dddc206106fb19a66dd665bfe85411281ace07825ba60988a00e230afd",
"powerpc64-unknown-linux-gnu-0.8.24": "22dfcf44c1e8b273640e13aa41c72856654da650d58e0b39d1143dbdb4ee7997",
"powerpc64le-unknown-linux-gnu-0.8.24": "0e757a7109aecbe5b6759470164d466e2a2a234808d84095e6db52a13a62f399",
"riscv64gc-unknown-linux-gnu-0.8.24": "45342e4477dfde1f1d50a8c223706377ddb861cf5c4e1a323a936401472ed2da",
"s390x-unknown-linux-gnu-0.8.24": "8167af20bf336179f5ffb96421d38cc7cb5d54dfa9b90820154cffbb456032de",
"x86_64-apple-darwin-0.8.24": "b75ccf924654ad168efac2ec6934704b3d6b9cbff1650b35e17fa3d26d2bea1f",
"x86_64-pc-windows-msvc-0.8.24": "5055be7909a844f703c54e8846d14ab676c34be6ea0d969ee74c5747feaedda0",
"x86_64-unknown-linux-gnu-0.8.24": "db8179fffd97b7557b9a519bae82eaa4f499b02ef546f738a35e74e26c47e6b7",
"x86_64-unknown-linux-musl-0.8.24": "b38ce629a8653a6b444b7c1bff2d8b99bdafd274e66a4900c5838051e3d99d26",
"aarch64-apple-darwin-0.8.23": "e9128449ea08a3c953f0e08dabc78c7588361a898e6bd8163e7e8f8c96adeb66",
"aarch64-pc-windows-msvc-0.8.23": "b4720ff1e3dcab3f41ce8135ae6c87d27682428088ce9e9b6802f2645e189a9e",
"aarch64-unknown-linux-gnu-0.8.23": "503d1df80abe76c1f30264de817c9c847ff5fa457d4085517aecde1f5749ed66",
"aarch64-unknown-linux-musl-0.8.23": "d745f61cdd3a845da6484785995bc6d19ceb3117dc3fa609bd304ecbedb87fea",
"arm-unknown-linux-musleabihf-0.8.23": "55fd7161d526080dc07fec87aed63734cf18a20f4ef2fa9b870dd99cfb4e1b07",
"armv7-unknown-linux-gnueabihf-0.8.23": "160e9522965702a31bfcb86ee28318f7d83f3ffdf330739670703fa0a85ce012",
"armv7-unknown-linux-musleabihf-0.8.23": "8cc14b0b7b5118a13c80d9245f0aa540c2596c757d7cbfab622b4f798ce90dd5",
"i686-pc-windows-msvc-0.8.23": "9ca7cc83d6730762bb811ec96aff9c95c5c9a131d4305229348df61bbfc9241a",
"i686-unknown-linux-gnu-0.8.23": "bd578dc12e1170bf14cecd17b343e308edaaee5b44f0cb066076366353567856",
"i686-unknown-linux-musl-0.8.23": "3237b711f1c313b328be0d42395319a2ffdab5f67cd2338fbf77155b6bf425f5",
"powerpc64-unknown-linux-gnu-0.8.23": "92f30e2adc8c4ec75b8dc85a82df7b74a617346c7748c41cb4672a61e42791d6",
"powerpc64le-unknown-linux-gnu-0.8.23": "b3f9b147022053b792fd82f7722b527323378c5130a227b7ec667c08b600d1be",
"riscv64gc-unknown-linux-gnu-0.8.23": "a4925b51f0810e44075d336c3fa5b7534c086111dce0d0d9d92a2e2270aea0a8",
"s390x-unknown-linux-gnu-0.8.23": "6bafdbed0e750930a2af123e3cf8b782228aef88d24bf25dc6b0f280bc8ad461",
"x86_64-apple-darwin-0.8.23": "bbb1db369de63d85334e2c43bb925fce63261cefa8c1a8569a6bd4c520f03c0d",
"x86_64-pc-windows-msvc-0.8.23": "454c727fe05ec3763cae9436bb409a6bc5156e9c8ee55a09218191faf8c32445",
"x86_64-unknown-linux-gnu-0.8.23": "b8d378bf1cbdefa6fd18570c3d5e7ea85066f75549cf3840212f505ed37522ed",
"x86_64-unknown-linux-musl-0.8.23": "598f7939cae516de105075d55eb20d906787de307a0011904e301346a13de2ff",
"aarch64-apple-darwin-0.8.22": "3f61099e261e449527141dbf125629fab33ad696468c8c90cebbac40185a306c",
"aarch64-pc-windows-msvc-0.8.22": "dbb3a5bd06d20c9ab8bb9a79c7c4fb5832ca1c7ba5f231a020bc92e5a3c6dcf4",
"aarch64-unknown-linux-gnu-0.8.22": "726b72a137fda33565143325f7d31c42cd30ff9ccdf067e00d124d37b4081cb2",
"aarch64-unknown-linux-musl-0.8.22": "3cb3c891f56891f0027f0287980014930b18875c9396c1d8a19d607b0a6049d9",
"arm-unknown-linux-musleabihf-0.8.22": "78c4898abb5285cbcb53bc2544d93158a705bf2024393d203b7df89406ffd5d7",
"armv7-unknown-linux-gnueabihf-0.8.22": "96f7e526b7cac851f4448ca773ee82216d3d8564161486f5c0ab0d84418cc3bc",
"armv7-unknown-linux-musleabihf-0.8.22": "763bd2b60642c68e2d2d5ce43f741fe9cdb77b6fa771cd8b45971e4a380411d7",
"i686-pc-windows-msvc-0.8.22": "e84c697e29afc76223e020edb3786acebed34779a9cc2ab88e570ff93d69a617",
"i686-unknown-linux-gnu-0.8.22": "f6cfe03095b9cafdbf530cf228803e9ec329511d45e5901e3baa355f96ba37f3",
"i686-unknown-linux-musl-0.8.22": "6ea34f5e656ee0f2085436513e9b6a2caeae7ff14d14871f177a7797f79db20e",
"powerpc64-unknown-linux-gnu-0.8.22": "87b1f9b6452540d1b3e3286e9209fcae39a692c323544c10f6b4f096bfc04673",
"powerpc64le-unknown-linux-gnu-0.8.22": "2f639a402031e62dabd6ca534635d73b26e8b72afeb063f8abc9abc6ba97a8e3",
"riscv64gc-unknown-linux-gnu-0.8.22": "75c83abe161c6e673f7d21e46cd27df539081a9ccf74e4d053e90ba8d2d715e0",
"s390x-unknown-linux-gnu-0.8.22": "a0f671106b8b4c128aad3b52becc34691d7669c3d40bbd5a18df2c60b4d67971",
"x86_64-apple-darwin-0.8.22": "76638fdcfa91357858771551a1c88de1f7c3b270b33ab1866f8a0618d9e442d8",
"x86_64-pc-windows-msvc-0.8.22": "5049375aa2a5162f132b2c1cb992e25d42d47d934cab8c174dbe6f60973dcc12",
"x86_64-unknown-linux-gnu-0.8.22": "741ff1f5742c5a4a25d2f829e8395355e43f7a5ae2ebc6368e9ae2df0efb69cf",
"x86_64-unknown-linux-musl-0.8.22": "06b891ef144bd8390fecb150838f0ff8a34ccaeecf9d744d97945d02ec7389c0",
"aarch64-apple-darwin-0.8.21": "51a10a0ba94139911266779e61296b07fffc98eedf3d8f6e206f86375ac7fb31",
"aarch64-pc-windows-msvc-0.8.21": "ad60ed2fd2c95957c55041d2e61146f0f41aedc7afe87f3f79a8648802713fb5",
"aarch64-unknown-linux-gnu-0.8.21": "5ebc05755ee1688434993d3bf346b6fbdbcbd2f17f1a8339f175e76af18de50c",
"aarch64-unknown-linux-musl-0.8.21": "2afeee16b09d40cbe4de445fe82e1ecc00ed51dd8e118ed7800ca537ee4cf0c2",
"arm-unknown-linux-musleabihf-0.8.21": "f45daacdd988284b011137ba017e5b151252922eec52b457d50770f0cde18387",
"armv7-unknown-linux-gnueabihf-0.8.21": "f6b5fa5a6cfad7fd9fa80c11b24cef18acb8d99c137a6144a4bb1c50dbfb5b1b",
"armv7-unknown-linux-musleabihf-0.8.21": "d53ad3c1c5b549654c2da6f9369df7a68b961f18fcaf847cb8242dc48fe17e20",
"i686-pc-windows-msvc-0.8.21": "8ee8cd0cc5d49a9e3c6f176bdc9d09ece03144dbc0914c20b27e67ff72c0570e",
"i686-unknown-linux-gnu-0.8.21": "327ef2b81967cb2e8407255d3580dd67ddf15fdb18fd3d6e945dc13f76462b0c",
"i686-unknown-linux-musl-0.8.21": "18b7a77c37155ea15166a3a212e69b53f0e6b8d1d399b87c1b3ac4cc646e9b4f",
"powerpc64-unknown-linux-gnu-0.8.21": "1fae8052ce8a9663438ba332f930062b14621adb395eff2950928d7cf8323d16",
"powerpc64le-unknown-linux-gnu-0.8.21": "cca5f83f59251fced9056ecf8ae90e89a83252dda1eb53eab96a76e484776e0d",
"riscv64gc-unknown-linux-gnu-0.8.21": "485f2654720d9fca3c85b147e837f0dc32bb869113bde58e979fc76f0c37547e",
"s390x-unknown-linux-gnu-0.8.21": "5757570db02d2ed3ef5742a1a484b921e716d8412daf45e85c4c79c0a75bf0c1",
"x86_64-apple-darwin-0.8.21": "df0fae941f83f796ea8100958f5d31a185dacc34777f346019123b6cb5571101",
"x86_64-pc-windows-msvc-0.8.21": "ed4f66aacea41026675bca18699958cda13112c77ef5eff3a2f3d376bd1f9177",
"x86_64-unknown-linux-gnu-0.8.21": "166bfa522cc836a3b68bdcef78e40b263ea62f12bb80a8d9c6fda4ce5f2a3994",
"x86_64-unknown-linux-musl-0.8.21": "ff6f6ffca9a026cc99bc43df46e70e33df09bcb544b43e8ef97a5176dd68b516",
"aarch64-apple-darwin-0.8.20": "a87008d013efd78d94102e5268a24990c409bfb39b80df4de32d1c97f093e7ef",
"aarch64-pc-windows-msvc-0.8.20": "ac33f921e0d48d14a106a6cc84b146da7a1f4a3c329c7fb0e1a8e6ff4cf541e6",
"aarch64-unknown-linux-gnu-0.8.20": "b434851cd94e9e2083bc9a5851f1d13748771726bd2ac30027f820fc134b2104",
@@ -69271,9 +69415,11 @@ var paginatingEndpoints = [
"GET /networks/{owner}/{repo}/events",
"GET /notifications",
"GET /organizations",
"GET /organizations/{org}/dependabot/repository-access",
"GET /orgs/{org}/actions/cache/usage-by-repository",
"GET /orgs/{org}/actions/hosted-runners",
"GET /orgs/{org}/actions/permissions/repositories",
"GET /orgs/{org}/actions/permissions/self-hosted-runners/repositories",
"GET /orgs/{org}/actions/runner-groups",
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners",
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories",
@@ -69323,6 +69469,9 @@ var paginatingEndpoints = [
"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories",
"GET /orgs/{org}/private-registries",
"GET /orgs/{org}/projects",
"GET /orgs/{org}/projectsV2",
"GET /orgs/{org}/projectsV2/{project_number}/fields",
"GET /orgs/{org}/projectsV2/{project_number}/items",
"GET /orgs/{org}/properties/values",
"GET /orgs/{org}/public_members",
"GET /orgs/{org}/repos",
@@ -69343,7 +69492,6 @@ var paginatingEndpoints = [
"GET /orgs/{org}/teams/{team_slug}/projects",
"GET /orgs/{org}/teams/{team_slug}/repos",
"GET /orgs/{org}/teams/{team_slug}/teams",
"GET /projects/columns/{column_id}/cards",
"GET /projects/{project_id}/collaborators",
"GET /projects/{project_id}/columns",
"GET /repos/{owner}/{repo}/actions/artifacts",
@@ -69403,6 +69551,8 @@ var paginatingEndpoints = [
"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions",
"GET /repos/{owner}/{repo}/issues/events",
"GET /repos/{owner}/{repo}/issues/{issue_number}/comments",
"GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by",
"GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocking",
"GET /repos/{owner}/{repo}/issues/{issue_number}/events",
"GET /repos/{owner}/{repo}/issues/{issue_number}/labels",
"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions",
@@ -69483,6 +69633,8 @@ var paginatingEndpoints = [
"GET /user/subscriptions",
"GET /user/teams",
"GET /users",
"GET /users/{user_id}/projectsV2/{project_number}/fields",
"GET /users/{user_id}/projectsV2/{project_number}/items",
"GET /users/{username}/attestations/{subject_digest}",
"GET /users/{username}/events",
"GET /users/{username}/events/orgs/{org}",
@@ -69495,6 +69647,7 @@ var paginatingEndpoints = [
"GET /users/{username}/orgs",
"GET /users/{username}/packages",
"GET /users/{username}/projects",
"GET /users/{username}/projectsV2",
"GET /users/{username}/received_events",
"GET /users/{username}/received_events/public",
"GET /users/{username}/repos",

View File

@@ -0,0 +1,82 @@
# Advanced Version Configuration
This document covers advanced options for configuring which version of uv to install.
## Install the latest version
```yaml
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v7
with:
version: "latest"
```
## Install a specific version
```yaml
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v7
with:
version: "0.4.4"
```
## Install a version by supplying a semver range or pep440 specifier
You can specify a [semver range](https://github.com/npm/node-semver?tab=readme-ov-file#ranges)
or [pep440 specifier](https://peps.python.org/pep-0440/#version-specifiers)
to install the latest version that satisfies the range.
```yaml
- name: Install a semver range of uv
uses: astral-sh/setup-uv@v7
with:
version: ">=0.4.0"
```
```yaml
- name: Pinning a minor version of uv
uses: astral-sh/setup-uv@v7
with:
version: "0.4.x"
```
```yaml
- name: Install a pep440-specifier-satisfying version of uv
uses: astral-sh/setup-uv@v7
with:
version: ">=0.4.25,<0.5"
```
## Resolution strategy
By default, when resolving version ranges, setup-uv will install the highest compatible version.
You can change this behavior using the `resolution-strategy` input:
```yaml
- name: Install the lowest compatible version of uv
uses: astral-sh/setup-uv@v7
with:
version: ">=0.4.0"
resolution-strategy: "lowest"
```
The supported resolution strategies are:
- `highest` (default): Install the latest version that satisfies the constraints
- `lowest`: Install the oldest version that satisfies the constraints
This can be useful for testing compatibility with older versions of uv, similar to uv's own `--resolution-strategy` option.
## Install a version defined in a requirements or config file
You can use the `version-file` input to specify a file that contains the version of uv to install.
This can either be a `pyproject.toml` or `uv.toml` file which defines a `required-version` or
uv defined as a dependency in `pyproject.toml` or `requirements.txt`.
[asdf](https://asdf-vm.com/) `.tool-versions` is also supported, but without the `ref` syntax.
```yaml
- name: Install uv based on the version defined in pyproject.toml
uses: astral-sh/setup-uv@v7
with:
version-file: "pyproject.toml"
```

189
docs/caching.md Normal file
View File

@@ -0,0 +1,189 @@
# Caching
This document covers all caching-related configuration options for setup-uv.
## Enable caching
> [!NOTE]
> The cache is pruned before it is uploaded to the GitHub Actions cache. This can lead to
> a small or empty cache. See [Disable cache pruning](#disable-cache-pruning) for more details.
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]
>
> On self-hosted runners this is usually not needed since the cache generated by uv on the runner's
> filesystem is not removed after a run. For more details see [Local cache path](#local-cache-path).
You can optionally define a custom cache key suffix.
```yaml
- name: Enable caching and define a custom cache key suffix
id: setup-uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-suffix: "optional-suffix"
```
When the cache was successfully restored, the output `cache-hit` will be set to `true` and you can
use it in subsequent steps. For example, to use the cache in the above case:
```yaml
- name: Do something if the cache was restored
if: steps.setup-uv.outputs.cache-hit == 'true'
run: echo "Cache was restored"
```
## Cache dependency glob
If you want to control when the GitHub Actions cache is invalidated, specify a glob pattern with the
`cache-dependency-glob` input. The GitHub Actions cache will be invalidated if any file matching the glob pattern
changes. If you use relative paths, they are relative to the repository root.
> [!NOTE]
>
> You can look up supported patterns [here](https://github.com/actions/toolkit/tree/main/packages/glob#patterns)
>
> The default is
> ```yaml
> cache-dependency-glob: |
> **/*requirements*.txt
> **/*requirements*.in
> **/*constraints*.txt
> **/*constraints*.in
> **/pyproject.toml
> **/uv.lock
> **/*.py.lock
> ```
```yaml
- name: Define a cache dependency glob
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
```
```yaml
- name: Define a list of cache dependency globs
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: |
**/requirements*.txt
**/pyproject.toml
```
```yaml
- name: Define an absolute cache dependency glob
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: "/tmp/my-folder/requirements*.txt"
```
```yaml
- name: Never invalidate the cache
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: ""
```
## Restore cache
Restoring an existing cache can be enabled or disabled with the `restore-cache` input.
By default, the cache will be restored.
```yaml
- name: Don't restore an existing cache
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
restore-cache: false
```
## Save cache
You can also disable saving the cache after the run with the `save-cache` input.
This can be useful to save cache storage when you know you will not use the cache of the run again.
By default, the cache will be saved.
```yaml
- name: Don't save the cache after the run
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
save-cache: false
```
## Local cache path
If caching is enabled, this action controls where uv stores its cache on the runner's filesystem
by setting `UV_CACHE_DIR`.
It defaults to `setup-uv-cache` in the `TMP` dir, `D:\a\_temp\setup-uv-cache` on Windows and
`/tmp/setup-uv-cache` on Linux/macOS. You can change the default by specifying the path with the
`cache-local-path` input.
> [!NOTE]
> If the environment variable `UV_CACHE_DIR` is already set this action will not override it.
> If you configured [cache-dir](https://docs.astral.sh/uv/reference/settings/#cache-dir) in your
> config file then it is also respected and this action will not set `UV_CACHE_DIR`.
```yaml
- name: Define a custom uv cache path
uses: astral-sh/setup-uv@v7
with:
cache-local-path: "/path/to/cache"
```
## Disable cache pruning
By default, the uv cache is pruned after every run, removing pre-built wheels, but retaining any
wheels that were built from source. On GitHub-hosted runners, it's typically faster to omit those
pre-built wheels from the cache (and instead re-download them from the registry on each run).
However, on self-hosted or local runners, preserving the cache may be more efficient. See
the [documentation](https://docs.astral.sh/uv/concepts/cache/#caching-in-continuous-integration) for
more information.
If you want to persist the entire cache across runs, disable cache pruning with the `prune-cache`
input.
```yaml
- name: Don't prune the cache before saving it
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
prune-cache: false
```
## Cache Python installs
By default, the Python install dir (`uv python dir` / `UV_PYTHON_INSTALL_DIR`) is not cached,
for the same reason that the dependency cache is pruned.
If you want to cache Python installs along with your dependencies, set the `cache-python` input to `true`.
```yaml
- name: Cache Python installs
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-python: true
```
## Ignore nothing to cache
By default, the action will fail if caching is enabled but there is nothing to upload (the uv cache directory does not exist).
If you want to ignore this, set the `ignore-nothing-to-cache` input to `true`.
```yaml
- name: Ignore nothing to cache
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
ignore-nothing-to-cache: true
```

70
docs/customization.md Normal file
View File

@@ -0,0 +1,70 @@
# Customization
This document covers advanced customization options including checksum validation, custom manifests, and problem matchers.
## Validate checksum
You can specify a checksum to validate the downloaded executable. Checksums up to the default version
are automatically verified by this action. The sha256 hashes can be found on the
[releases page](https://github.com/astral-sh/uv/releases) of the uv repo.
```yaml
- name: Install a specific version and validate the checksum
uses: astral-sh/setup-uv@v7
with:
version: "0.3.1"
checksum: "e11b01402ab645392c7ad6044db63d37e4fd1e745e015306993b07695ea5f9f8"
```
## Manifest file
The `manifest-file` input allows you to specify a JSON manifest that lists available uv versions,
architectures, and their download URLs. By default, this action uses the manifest file contained
in this repository, which is automatically updated with each release of uv.
The manifest file contains an array of objects, each describing a version,
architecture, platform, and the corresponding download URL. For example:
```json
[
{
"version": "0.7.13",
"artifactName": "uv-aarch64-apple-darwin.tar.gz",
"arch": "aarch64",
"platform": "apple-darwin",
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.7.13/uv-aarch64-apple-darwin.tar.gz"
},
...
]
```
You can supply a custom manifest file URL to define additional versions,
architectures, or different download URLs.
This is useful if you maintain your own uv builds or want to override the default sources.
```yaml
- name: Use a custom manifest file
uses: astral-sh/setup-uv@v7
with:
manifest-file: "https://example.com/my-custom-manifest.json"
```
> [!NOTE]
> When you use a custom manifest file and do not set the `version` input, its default value is `latest`.
> This means the action will install the latest version available in the custom manifest file.
> This is different from the default behavior of installing the latest version from the official uv releases.
## Add problem matchers
This action automatically adds
[problem matchers](https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md)
for python errors.
You can disable this by setting the `add-problem-matchers` input to `false`.
```yaml
- name: Install the latest version of uv without problem matchers
uses: astral-sh/setup-uv@v7
with:
add-problem-matchers: false
```

View File

@@ -0,0 +1,146 @@
# Environment and Tools
This document covers environment activation, tool directory configuration, and authentication options.
## Activate environment
You can set `activate-environment` to `true` to automatically activate a venv.
This allows directly using it in later steps:
```yaml
- name: Install the latest version of uv and activate the environment
uses: astral-sh/setup-uv@v7
with:
activate-environment: true
- run: uv pip install pip
```
> [!WARNING]
>
> Activating the environment adds your dependencies to the `PATH`, which could break some workflows.
> For example, if you have a dependency which requires uv, e.g., `hatch`, activating the
> environment will shadow the `uv` binary installed by this action and may result in a different uv
> version being used.
>
> We do not recommend using this setting for most use-cases. Instead, use `uv run` to execute
> commands in the environment.
## GitHub authentication token
This action uses the GitHub API to fetch the uv release artifacts. To avoid hitting the GitHub API
rate limit too quickly, an authentication token can be provided via the `github-token` input. By
default, the `GITHUB_TOKEN` secret is used, which is automatically provided by GitHub Actions.
If the default
[permissions for the GitHub token](https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)
are not sufficient, you can provide a custom GitHub token with the necessary permissions.
```yaml
- name: Install the latest version of uv with a custom GitHub token
uses: astral-sh/setup-uv@v7
with:
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
```
## UV_TOOL_DIR
On Windows `UV_TOOL_DIR` is set to `uv-tool-dir` in the `TMP` dir (e.g. `D:\a\_temp\uv-tool-dir`).
On GitHub hosted runners this is on the much faster `D:` drive.
On all other platforms the tool environments are placed in the
[default location](https://docs.astral.sh/uv/concepts/tools/#tools-directory).
If you want to change this behaviour (especially on self-hosted runners) you can use the `tool-dir`
input:
```yaml
- name: Install the latest version of uv with a custom tool dir
uses: astral-sh/setup-uv@v7
with:
tool-dir: "/path/to/tool/dir"
```
## UV_TOOL_BIN_DIR
On Windows `UV_TOOL_BIN_DIR` is set to `uv-tool-bin-dir` in the `TMP` dir (e.g.
`D:\a\_temp\uv-tool-bin-dir`). On GitHub hosted runners this is on the much faster `D:` drive. This
path is also automatically added to the PATH.
On all other platforms the tool binaries get installed to the
[default location](https://docs.astral.sh/uv/concepts/tools/#the-bin-directory).
If you want to change this behaviour (especially on self-hosted runners) you can use the
`tool-bin-dir` input:
```yaml
- name: Install the latest version of uv with a custom tool bin dir
uses: astral-sh/setup-uv@v7
with:
tool-bin-dir: "/path/to/tool-bin/dir"
```
## Tilde Expansion
This action supports expanding the `~` character to the user's home directory for the following inputs:
- `version-file`
- `cache-local-path`
- `tool-dir`
- `tool-bin-dir`
- `cache-dependency-glob`
```yaml
- name: Expand the tilde character
uses: astral-sh/setup-uv@v7
with:
cache-local-path: "~/path/to/cache"
tool-dir: "~/path/to/tool/dir"
tool-bin-dir: "~/path/to/tool-bin/dir"
cache-dependency-glob: "~/my-cache-buster"
```
## Ignore empty workdir
By default, the action will warn if the workdir is empty, because this is usually the case when
`actions/checkout` is configured to run after `setup-uv`, which is not supported.
If you want to ignore this, set the `ignore-empty-workdir` input to `true`.
```yaml
- name: Ignore empty workdir
uses: astral-sh/setup-uv@v7
with:
ignore-empty-workdir: true
```
## Environment Variables
This action sets several environment variables that influence uv's behavior and can be used by subsequent steps:
- `UV_PYTHON`: Set when `python-version` input is specified. Controls which Python version uv uses.
- `UV_CACHE_DIR`: Set when caching is enabled (unless already configured in uv config files). Controls where uv stores its cache.
- `UV_TOOL_DIR`: Set when `tool-dir` input is specified. Controls where uv installs tool environments.
- `UV_TOOL_BIN_DIR`: Set when `tool-bin-dir` input is specified. Controls where uv installs tool binaries.
- `UV_PYTHON_INSTALL_DIR`: Always set. Controls where uv installs Python versions.
- `VIRTUAL_ENV`: Set when `activate-environment` is true. Points to the activated virtual environment.
**Environment variables that affect the action behavior:**
- `UV_NO_MODIFY_PATH`: If set, prevents the action from modifying PATH. Cannot be used with `activate-environment`.
- `UV_CACHE_DIR`: If already set, the action will respect it instead of setting its own cache directory.
```yaml
- name: Example using environment variables
uses: astral-sh/setup-uv@v7
with:
python-version: "3.12"
tool-dir: "/custom/tool/dir"
enable-cache: true
- name: Check environment variables
run: |
echo "UV_PYTHON: $UV_PYTHON"
echo "UV_CACHE_DIR: $UV_CACHE_DIR"
echo "UV_TOOL_DIR: $UV_TOOL_DIR"
echo "UV_PYTHON_INSTALL_DIR: $UV_PYTHON_INSTALL_DIR"
```

1613
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -21,28 +21,28 @@
"author": "@eifinger",
"license": "MIT",
"dependencies": {
"@actions/cache": "^4.0.5",
"@actions/cache": "^4.1.0",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/glob": "^0.5.0",
"@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.2",
"@octokit/core": "^7.0.5",
"@octokit/plugin-paginate-rest": "^13.1.1",
"@octokit/plugin-paginate-rest": "^13.2.0",
"@octokit/plugin-rest-endpoint-methods": "^16.1.0",
"@renovatebot/pep440": "^4.2.1",
"smol-toml": "^1.4.2",
"undici": "^7.16.0"
},
"devDependencies": {
"@biomejs/biome": "2.2.4",
"@biomejs/biome": "2.2.5",
"@types/js-yaml": "^4.0.9",
"@types/node": "^24.7.0",
"@types/semver": "^7.7.1",
"@vercel/ncc": "^0.38.4",
"jest": "^30.1.3",
"jest": "^30.2.0",
"js-yaml": "^4.1.0",
"ts-jest": "^29.4.4",
"typescript": "^5.9.2"
"typescript": "^5.9.3"
}
}

View File

@@ -5,8 +5,10 @@ import { hashFiles } from "../hash/hash-files";
import {
cacheDependencyGlob,
cacheLocalPath,
cachePython,
cacheSuffix,
pruneCache,
pythonDir,
pythonVersion as pythonVersionInput,
restoreCache as shouldRestoreCache,
workingDirectory,
@@ -30,8 +32,12 @@ export async function restoreCache(): Promise<void> {
core.info(
`Trying to restore uv cache from GitHub Actions cache with key: ${cacheKey}`,
);
const cachePaths = [cacheLocalPath];
if (cachePython) {
cachePaths.push(pythonDir);
}
try {
matchedKey = await cache.restoreCache([cacheLocalPath], cacheKey);
matchedKey = await cache.restoreCache(cachePaths, cacheKey);
} catch (err) {
const message = (err as Error).message;
core.warning(message);
@@ -62,7 +68,8 @@ async function computeKeys(): Promise<string> {
const pythonVersion = await getPythonVersion();
const platform = await getPlatform();
const pruned = pruneCache ? "-pruned" : "";
return `setup-uv-${CACHE_VERSION}-${getArch()}-${platform}-${pythonVersion}${pruned}${cacheDependencyPathHash}${suffix}`;
const python = cachePython ? "-py" : "";
return `setup-uv-${CACHE_VERSION}-${getArch()}-${platform}-${pythonVersion}${pruned}${python}${cacheDependencyPathHash}${suffix}`;
}
async function getPythonVersion(): Promise<string> {

View File

@@ -1,5 +1,293 @@
// AUTOGENERATED_DO_NOT_EDIT
export const KNOWN_CHECKSUMS: { [key: string]: string } = {
"aarch64-apple-darwin-0.9.3":
"d6b2eaa1025b24b4779602763ad92f20112cbf19732fc6e0c72bb57a6a592c6c",
"aarch64-pc-windows-msvc-0.9.3":
"cf14a72d3a53e9cd63a0d87b6f2d1e92429dea9cd133d77c8ebffd57248191f1",
"aarch64-unknown-linux-gnu-0.9.3":
"2094a3ead5a026a2f6894c4d3f71026129c8878939a57f17f0c8246a737bed1d",
"aarch64-unknown-linux-musl-0.9.3":
"0544bdb24daffe91e3c14373875767e0be31e85e85e532171ab53d8c744149ac",
"arm-unknown-linux-musleabihf-0.9.3":
"d120656ddfd22cbcf751c3cf7173992ab4fccf83282868ba1e3ffb79cea4fee6",
"armv7-unknown-linux-gnueabihf-0.9.3":
"a524b78c31a43131ad0872e56fcaeb36616f11e5323acb74b547157272723eb6",
"armv7-unknown-linux-musleabihf-0.9.3":
"acb2a76a585e27b3ded59eeba114771cc76303ea1d3e53c7b9df6b60ed44b952",
"i686-pc-windows-msvc-0.9.3":
"dd054d5a92c1b88daa757e913c85f2f1b9c8bd3b6e530916cfc4d4a612f5638f",
"i686-unknown-linux-gnu-0.9.3":
"fd16f999a437157d7a0fce41963373d994480431412b465bda9d818c4070c952",
"i686-unknown-linux-musl-0.9.3":
"c77e3cd1ac93cf04695f952bc53f79f93b5ff2f126f0d1fa6a347b7099aca0b2",
"powerpc64-unknown-linux-gnu-0.9.3":
"98eee12b4bab516bdea0be3a6c5ea0077c6f90d8d745382fc1f41256fcbacddb",
"powerpc64le-unknown-linux-gnu-0.9.3":
"ae6e1c44e6291041dfcef21bedb5ea528992ff52ae193c5a17d4ac0bf94188e5",
"riscv64gc-unknown-linux-gnu-0.9.3":
"369eb1efe7126228a77eab55eafb53f176025b67c9c73c53cd176a173d2d3485",
"s390x-unknown-linux-gnu-0.9.3":
"3864b46a71bc7873d712a4b38d89df47c9e654b09a535d21a4280feb325e7c7a",
"x86_64-apple-darwin-0.9.3":
"ad57ed22bf793267ea97cfc0022afa096149e894dd161ee4ae5401b7c4a6db83",
"x86_64-pc-windows-msvc-0.9.3":
"9f7595313b44e57dcaeef63fe4f3de9a0cf4f92a53302b429341f457f70ca3b9",
"x86_64-unknown-linux-gnu-0.9.3":
"4d6f84490da4b21bb6075ffc1c6b22e0cf37bc98d7cca8aff9fbb759093cdc23",
"x86_64-unknown-linux-musl-0.9.3":
"bee6515c7476baea4a491a088ad7750cf599d25f4adcd37e0f987d4192c68f24",
"aarch64-apple-darwin-0.9.2":
"90b1e69da3d04772565dd556ae8e72c86bdb7da85a8dfc2c6b50c400b0e6aa97",
"aarch64-pc-windows-msvc-0.9.2":
"b28ae90188f00c6d9e6f32fe252ace25a3698eeca1458d435ac1ca55049607ff",
"aarch64-unknown-linux-gnu-0.9.2":
"0f0ecf2abcb50f8fb5d2b52c8095af4c133897086e3f2e0259f4fcb3d8ddf273",
"aarch64-unknown-linux-musl-0.9.2":
"1456894c855d38a56d541b201abae306780d8494c3a3497aff2815abd3eba12f",
"arm-unknown-linux-musleabihf-0.9.2":
"f6a969f0506b4d9e1d73d223243457825a2544ef9cd8dabc0a8e7e7bea697a62",
"armv7-unknown-linux-gnueabihf-0.9.2":
"93bbf2c8612174548822086487eef982bb19d95b569d3df83328cff6f5bf7660",
"armv7-unknown-linux-musleabihf-0.9.2":
"0f96d45eb4edfff26faaac58d9d5761b3f2628519557534e6969ec2777f35984",
"i686-pc-windows-msvc-0.9.2":
"f0cc299f9cfd9850d30f073794cda9523ac7fa2b90de3d1ed47e3fdcbda69ab6",
"i686-unknown-linux-gnu-0.9.2":
"5623618c4a99694b24eb3388577495873847ccae716c0827fdb03035ddd4d441",
"i686-unknown-linux-musl-0.9.2":
"c9d60b1e09611e3b36d91d5b520687ac15d765fe2a06a47dae068c6ebf23ada1",
"powerpc64-unknown-linux-gnu-0.9.2":
"d2c92ae4df26b4f62181b3e8840f85f5a9474cfac707f0f8fdbef03f573836ae",
"powerpc64le-unknown-linux-gnu-0.9.2":
"216e11a9001d7985990b0c4b6efd734b27e5e96222f9815d23c6fc8a5a406718",
"riscv64gc-unknown-linux-gnu-0.9.2":
"3fdbc9dc623a992c39ea4c126d4ebe1f78dc2013e9056f2ec93f42b0deb154eb",
"s390x-unknown-linux-gnu-0.9.2":
"4e4aa34554891bcfb92d50fc2067e99cbbc5bec473ce4b8e3dedad0d42017c85",
"x86_64-apple-darwin-0.9.2":
"c887d2c4f629eee99b80a347880870f3bc77f7746db81923efe520f609f80857",
"x86_64-pc-windows-msvc-0.9.2":
"ba61d01b7470b282e09e7c82a053472723c2a737fb3d137bd0f111e420cc1d9f",
"x86_64-unknown-linux-gnu-0.9.2":
"b775bb84c72210c6c0b9670cfaad0ac2e3953f12a2947d52b57603b4fbae3798",
"x86_64-unknown-linux-musl-0.9.2":
"42e4ac8e9dab04d560a9d44be2091cae994d14653238e779177c026e0dbf5779",
"aarch64-apple-darwin-0.9.1":
"cc84b5c86fbde176c0e1908abd65cec6e989ff755b6e68a912652beb1311de31",
"aarch64-pc-windows-msvc-0.9.1":
"862e0fef8e68f229c99ce05de70a712221bc552403f480379d03f5b05a6886fe",
"aarch64-unknown-linux-gnu-0.9.1":
"450cf31a80cf1335b0169b82310ea589e51b12711ca84b1f5b322b87d26b16c5",
"aarch64-unknown-linux-musl-0.9.1":
"a171e7335fc2e05767fe0d151db5a6af7d1ba93debfc8c91721763eff457d0a3",
"arm-unknown-linux-musleabihf-0.9.1":
"cc290a14f3ffa286b8c5a437f50d5c9bb76e1d27f3d51dd701b0487e62987ea0",
"armv7-unknown-linux-gnueabihf-0.9.1":
"1f0d511f7776deaf40bae03102020f939c96c3d12eec741edf81f581546d2232",
"armv7-unknown-linux-musleabihf-0.9.1":
"790728d01dd0d252e3151b57b5a716f84d851d0802962144ea822118ae61b2f6",
"i686-pc-windows-msvc-0.9.1":
"8880c92097c5410c3bbad5e72cf7d38b57523ed374bcd7462d309b9a11b6df33",
"i686-unknown-linux-gnu-0.9.1":
"4eccf96c57c30edf6c11477351f536b1a6191d13854c8ffa6d8eee58637d82e6",
"i686-unknown-linux-musl-0.9.1":
"9763ef30957011ce61c56117ef3078c40960c7521c9ee7cbb3ce8aed5b6207a4",
"powerpc64-unknown-linux-gnu-0.9.1":
"4a0965091073115314f9fc935cfa3eed43c3f46a48dfa370583a019b052a950c",
"powerpc64le-unknown-linux-gnu-0.9.1":
"cd9e06feaccd26dce79fd6930afbe1210edf69b4181304b4c7143871e8fadbe2",
"riscv64gc-unknown-linux-gnu-0.9.1":
"394edca0f59b6cf31ee6e3d252442e1e2708483265199d390ac1fc4161f97510",
"s390x-unknown-linux-gnu-0.9.1":
"8f4eedabfe57cf1d3ef29633be444ad9fd1c1ce9db89450a548e50ac88436cf0",
"x86_64-apple-darwin-0.9.1":
"df530fc06d2fd51ed2efeb75b1ea5eeb77a631eb945efe5f9d90ef5969cd3672",
"x86_64-pc-windows-msvc-0.9.1":
"8dba20107ebcd38f3a8e4acfeb7b209d594e112a3be8d1cea69fe6d501a69fdf",
"x86_64-unknown-linux-gnu-0.9.1":
"da55e00c6399a34a47c1f10973d8618b425a530e149836305bcca7ff68d955ff",
"x86_64-unknown-linux-musl-0.9.1":
"104bbd393104f09f84db474310b0fc0327c5f6566bd903c9a9cac00d137208b7",
"aarch64-apple-darwin-0.9.0":
"136e70984e3fd359f4119ef445bfd67d6e0d50f15400226ef8db7b738ebef6d0",
"aarch64-pc-windows-msvc-0.9.0":
"a816625eae0117c8ca0cd618716ddc11c68522d1ecfa7d2738f1c670099fef10",
"aarch64-unknown-linux-gnu-0.9.0":
"ca410766024d2d726c937bda2e9441823e2848894ac5a2f8b608902384fc391f",
"aarch64-unknown-linux-musl-0.9.0":
"041d8f56ffe82cbbc0f63f187f4e1935ac8b32531cf071bf5fa7abcb0441b147",
"arm-unknown-linux-musleabihf-0.9.0":
"ec1ec28a7cc584a8a06632b717f89747fa8b8ba58277ad68c8f289aaeac35a0d",
"armv7-unknown-linux-gnueabihf-0.9.0":
"3063c9adb4786ed49d699de9cf24c721ff2cb96bd2bb39465cab3e42d4e4efcc",
"armv7-unknown-linux-musleabihf-0.9.0":
"b425603d3ef20c579b94681a587eaa3f8a2198a86473c7cd5f687a93f8a0fdb0",
"i686-pc-windows-msvc-0.9.0":
"fd1dc1c9f7f9bc66186188894e24864e3def2232e1de0d49416037161932bdd7",
"i686-unknown-linux-gnu-0.9.0":
"02f4b4070af6e0c591d676543b97f7f5d2c0ebf5b1d01d9e116391289f44afc0",
"i686-unknown-linux-musl-0.9.0":
"41fc684a948ec2ff9255b484e11b99a0b504a4fc19d466b549e51b690a6325d5",
"powerpc64-unknown-linux-gnu-0.9.0":
"122b9216414a8a89b0a716dd7bf5995d03cded62747deef68dacca6a9839f96f",
"powerpc64le-unknown-linux-gnu-0.9.0":
"affbf883bfe4ae0204943b7d936fc2269e806a2534d65da0e75da713ac71ce4e",
"riscv64gc-unknown-linux-gnu-0.9.0":
"86c9596204fecdacf038f498553a7e8be81aabebe430a1eb08f8ae8215610b10",
"s390x-unknown-linux-gnu-0.9.0":
"8f41968e5eceda304d9cd70d83a9dc7e205e221c651572862b74845d045203ee",
"x86_64-apple-darwin-0.9.0":
"8fce2fe15b227ca38c706acda7cf0ebc43d5ec4be537f1badd58d5e938c7ed89",
"x86_64-pc-windows-msvc-0.9.0":
"4bad2c47dafb52ad774072fb7a260e5c9f3dbf73441658db1128eb2aec5818eb",
"x86_64-unknown-linux-gnu-0.9.0":
"4dadaa5ff5009ccd6a0a43f6ccfa32bf36ed2eff18df7011275a9b1d81950e7b",
"x86_64-unknown-linux-musl-0.9.0":
"8b045dceb6f13f2ce36285c72ed2d6a51241aea9da5636637c020bcecea205c8",
"aarch64-apple-darwin-0.8.24":
"5f0d9d14b17ba3f0af4602a7a5a2e4faececf0a9463736cf8e6269c49569b2fa",
"aarch64-pc-windows-msvc-0.8.24":
"349e5f26ea4db6459578db210bb8d676e5b2acc13962877637a95f3e951a6899",
"aarch64-unknown-linux-gnu-0.8.24":
"9526f8b0eddd13f5162c18df5ecf35c21e4f96567d21849750356b60121882df",
"aarch64-unknown-linux-musl-0.8.24":
"2b8f7383b19d408c680a74a6dbd41c70976516922234eb0075fd2de67413cf29",
"arm-unknown-linux-musleabihf-0.8.24":
"e25ead24c0809fd81c67b72a30c81f2e76eff0d702d341c468326e3e374559f5",
"armv7-unknown-linux-gnueabihf-0.8.24":
"3c0d984f55bcde6c16c8b4b749d2249b6a61125418dd6b333f249d846e759c71",
"armv7-unknown-linux-musleabihf-0.8.24":
"3e980197c242f36cf93cba0ebdad8f772ebf442ee856ba694daab624affab146",
"i686-pc-windows-msvc-0.8.24":
"7a8b3cdd8c02a662a19c426fbae99809d83dbedf172e52d30ba4c266ccd9a8b9",
"i686-unknown-linux-gnu-0.8.24":
"7957fbdc4538d706440173d14e91b6a2098b95701654125ebc2d05824aa233e6",
"i686-unknown-linux-musl-0.8.24":
"1a2b59dddc206106fb19a66dd665bfe85411281ace07825ba60988a00e230afd",
"powerpc64-unknown-linux-gnu-0.8.24":
"22dfcf44c1e8b273640e13aa41c72856654da650d58e0b39d1143dbdb4ee7997",
"powerpc64le-unknown-linux-gnu-0.8.24":
"0e757a7109aecbe5b6759470164d466e2a2a234808d84095e6db52a13a62f399",
"riscv64gc-unknown-linux-gnu-0.8.24":
"45342e4477dfde1f1d50a8c223706377ddb861cf5c4e1a323a936401472ed2da",
"s390x-unknown-linux-gnu-0.8.24":
"8167af20bf336179f5ffb96421d38cc7cb5d54dfa9b90820154cffbb456032de",
"x86_64-apple-darwin-0.8.24":
"b75ccf924654ad168efac2ec6934704b3d6b9cbff1650b35e17fa3d26d2bea1f",
"x86_64-pc-windows-msvc-0.8.24":
"5055be7909a844f703c54e8846d14ab676c34be6ea0d969ee74c5747feaedda0",
"x86_64-unknown-linux-gnu-0.8.24":
"db8179fffd97b7557b9a519bae82eaa4f499b02ef546f738a35e74e26c47e6b7",
"x86_64-unknown-linux-musl-0.8.24":
"b38ce629a8653a6b444b7c1bff2d8b99bdafd274e66a4900c5838051e3d99d26",
"aarch64-apple-darwin-0.8.23":
"e9128449ea08a3c953f0e08dabc78c7588361a898e6bd8163e7e8f8c96adeb66",
"aarch64-pc-windows-msvc-0.8.23":
"b4720ff1e3dcab3f41ce8135ae6c87d27682428088ce9e9b6802f2645e189a9e",
"aarch64-unknown-linux-gnu-0.8.23":
"503d1df80abe76c1f30264de817c9c847ff5fa457d4085517aecde1f5749ed66",
"aarch64-unknown-linux-musl-0.8.23":
"d745f61cdd3a845da6484785995bc6d19ceb3117dc3fa609bd304ecbedb87fea",
"arm-unknown-linux-musleabihf-0.8.23":
"55fd7161d526080dc07fec87aed63734cf18a20f4ef2fa9b870dd99cfb4e1b07",
"armv7-unknown-linux-gnueabihf-0.8.23":
"160e9522965702a31bfcb86ee28318f7d83f3ffdf330739670703fa0a85ce012",
"armv7-unknown-linux-musleabihf-0.8.23":
"8cc14b0b7b5118a13c80d9245f0aa540c2596c757d7cbfab622b4f798ce90dd5",
"i686-pc-windows-msvc-0.8.23":
"9ca7cc83d6730762bb811ec96aff9c95c5c9a131d4305229348df61bbfc9241a",
"i686-unknown-linux-gnu-0.8.23":
"bd578dc12e1170bf14cecd17b343e308edaaee5b44f0cb066076366353567856",
"i686-unknown-linux-musl-0.8.23":
"3237b711f1c313b328be0d42395319a2ffdab5f67cd2338fbf77155b6bf425f5",
"powerpc64-unknown-linux-gnu-0.8.23":
"92f30e2adc8c4ec75b8dc85a82df7b74a617346c7748c41cb4672a61e42791d6",
"powerpc64le-unknown-linux-gnu-0.8.23":
"b3f9b147022053b792fd82f7722b527323378c5130a227b7ec667c08b600d1be",
"riscv64gc-unknown-linux-gnu-0.8.23":
"a4925b51f0810e44075d336c3fa5b7534c086111dce0d0d9d92a2e2270aea0a8",
"s390x-unknown-linux-gnu-0.8.23":
"6bafdbed0e750930a2af123e3cf8b782228aef88d24bf25dc6b0f280bc8ad461",
"x86_64-apple-darwin-0.8.23":
"bbb1db369de63d85334e2c43bb925fce63261cefa8c1a8569a6bd4c520f03c0d",
"x86_64-pc-windows-msvc-0.8.23":
"454c727fe05ec3763cae9436bb409a6bc5156e9c8ee55a09218191faf8c32445",
"x86_64-unknown-linux-gnu-0.8.23":
"b8d378bf1cbdefa6fd18570c3d5e7ea85066f75549cf3840212f505ed37522ed",
"x86_64-unknown-linux-musl-0.8.23":
"598f7939cae516de105075d55eb20d906787de307a0011904e301346a13de2ff",
"aarch64-apple-darwin-0.8.22":
"3f61099e261e449527141dbf125629fab33ad696468c8c90cebbac40185a306c",
"aarch64-pc-windows-msvc-0.8.22":
"dbb3a5bd06d20c9ab8bb9a79c7c4fb5832ca1c7ba5f231a020bc92e5a3c6dcf4",
"aarch64-unknown-linux-gnu-0.8.22":
"726b72a137fda33565143325f7d31c42cd30ff9ccdf067e00d124d37b4081cb2",
"aarch64-unknown-linux-musl-0.8.22":
"3cb3c891f56891f0027f0287980014930b18875c9396c1d8a19d607b0a6049d9",
"arm-unknown-linux-musleabihf-0.8.22":
"78c4898abb5285cbcb53bc2544d93158a705bf2024393d203b7df89406ffd5d7",
"armv7-unknown-linux-gnueabihf-0.8.22":
"96f7e526b7cac851f4448ca773ee82216d3d8564161486f5c0ab0d84418cc3bc",
"armv7-unknown-linux-musleabihf-0.8.22":
"763bd2b60642c68e2d2d5ce43f741fe9cdb77b6fa771cd8b45971e4a380411d7",
"i686-pc-windows-msvc-0.8.22":
"e84c697e29afc76223e020edb3786acebed34779a9cc2ab88e570ff93d69a617",
"i686-unknown-linux-gnu-0.8.22":
"f6cfe03095b9cafdbf530cf228803e9ec329511d45e5901e3baa355f96ba37f3",
"i686-unknown-linux-musl-0.8.22":
"6ea34f5e656ee0f2085436513e9b6a2caeae7ff14d14871f177a7797f79db20e",
"powerpc64-unknown-linux-gnu-0.8.22":
"87b1f9b6452540d1b3e3286e9209fcae39a692c323544c10f6b4f096bfc04673",
"powerpc64le-unknown-linux-gnu-0.8.22":
"2f639a402031e62dabd6ca534635d73b26e8b72afeb063f8abc9abc6ba97a8e3",
"riscv64gc-unknown-linux-gnu-0.8.22":
"75c83abe161c6e673f7d21e46cd27df539081a9ccf74e4d053e90ba8d2d715e0",
"s390x-unknown-linux-gnu-0.8.22":
"a0f671106b8b4c128aad3b52becc34691d7669c3d40bbd5a18df2c60b4d67971",
"x86_64-apple-darwin-0.8.22":
"76638fdcfa91357858771551a1c88de1f7c3b270b33ab1866f8a0618d9e442d8",
"x86_64-pc-windows-msvc-0.8.22":
"5049375aa2a5162f132b2c1cb992e25d42d47d934cab8c174dbe6f60973dcc12",
"x86_64-unknown-linux-gnu-0.8.22":
"741ff1f5742c5a4a25d2f829e8395355e43f7a5ae2ebc6368e9ae2df0efb69cf",
"x86_64-unknown-linux-musl-0.8.22":
"06b891ef144bd8390fecb150838f0ff8a34ccaeecf9d744d97945d02ec7389c0",
"aarch64-apple-darwin-0.8.21":
"51a10a0ba94139911266779e61296b07fffc98eedf3d8f6e206f86375ac7fb31",
"aarch64-pc-windows-msvc-0.8.21":
"ad60ed2fd2c95957c55041d2e61146f0f41aedc7afe87f3f79a8648802713fb5",
"aarch64-unknown-linux-gnu-0.8.21":
"5ebc05755ee1688434993d3bf346b6fbdbcbd2f17f1a8339f175e76af18de50c",
"aarch64-unknown-linux-musl-0.8.21":
"2afeee16b09d40cbe4de445fe82e1ecc00ed51dd8e118ed7800ca537ee4cf0c2",
"arm-unknown-linux-musleabihf-0.8.21":
"f45daacdd988284b011137ba017e5b151252922eec52b457d50770f0cde18387",
"armv7-unknown-linux-gnueabihf-0.8.21":
"f6b5fa5a6cfad7fd9fa80c11b24cef18acb8d99c137a6144a4bb1c50dbfb5b1b",
"armv7-unknown-linux-musleabihf-0.8.21":
"d53ad3c1c5b549654c2da6f9369df7a68b961f18fcaf847cb8242dc48fe17e20",
"i686-pc-windows-msvc-0.8.21":
"8ee8cd0cc5d49a9e3c6f176bdc9d09ece03144dbc0914c20b27e67ff72c0570e",
"i686-unknown-linux-gnu-0.8.21":
"327ef2b81967cb2e8407255d3580dd67ddf15fdb18fd3d6e945dc13f76462b0c",
"i686-unknown-linux-musl-0.8.21":
"18b7a77c37155ea15166a3a212e69b53f0e6b8d1d399b87c1b3ac4cc646e9b4f",
"powerpc64-unknown-linux-gnu-0.8.21":
"1fae8052ce8a9663438ba332f930062b14621adb395eff2950928d7cf8323d16",
"powerpc64le-unknown-linux-gnu-0.8.21":
"cca5f83f59251fced9056ecf8ae90e89a83252dda1eb53eab96a76e484776e0d",
"riscv64gc-unknown-linux-gnu-0.8.21":
"485f2654720d9fca3c85b147e837f0dc32bb869113bde58e979fc76f0c37547e",
"s390x-unknown-linux-gnu-0.8.21":
"5757570db02d2ed3ef5742a1a484b921e716d8412daf45e85c4c79c0a75bf0c1",
"x86_64-apple-darwin-0.8.21":
"df0fae941f83f796ea8100958f5d31a185dacc34777f346019123b6cb5571101",
"x86_64-pc-windows-msvc-0.8.21":
"ed4f66aacea41026675bca18699958cda13112c77ef5eff3a2f3d376bd1f9177",
"x86_64-unknown-linux-gnu-0.8.21":
"166bfa522cc836a3b68bdcef78e40b263ea62f12bb80a8d9c6fda4ce5f2a3994",
"x86_64-unknown-linux-musl-0.8.21":
"ff6f6ffca9a026cc99bc43df46e70e33df09bcb544b43e8ef97a5176dd68b516",
"aarch64-apple-darwin-0.8.20":
"a87008d013efd78d94102e5268a24990c409bfb39b80df4de32d1c97f093e7ef",
"aarch64-pc-windows-msvc-0.8.20":

View File

@@ -4,6 +4,7 @@ import * as core from "@actions/core";
import * as tc from "@actions/tool-cache";
import type { Endpoints } from "@octokit/types";
import * as pep440 from "@renovatebot/pep440";
import * as semver from "semver";
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/constants";
import { Octokit } from "../utils/octokit";
import type { Architecture, Platform } from "../utils/platforms";
@@ -134,28 +135,31 @@ export async function resolveVersion(
versionInput: string,
manifestFile: string | undefined,
githubToken: string,
resolutionStrategy: "highest" | "lowest" = "highest",
): Promise<string> {
core.debug(`Resolving version: ${versionInput}`);
let version: string;
const isSimpleMinimumVersionSpecifier =
versionInput.includes(">") && !versionInput.includes(",");
if (isSimpleMinimumVersionSpecifier) {
const resolveVersionSpecifierToLatest =
isSimpleMinimumVersionSpecifier && resolutionStrategy === "highest";
if (resolveVersionSpecifierToLatest) {
core.info("Found minimum version specifier, using latest version");
}
if (manifestFile) {
version =
versionInput === "latest" || isSimpleMinimumVersionSpecifier
versionInput === "latest" || resolveVersionSpecifierToLatest
? await getLatestVersionInManifest(manifestFile)
: versionInput;
} else {
version =
versionInput === "latest" || isSimpleMinimumVersionSpecifier
versionInput === "latest" || resolveVersionSpecifierToLatest
? await getLatestVersion(githubToken)
: versionInput;
}
if (tc.isExplicitVersion(version)) {
core.debug(`Version ${version} is an explicit version.`);
if (isSimpleMinimumVersionSpecifier) {
if (resolveVersionSpecifierToLatest) {
if (!pep440.satisfies(version, versionInput)) {
throw new Error(`No version found for ${versionInput}`);
}
@@ -164,7 +168,10 @@ export async function resolveVersion(
}
const availableVersions = await getAvailableVersions(githubToken);
core.debug(`Available versions: ${availableVersions}`);
const resolvedVersion = maxSatisfying(availableVersions, version);
const resolvedVersion =
resolutionStrategy === "lowest"
? minSatisfying(availableVersions, version)
: maxSatisfying(availableVersions, version);
if (resolvedVersion === undefined) {
throw new Error(`No version found for ${version}`);
}
@@ -264,3 +271,24 @@ function maxSatisfying(
}
return undefined;
}
function minSatisfying(
versions: string[],
version: string,
): string | undefined {
// For semver, we need to use a different approach since tc.evaluateVersions only returns max
// Let's use semver directly for min satisfying
const minSemver = semver.minSatisfying(versions, version);
if (minSemver !== null) {
core.debug(`Found a version that satisfies the semver range: ${minSemver}`);
return minSemver;
}
const minPep440 = pep440.minSatisfying(versions, version);
if (minPep440 !== null) {
core.debug(
`Found a version that satisfies the pep440 specifier: ${minPep440}`,
);
return minPep440;
}
return undefined;
}

View File

@@ -10,8 +10,10 @@ import {
import { STATE_UV_PATH, STATE_UV_VERSION } from "./utils/constants";
import {
cacheLocalPath,
cachePython,
enableCache,
ignoreNothingToCache,
pythonDir,
pruneCache as shouldPruneCache,
saveCache as shouldSaveCache,
} from "./utils/inputs";
@@ -68,8 +70,21 @@ async function saveCache(): Promise<void> {
`Cache path ${actualCachePath} does not exist on disk. This likely indicates that there are no dependencies to cache. Consider disabling the cache input if it is not needed.`,
);
}
const cachePaths = [actualCachePath];
if (cachePython) {
core.info(`Including Python cache path: ${pythonDir}`);
if (!fs.existsSync(pythonDir) && !ignoreNothingToCache) {
throw new Error(
`Python cache path ${pythonDir} does not exist on disk. This likely indicates that there are no dependencies to cache. Consider disabling the cache input if it is not needed.`,
);
}
cachePaths.push(pythonDir);
}
core.info(`Final cache paths: ${cachePaths.join(", ")}`);
try {
await cache.saveCache([actualCachePath], cacheKey);
await cache.saveCache(cachePaths, cacheKey);
core.info(`cache saved with the key: ${cacheKey}`);
} catch (e) {
if (

View File

@@ -19,7 +19,9 @@ import {
githubToken,
ignoreEmptyWorkdir,
manifestFile,
pythonDir,
pythonVersion,
resolutionStrategy,
toolBinDir,
toolDir,
versionFile as versionFileInput,
@@ -51,6 +53,7 @@ async function run(): Promise<void> {
addToolBinToPath();
addUvToPathAndOutput(setupResult.uvDir);
setToolDir();
addPythonDirToPath();
setupPython();
await activateEnvironment();
addMatchers();
@@ -70,7 +73,7 @@ async function run(): Promise<void> {
}
function detectEmptyWorkdir(): void {
if (fs.readdirSync(".").length === 0) {
if (fs.readdirSync(workingDirectory).length === 0) {
if (ignoreEmptyWorkdir) {
core.info(
"Empty workdir detected. Ignoring because ignore-empty-workdir is enabled",
@@ -118,7 +121,12 @@ async function determineVersion(
manifestFile: string | undefined,
): Promise<string> {
if (versionInput !== "") {
return await resolveVersion(versionInput, manifestFile, githubToken);
return await resolveVersion(
versionInput,
manifestFile,
githubToken,
resolutionStrategy,
);
}
if (versionFileInput !== "") {
const versionFromFile = getUvVersionFromFile(versionFileInput);
@@ -127,7 +135,12 @@ async function determineVersion(
`Could not determine uv version from file: ${versionFileInput}`,
);
}
return await resolveVersion(versionFromFile, manifestFile, githubToken);
return await resolveVersion(
versionFromFile,
manifestFile,
githubToken,
resolutionStrategy,
);
}
const versionFromUvToml = getUvVersionFromFile(
`${workingDirectory}${path.sep}uv.toml`,
@@ -144,6 +157,7 @@ async function determineVersion(
versionFromUvToml || versionFromPyproject || "latest",
manifestFile,
githubToken,
resolutionStrategy,
);
}
@@ -194,6 +208,17 @@ function setToolDir(): void {
}
}
function addPythonDirToPath(): void {
core.exportVariable("UV_PYTHON_INSTALL_DIR", pythonDir);
core.info(`Set UV_PYTHON_INSTALL_DIR to ${pythonDir}`);
if (process.env.UV_NO_MODIFY_PATH !== undefined) {
core.info("UV_NO_MODIFY_PATH is set, not adding python dir to path");
} else {
core.addPath(pythonDir);
core.info(`Added ${pythonDir} to the path`);
}
}
function setupPython(): void {
if (pythonVersion !== "") {
core.exportVariable("UV_PYTHON", pythonVersion);
@@ -213,15 +238,14 @@ async function activateEnvironment(): Promise<void> {
core.info("Activating python venv...");
await exec.exec("uv", execArgs);
let venvBinPath = `${workingDirectory}${path.sep}.venv${path.sep}bin`;
const venvPath = path.resolve(`${workingDirectory}${path.sep}.venv`);
let venvBinPath = `${venvPath}${path.sep}bin`;
if (process.platform === "win32") {
venvBinPath = `${workingDirectory}${path.sep}.venv${path.sep}Scripts`;
venvBinPath = `${venvPath}${path.sep}Scripts`;
}
core.addPath(path.resolve(venvBinPath));
core.exportVariable(
"VIRTUAL_ENV",
path.resolve(`${workingDirectory}${path.sep}.venv`),
);
core.exportVariable("VIRTUAL_ENV", venvPath);
core.setOutput("venv", venvPath);
}
}

View File

@@ -15,16 +15,19 @@ export const cacheSuffix = core.getInput("cache-suffix") || "";
export const cacheLocalPath = getCacheLocalPath();
export const cacheDependencyGlob = getCacheDependencyGlob();
export const pruneCache = core.getInput("prune-cache") === "true";
export const cachePython = core.getInput("cache-python") === "true";
export const ignoreNothingToCache =
core.getInput("ignore-nothing-to-cache") === "true";
export const ignoreEmptyWorkdir =
core.getInput("ignore-empty-workdir") === "true";
export const toolBinDir = getToolBinDir();
export const toolDir = getToolDir();
export const pythonDir = getUvPythonDir();
export const githubToken = core.getInput("github-token");
export const manifestFile = getManifestFile();
export const addProblemMatchers =
core.getInput("add-problem-matchers") === "true";
export const resolutionStrategy = getResolutionStrategy();
function getVersionFile(): string {
const versionFileInput = core.getInput("version-file");
@@ -123,6 +126,28 @@ function getCacheDirFromConfig(): string | undefined {
return undefined;
}
export function getUvPythonDir(): string {
if (process.env.UV_PYTHON_INSTALL_DIR !== undefined) {
core.info(
`UV_PYTHON_INSTALL_DIR is already set to ${process.env.UV_PYTHON_INSTALL_DIR}`,
);
return process.env.UV_PYTHON_INSTALL_DIR;
}
if (process.env.RUNNER_ENVIRONMENT !== "github-hosted") {
if (process.platform === "win32") {
return `${process.env.APPDATA}${path.sep}uv${path.sep}python`;
} else {
return `${process.env.HOME}${path.sep}.local${path.sep}share${path.sep}uv${path.sep}python`;
}
}
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${path.sep}uv-python-dir`;
}
throw Error(
"Could not determine UV_PYTHON_INSTALL_DIR. Please make sure RUNNER_TEMP is set or provide the UV_PYTHON_INSTALL_DIR environment variable",
);
}
function getCacheDependencyGlob(): string {
const cacheDependencyGlobInput = core.getInput("cache-dependency-glob");
if (cacheDependencyGlobInput !== "") {
@@ -162,3 +187,16 @@ function getManifestFile(): string | undefined {
}
return undefined;
}
function getResolutionStrategy(): "highest" | "lowest" {
const resolutionStrategyInput = core.getInput("resolution-strategy");
if (resolutionStrategyInput === "lowest") {
return "lowest";
}
if (resolutionStrategyInput === "highest" || resolutionStrategyInput === "") {
return "highest";
}
throw new Error(
`Invalid resolution-strategy: ${resolutionStrategyInput}. Must be 'highest' or 'lowest'.`,
);
}

File diff suppressed because it is too large Load Diff