From b5d7da8c96281e0790be9b6e5e8aa0720998cce3 Mon Sep 17 00:00:00 2001 From: cgeng Date: Wed, 5 Aug 2026 14:42:47 +0200 Subject: [PATCH 1/2] Fix CI caching; bump checkout/setup-python off Node.js 20 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two related CI bugs, both caused by stale GitHub Action version pins: 1. Dead uv caching: astral-sh/setup-uv's default cache-dependency-glob keys on uv.lock/requirements*.txt, neither of which exists here (no committed lockfile, by design), so caching never actually worked. This repo's setup-uv pin was already a SHA (3259c6206f993105e3a61b142c2d97bf4b9ef83d) that resolves to tag v7.1.0 — past the fix that matters here (v6.0.0 added pyproject.toml to the default glob) and past the Node 20 -> Node 24 runtime bump (v7.0.0). Bumping to v9.0.0 anyway, for consistency with the other repos in this cleanup. 2. Node.js 20 deprecation: actions/checkout and actions/setup-python bumped v4/v5 -> v7, clearing the "Node.js 20 is deprecated" warning. codecov/codecov-action bumped v4 -> v7; its v5 rewrite dropped the singular `file:` input in favor of `files:`, renamed accordingly. No actions/cache usage exists in this repo's workflows. Left `prune-cache` at its new default (off): audplot's dependency tree (audmath, audmetric, matplotlib, pandas, seaborn) has no large pre-built binary wheels like torch, so pruning would save ~0 disk space while costing avoidable re-downloads. Part of the same CI cleanup as audeering/audeer#206, audeering/opensmile-python#132, audeering/audb#591, audeering/audformat#539, audeering/audbackend#307, audeering/audresample#83, audeering/auglib#60, audeering/audonnx#115, audeering/audinterface#206, audeering/audiofile#193, audeering/audmath#76, audeering/audmetric#94, audeering/audmodel#63, and audeering/audobject#127. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/doc.yml | 6 +++--- .github/workflows/linter.yml | 6 +++--- .github/workflows/publish.yml | 6 +++--- .github/workflows/test.yml | 10 +++++----- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 575d2b1..4554119 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -16,10 +16,10 @@ jobs: python-version: [ '3.12' ] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} @@ -29,7 +29,7 @@ jobs: sudo apt-get install --no-install-recommends --yes libsndfile1 - name: Install uv - uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d + uses: astral-sh/setup-uv@v9.0.0 - name: Install package run: | diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index ef5b4ae..3eb3005 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -12,15 +12,15 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v7 with: python-version: '3.12' - name: Install uv - uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d + uses: astral-sh/setup-uv@v9.0.0 - name: Install pre-commit hooks run: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2ae77ae..da8ffac 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,12 +16,12 @@ jobs: group: ${{ github.workflow }}-${{ github.ref }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: fetch-depth: 2 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v7 with: python-version: '3.12' @@ -31,7 +31,7 @@ jobs: sudo apt-get -y install libsndfile1 - name: Install uv - uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d + uses: astral-sh/setup-uv@v9.0.0 # PyPI package - name: Build Python package diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 31675c7..e050e4e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,9 +16,9 @@ jobs: python-version: [ '3.10', '3.11', '3.12', '3.13', '3.14' ] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} - name: Setup Ubuntu @@ -27,7 +27,7 @@ jobs: sudo apt-get -y install libsndfile1 if: matrix.os == 'ubuntu-latest' - name: Install uv - uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d + uses: astral-sh/setup-uv@v9.0.0 - name: Install package run: | uv sync @@ -43,8 +43,8 @@ jobs: # https://github.com/actions/runner-images/issues/7776 MPLBACKEND: Agg - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v7 with: token: ${{ secrets.CODECOV_TOKEN }} - file: ./coverage.xml + files: ./coverage.xml if: matrix.os == 'ubuntu-latest' From cae78bca97d4ccbd0ba06704950166622bfc8461 Mon Sep 17 00:00:00 2001 From: cgeng Date: Wed, 5 Aug 2026 14:54:48 +0200 Subject: [PATCH 2/2] Give each workflow its own uv cache to stop reservation races Documentation, Linter, Test, and Publish jobs sometimes land on an identical setup-uv cache key (same OS + Python version + dependency-file hash), so whichever job finishes first saves the cache and the others get "Failed to save: Unable to reserve cache with key ..., another job may be creating this cache." Harmless -- the losing job's save would have been byte-identical anyway -- but requested clean, warning-free CI across the board. Added `cache-suffix: ${{ github.workflow }}` to every setup-uv step, so each workflow gets its own cache entry instead of racing to share one. Trade-off: workflows no longer share a warm cache with each other, so each pays its own first-run cost independently instead of one job seeding it for the rest. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/doc.yml | 2 ++ .github/workflows/linter.yml | 2 ++ .github/workflows/publish.yml | 2 ++ .github/workflows/test.yml | 2 ++ 4 files changed, 8 insertions(+) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 4554119..3b1852c 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -30,6 +30,8 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v9.0.0 + with: + cache-suffix: ${{ github.workflow }} - name: Install package run: | diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 3eb3005..b8b0520 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -21,6 +21,8 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v9.0.0 + with: + cache-suffix: ${{ github.workflow }} - name: Install pre-commit hooks run: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index da8ffac..3943ad8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -32,6 +32,8 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v9.0.0 + with: + cache-suffix: ${{ github.workflow }} # PyPI package - name: Build Python package diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e050e4e..b17ac16 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,6 +28,8 @@ jobs: if: matrix.os == 'ubuntu-latest' - name: Install uv uses: astral-sh/setup-uv@v9.0.0 + with: + cache-suffix: ${{ github.workflow }} - name: Install package run: | uv sync