From bb654c741f7911a13d86d33bedd8076d1e76f4db Mon Sep 17 00:00:00 2001 From: cgeng Date: Wed, 5 Aug 2026 14:14:10 +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 from the floating tag 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. v7.0.0 also carries the Node 20 -> Node 24 runtime bump. Also bumped actions/checkout and actions/setup-python from v4/v5 to v7, and codecov/codecov-action from v4 to v7, 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. No actions/cache usage exists in this repo's workflows. Left `prune-cache` at its new default (off): audmath's only runtime dependency is numpy, with no large pre-built binary wheels like torch, so pruning would save ~0 disk space while costing avoidable re-downloads. Same 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, and audeering/audiofile#193. 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 a2915c6..9a05424 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 run: uv run python -m sphinx docs/ docs/_build/ -b html -W 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 bc86a8a..f365a75 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,12 +17,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' @@ -32,7 +32,7 @@ jobs: node-version: '16.0' - name: Install uv - uses: astral-sh/setup-uv@v5 + 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 58d309c..b76c3df 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,15 +17,15 @@ jobs: 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: Sync Python environment run: uv sync @@ -34,8 +34,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 cebf89c7a5176abb9d6ad94e74422e3214b40e32 Mon Sep 17 00:00:00 2001 From: cgeng Date: Wed, 5 Aug 2026 14:54:38 +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 9a05424..a295743 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 run: uv run python -m sphinx docs/ docs/_build/ -b html -W 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 f365a75..679990c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -33,6 +33,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 b76c3df..e5f3747 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,6 +26,8 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v9.0.0 + with: + cache-suffix: ${{ github.workflow }} - name: Sync Python environment run: uv sync