From 3f6f7cc00dbc43b74349a3de37df004179a72e4e Mon Sep 17 00:00:00 2001 From: cgeng Date: Wed, 5 Aug 2026 13:46:05 +0200 Subject: [PATCH 1/2] Bump CI action versions off Node.js 20, fix Codecov key, prune uv cache actions/checkout and actions/setup-python still ran on the deprecated Node.js 20 runtime; bump them to v7. Bump astral-sh/setup-uv to v9.0.0 and codecov/codecov-action to v7, which requires the renamed `files:` key in place of the removed `file:`. Also explicitly set `prune-cache: true` under every setup-uv step. setup-uv v9.0.0 flipped this default from true to false. Unlike the sibling repos in this CI cleanup (audeer#206, opensmile-python#132, audb#591, audformat#539, audbackend#307, audresample#83), which deliberately kept the new false default because none of them pull in large binary wheels, audonnx's dev dependency group includes torch directly (for onnx-export doctests), dragging in the full CUDA wheel stack (nvidia-cublas, nvidia-cuda-nvrtc, nvidia-cufft, etc). Per the org's setup-uv#967 benchmark reasoning, pruning pays off precisely for dependency trees this large. Setting it explicitly also avoids a silent regression: the previous pin (v5) already defaulted to prune-cache: true, so this preserves existing behavior rather than flipping it off as a side effect of the version bump. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/doc.yml | 8 +++++--- .github/workflows/linter.yml | 8 +++++--- .github/workflows/onnxruntime.yml | 8 +++++--- .github/workflows/publish.yml | 8 +++++--- .github/workflows/test.yml | 12 +++++++----- 5 files changed, 27 insertions(+), 17 deletions(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 71b06f8..2bcc5dc 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -16,15 +16,17 @@ jobs: python-version: [ '3.10' ] 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 + with: + prune-cache: true - name: Ubuntu - install libsndfile run: | diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 3185a88..4eacd1f 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -12,15 +12,17 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Set up Python 3.12 - 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 + with: + prune-cache: true - name: Install pre-commit hooks run: uvx pre-commit install --install-hooks diff --git a/.github/workflows/onnxruntime.yml b/.github/workflows/onnxruntime.yml index 87149a5..873f3d0 100644 --- a/.github/workflows/onnxruntime.yml +++ b/.github/workflows/onnxruntime.yml @@ -17,15 +17,17 @@ jobs: python-version: [ '3.10' ] 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 + with: + prune-cache: true - name: Prepare Ubuntu run: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6102ba2..26fff5a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,17 +16,19 @@ 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.10' - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@v9.0.0 + with: + prune-cache: true # PyPI package diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 80ec31a..97a5274 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,15 +25,17 @@ jobs: python-version: '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 + with: + prune-cache: true - name: Prepare Ubuntu run: | @@ -48,8 +50,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 1afb33a95048e4bb8118be00f41bde831501388b Mon Sep 17 00:00:00 2001 From: cgeng Date: Wed, 5 Aug 2026 14:54:47 +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 | 1 + .github/workflows/linter.yml | 1 + .github/workflows/onnxruntime.yml | 1 + .github/workflows/publish.yml | 1 + .github/workflows/test.yml | 1 + 5 files changed, 5 insertions(+) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 2bcc5dc..97369ed 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -26,6 +26,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v9.0.0 with: + cache-suffix: ${{ github.workflow }} prune-cache: true - name: Ubuntu - install libsndfile diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 4eacd1f..2485c2c 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -22,6 +22,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v9.0.0 with: + cache-suffix: ${{ github.workflow }} prune-cache: true - name: Install pre-commit hooks diff --git a/.github/workflows/onnxruntime.yml b/.github/workflows/onnxruntime.yml index 873f3d0..901e293 100644 --- a/.github/workflows/onnxruntime.yml +++ b/.github/workflows/onnxruntime.yml @@ -27,6 +27,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v9.0.0 with: + cache-suffix: ${{ github.workflow }} prune-cache: true - name: Prepare Ubuntu diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 26fff5a..1e3404b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -28,6 +28,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v9.0.0 with: + cache-suffix: ${{ github.workflow }} prune-cache: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 97a5274..82b9cf9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,6 +35,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v9.0.0 with: + cache-suffix: ${{ github.workflow }} prune-cache: true - name: Prepare Ubuntu