From 9cfa5b231f0552e8a042671879825b23b694121f Mon Sep 17 00:00:00 2001 From: cgeng Date: Wed, 5 Aug 2026 13:07:20 +0200 Subject: [PATCH 1/2] Fix CI caching; bump checkout/setup-python off Node.js 20 setup-uv's cache keys on uv.lock/requirements*.txt, neither of which exists here (no committed lockfile, by design), so caching never actually worked. Bumped astral-sh/setup-uv v5 -> v9.0.0: v6.0.0 added pyproject.toml to the default glob, which is committed and changes exactly when a dependency does -- so caching now works with no lockfile needed. Also bumped actions/checkout and actions/setup-python to v7 (every occurrence, including both in publish.yml's build and deploy jobs), and codecov/codecov-action to v7 in test.yml, clearing the "Node.js 20 is deprecated" warning entirely. codecov-action's v5 rewrite dropped the `file` input this workflow used; renamed to `files`, its replacement. Left `prune-cache` at its new default (off): audresample's only runtime dependency is numpy, and its dev dependency group (audiofile, audeer, matplotlib, pytest, sphinx, etc.) has no large pre-built wheels like torch, so pruning would save ~0 disk space while costing avoidable re-downloads on every run. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/doc.yml | 6 +++--- .github/workflows/linter.yml | 6 +++--- .github/workflows/publish.yml | 12 ++++++------ .github/workflows/test.yml | 10 +++++----- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 3907084..f2a5a61 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -16,15 +16,15 @@ 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 }} - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@v9.0.0 - name: Test building documentation diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index a6fe6ce..61fe15b 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@v5 + uses: astral-sh/setup-uv@v9.0.0 - name: Install pre-commit hooks run: uvx pre-commit install --install-hooks diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1e6af9d..121a920 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -24,18 +24,18 @@ jobs: - win_amd64 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 # Need more than a shallow clone to get version from tags with: fetch-depth: 2 - 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@v5 + uses: astral-sh/setup-uv@v9.0.0 - name: Build wheels @@ -64,7 +64,7 @@ jobs: steps: - name: Clone repository - uses: actions/checkout@v4 + uses: actions/checkout@v7 # Need depth to get diff for changelog with: fetch-depth: 1 @@ -77,7 +77,7 @@ jobs: merge-multiple: true - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v7 with: python-version: '3.10' @@ -89,7 +89,7 @@ jobs: # Documentation - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@v9.0.0 - name: Build documentation run: uv run python -m sphinx docs/ docs/_build/ -b html diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d8b039c..c769428 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,15 +16,15 @@ 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: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@v9.0.0 - name: Prepare Ubuntu run: | @@ -42,8 +42,8 @@ jobs: run: uv run pytest - 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 3d007a36e75143a5b306c1747e1cc2a0e122c41b Mon Sep 17 00:00:00 2001 From: cgeng Date: Wed, 5 Aug 2026 14:55:37 +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 | 4 ++++ .github/workflows/test.yml | 2 ++ 4 files changed, 10 insertions(+) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index f2a5a61..4f5afa0 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -25,6 +25,8 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v9.0.0 + with: + cache-suffix: ${{ github.workflow }} - name: Test building documentation diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 61fe15b..3ced089 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: uvx pre-commit install --install-hooks diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 121a920..f48fdf3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -36,6 +36,8 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v9.0.0 + with: + cache-suffix: ${{ github.workflow }} - name: Build wheels @@ -90,6 +92,8 @@ jobs: # Documentation - name: Install uv uses: astral-sh/setup-uv@v9.0.0 + with: + cache-suffix: ${{ github.workflow }} - name: Build documentation run: uv run python -m sphinx docs/ docs/_build/ -b html diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c769428..adcf6c6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,6 +25,8 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v9.0.0 + with: + cache-suffix: ${{ github.workflow }} - name: Prepare Ubuntu run: |