From d171ba17dc6809de44d96d06d9c3042899e751dd Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Wed, 24 Sep 2025 14:45:13 +0200 Subject: [PATCH 1/5] Bump python to 3.12 for build docs workflows --- .circleci/config.yml | 6 +++--- .github/workflows/build_and_deploy.yml | 6 +++--- .github/workflows/build_docs.yml | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d52870e20..634e450f0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,7 +34,7 @@ orbs: jobs: build-docs: docker: - - image: cimg/python:3.10.17 + - image: cimg/python:3.12.6 environment: XDG_CACHE_HOME: /home/circleci/.cache parameters: @@ -65,7 +65,7 @@ jobs: . .venv/bin/activate uv pip install -e "napari/[pyqt5,docs]" environment: - PIP_CONSTRAINT: napari/resources/constraints/constraints_py3.10_docs.txt + PIP_CONSTRAINT: napari/resources/constraints/constraints_py3.12_docs.txt - run: name: Build docs command: | @@ -73,7 +73,7 @@ jobs: cd docs xvfb-run --auto-servernum make << parameters.make_target >> environment: - PIP_CONSTRAINT: ../napari/resources/constraints/constraints_py3.10_docs.txt + PIP_CONSTRAINT: ../napari/resources/constraints/constraints_py3.12_docs.txt - store_artifacts: path: docs/docs/_build/html/ - save_cache: diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index f0ec9c613..24d8b6a0e 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -48,7 +48,7 @@ jobs: - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: - python-version: "3.10" + python-version: "3.12" cache-dependency-path: | napari/pyproject.toml @@ -68,7 +68,7 @@ jobs: python -m pip install --upgrade pip python -m pip install "napari/[pyqt5, docs]" env: - PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.10_docs.txt + PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.12_docs.txt - name: Testing run: | @@ -86,7 +86,7 @@ jobs: env: GOOGLE_CALENDAR_ID: ${{ secrets.GOOGLE_CALENDAR_ID }} GOOGLE_CALENDAR_API_KEY: ${{ secrets.GOOGLE_CALENDAR_API_KEY }} - PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.10_docs.txt + PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.12_docs.txt with: # Runs in '/home/runner/work/docs/docs/docs' # Built HTML pages in '/home/runner/work/docs/docs/docs/docs/_build/html' diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index 1888a8f26..71f1474aa 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -53,7 +53,7 @@ jobs: - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: - python-version: "3.10" + python-version: "3.12" cache-dependency-path: | napari/pyproject.toml @@ -73,7 +73,7 @@ jobs: python -m pip install --upgrade pip python -m pip install "napari/[pyqt5, docs]" env: - PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.10_docs.txt + PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.12_docs.txt - name: Check napari can be imported run: | @@ -85,7 +85,7 @@ jobs: env: GOOGLE_CALENDAR_ID: ${{ secrets.GOOGLE_CALENDAR_ID }} GOOGLE_CALENDAR_API_KEY: ${{ secrets.GOOGLE_CALENDAR_API_KEY }} - PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.10_docs.txt + PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.12_docs.txt with: run: make -C docs ${{ inputs.make_target || 'slimfast' }} # skipping setup stops the action from running the default (tiling) window manager From f4b4a3d6f4ea24cb7d8b21b5892e05f01d930fcd Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Wed, 24 Sep 2025 14:49:46 +0200 Subject: [PATCH 2/5] newer python --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 634e450f0..6b2107189 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,7 +34,7 @@ orbs: jobs: build-docs: docker: - - image: cimg/python:3.12.6 + - image: cimg/python:3.12.11 environment: XDG_CACHE_HOME: /home/circleci/.cache parameters: From 141001ce67e391e8021a73c7b1448aa1969274c8 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Wed, 24 Sep 2025 15:31:05 +0200 Subject: [PATCH 3/5] uplaod logs of failed builds --- .github/workflows/build_and_deploy.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 24d8b6a0e..20fabb4c2 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -103,6 +103,15 @@ jobs: name: html path: docs/docs/_build/html/ + - name: Upload logs + if: failure() + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + + with: + name: Upload Logs + path: | + /tmp/*.log + deploy: name: Download & Deploy Artifact needs: build-and-upload From 9d1e45490997fa576cb39d45f5a363bde2895595 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Wed, 24 Sep 2025 15:49:47 +0200 Subject: [PATCH 4/5] again upload logs --- .github/workflows/build_docs.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index 71f1474aa..864247ee5 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -101,3 +101,12 @@ jobs: with: name: docs path: docs/docs/_build/html + + - name: Upload logs + if: failure() + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + + with: + name: Upload Logs + path: | + /tmp/*.log From 1a9f4bcd4c6ec23a9e2a9d01f2733b4507d0e58a Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Wed, 24 Sep 2025 16:28:50 +0200 Subject: [PATCH 5/5] change setup of headless --- .github/workflows/build_and_deploy.yml | 17 ++++++----------- .github/workflows/build_docs.yml | 17 +++++++---------- 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 20fabb4c2..a7dd13ca7 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -61,7 +61,11 @@ jobs: ${{ github.workspace }}/.cache/pooch key: pooch - - uses: tlambert03/setup-qt-libs@19e4ef2d781d81f5f067182e228b54ec90d23b76 # v1.8 + - name: Setup headless display + uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2 + with: + qt: true + wm: herbstluftwm - name: Install Dependencies run: | @@ -82,20 +86,11 @@ jobs: make fallback-videos - name: Build Docs - uses: aganders3/headless-gui@f85dd6316993505dfc5f21839d520ae440c84816 # v2.2 + run: make -C docs html env: GOOGLE_CALENDAR_ID: ${{ secrets.GOOGLE_CALENDAR_ID }} GOOGLE_CALENDAR_API_KEY: ${{ secrets.GOOGLE_CALENDAR_API_KEY }} PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.12_docs.txt - with: - # Runs in '/home/runner/work/docs/docs/docs' - # Built HTML pages in '/home/runner/work/docs/docs/docs/docs/_build/html' - run: make -C docs html - # skipping setup stops the action from running the default (tiling) window manager - # the window manager is not necessary for docs builds at this time and it was causing - # problems with screenshots (https://github.com/napari/docs/issues/285) - linux-setup: "echo 'skip setup'" - linux-teardown: "echo 'skip teardown'" - name: Upload artifact uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index 864247ee5..3f85d0d88 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -66,7 +66,11 @@ jobs: ${{ github.workspace }}/.cache/pooch key: pooch - - uses: tlambert03/setup-qt-libs@19e4ef2d781d81f5f067182e228b54ec90d23b76 # v1.8 + - name: Setup headless display + uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2 + with: + qt: true + wm: herbstluftwm - name: Install Dependencies run: | @@ -81,18 +85,11 @@ jobs: python -c 'import napari.layers; print(napari.layers.__doc__)' - name: Build Docs - uses: aganders3/headless-gui@f85dd6316993505dfc5f21839d520ae440c84816 # v2.2 + run: make -C docs ${{ inputs.make_target || 'slimfast' }} env: GOOGLE_CALENDAR_ID: ${{ secrets.GOOGLE_CALENDAR_ID }} GOOGLE_CALENDAR_API_KEY: ${{ secrets.GOOGLE_CALENDAR_API_KEY }} PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.12_docs.txt - with: - run: make -C docs ${{ inputs.make_target || 'slimfast' }} - # skipping setup stops the action from running the default (tiling) window manager - # the window manager is not necessary for docs builds at this time and it was causing - # problems with screenshots (https://github.com/napari/docs/issues/285) - linux-setup: "echo 'skip setup'" - linux-teardown: "echo 'skip teardown'" - name: Upload artifact id: upload @@ -101,7 +98,7 @@ jobs: with: name: docs path: docs/docs/_build/html - + - name: Upload logs if: failure() uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2