Install uv in CI using a GitHub Action

The Action has a couple of advantages over pipx:

- It verifies the checksum of the downloaded binary
- It caches the installed uv
- It caches UV's own package cache
This commit is contained in:
Oliver Hamlet
2025-10-09 18:20:02 +01:00
parent 68fae38aad
commit 239266a1be
2 changed files with 10 additions and 3 deletions
+5 -2
View File
@@ -219,12 +219,16 @@ jobs:
working-directory: cpp
run: ctest --test-dir build --build-config ${{ env.CMAKE_CONFIG }} --output-on-failure --parallel
- name: Install uv
uses: astral-sh/setup-uv@eb1897b8dc4b5d5bfe39a428a8f2304605e0983c # v7.0.0
with:
version: "0.8.20"
- name: Install packages for building docs (Linux)
working-directory: docs
run: |
sudo apt-get update
sudo apt-get install -y --no-upgrade doxygen
pipx install uv
uv sync --locked
if: runner.os == 'Linux'
@@ -243,7 +247,6 @@ jobs:
echo "${{ github.workspace }}\doxygen-1.13.2.windows.x64.bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
pipx install uv
uv sync --locked
if: runner.os == 'Windows'
+5 -1
View File
@@ -81,6 +81,11 @@ jobs:
with:
python-version: '3.13'
- name: Install uv
uses: astral-sh/setup-uv@eb1897b8dc4b5d5bfe39a428a8f2304605e0983c # v7.0.0
with:
version: "0.8.20"
- name: Install packages for building docs
working-directory: docs
run: |
@@ -96,7 +101,6 @@ jobs:
echo "${{ github.workspace }}\doxygen-1.13.2.windows.x64.bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
pipx install uv
uv sync --locked
- name: Build docs