Use uv to manage docs Python dependencies

It doesn't make much of a difference to performance in CI, as the docs
dependencies install time is dominated by getting Doxygen, but uv's use
of a lockfile does make builds more reliable.
This commit is contained in:
Oliver Hamlet
2025-05-11 21:24:28 +01:00
parent 557f859b40
commit 03ec3e91d5
7 changed files with 495 additions and 21 deletions
+8 -6
View File
@@ -176,24 +176,26 @@ jobs:
run: ctest --test-dir build --build-config ${{ env.CMAKE_CONFIG }} --output-on-failure --parallel
- name: Install packages for building docs (Linux)
working-directory: cpp
working-directory: cpp/docs
run: |
sudo apt-get update
sudo apt-get install -y --no-upgrade doxygen
pip3 install --user -r docs/requirements.txt
pipx install uv
uv sync
if: runner.os == 'Linux'
- name: Install packages for building docs (Windows)
working-directory: cpp
working-directory: cpp/docs
run: |
nuget install doxygen -Version 1.8.14
echo "${{ github.workspace }}\Doxygen.1.8.14\tools" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
python -m pip install -r docs/requirements.txt
pipx install uv
uv sync
if: runner.os == 'Windows'
- name: Build docs
working-directory: cpp
run: sphinx-build -b html docs build/docs/html
working-directory: cpp/docs
run: uv run -- sphinx-build -b html . ../build/docs/html
- name: Package the C++ wrapper
working-directory: cpp/build
+4 -3
View File
@@ -87,15 +87,16 @@ jobs:
python-version: '3.13'
- name: Install packages for building docs
working-directory: cpp
working-directory: cpp/docs
run: |
nuget install doxygen -Version 1.8.14
echo "${{ github.workspace }}\Doxygen.1.8.14\tools" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
python -m pip install -r docs/requirements.txt
pipx install uv
uv sync
- name: Build docs
working-directory: cpp
run: sphinx-build -b html docs build\docs\html
run: uv run -- sphinx-build -b html . ../build/docs/html
- name: Build archive
id: build-archive