From 239266a1bebf844acfdc7773bb037d15e631bd8d Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Thu, 9 Oct 2025 18:10:57 +0100 Subject: [PATCH] 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 --- .github/workflows/ci.yml | 7 +++++-- .github/workflows/release.yml | 6 +++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5aa7d61b..f5ef20fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bc3f4ba0..26ac6c36 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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