From 9fd091126766a4cab7d58b7888bfae2cd5e40ab6 Mon Sep 17 00:00:00 2001 From: Heewon Oh Date: Tue, 3 Nov 2026 00:59:52 +0900 Subject: [PATCH 1/4] ci: add CPU fast-suite workflow on push and pull_request GitHub Actions job on ubuntu-24.04 with Python 3.12, ffmpeg and libsndfile1. Installs CPU-only torch/torchaudio, then the package with a new [test] extra (pytest, librosa, onnx), and runs pytest -m "not slow". Assumptions: - push is limited to main; pull_request covers branch review, so PR branches are not tested twice. - librosa and onnx go in a test extra rather than core dependencies: they are needed only by v1.2 diagnostic modules and their tests, not by the runner. - Verified in a clean Python 3.12 venv with only these installs: 325 passed, 4 skipped. --- .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 2 ++ 2 files changed, 43 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..de3542e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +# Fast test suite on CPU. Slow tests (network, model weights, inference) are excluded. +name: CI + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + fast-tests: + runs-on: ubuntu-24.04 + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: pip + cache-dependency-path: pyproject.toml + + - name: Install system audio libraries + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends ffmpeg libsndfile1 + + - name: Install package (CPU-only torch) + run: | + python -m pip install --upgrade pip + python -m pip install torch torchaudio --index-url https://download.pytorch.org/whl/cpu + python -m pip install -e ".[test]" + + - name: Run fast test suite + run: python -m pytest -m "not slow" -q -p no:cacheprovider diff --git a/pyproject.toml b/pyproject.toml index d98b65d..5cf4b18 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,6 +33,8 @@ dependencies = [ ] [project.optional-dependencies] +# Fast-suite (pytest -m "not slow") dependencies, used by CI. +test = ["pytest>=8", "librosa>=0.10", "onnx>=1.16"] clam = ["transformers>=4.40"] spectttra = [ "sonics @ git+https://github.com/awsaf49/sonics.git@9156ffad151f797c71556923c4a02fa01fa8fc91", From 9d0b25f2a470d985b2722d2b883f008988e2f2f8 Mon Sep 17 00:00:00 2001 From: Heewon Oh Date: Tue, 3 Nov 2026 01:02:59 +0900 Subject: [PATCH 2/4] ci: install libchromaprint-tools so validate_audio finds fpcalc PR #3 CI failed one test: tests/test_v12_audio.py::test_validator_reads_real_pcm raised FileNotFoundError for 'fpcalc'. artifactbench/v12/validate_audio.py shells out to fpcalc for Chromaprint fingerprints; on Ubuntu it ships in libchromaprint-tools. Assumption: install the tool rather than skip the test, since the validator genuinely requires fpcalc. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de3542e..caba9b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,10 +26,10 @@ jobs: cache: pip cache-dependency-path: pyproject.toml - - name: Install system audio libraries + - name: Install system audio libraries (fpcalc comes from libchromaprint-tools) run: | sudo apt-get update - sudo apt-get install -y --no-install-recommends ffmpeg libsndfile1 + sudo apt-get install -y --no-install-recommends ffmpeg libsndfile1 libchromaprint-tools - name: Install package (CPU-only torch) run: | From 81fd38a5da3022cd88e24f11b674f3fa4131af1d Mon Sep 17 00:00:00 2001 From: Heewon Oh Date: Tue, 3 Nov 2026 01:14:40 +0900 Subject: [PATCH 3/4] ci: make apt step non-interactive and bounded Run 41477730145 sat in the apt install step for over 10 minutes (the earlier run finished it in under a minute). Pass DEBIAN_FRONTEND=noninteractive to apt-get explicitly and cap the step at 10 minutes so a hang fails fast. Assumption: the stall was an interactive prompt or slow mirror, not a missing package; libchromaprint-tools exists in Ubuntu 24.04 universe. --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index caba9b5..6f13513 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,9 @@ jobs: cache-dependency-path: pyproject.toml - name: Install system audio libraries (fpcalc comes from libchromaprint-tools) + timeout-minutes: 10 + env: + DEBIAN_FRONTEND: noninteractive run: | sudo apt-get update sudo apt-get install -y --no-install-recommends ffmpeg libsndfile1 libchromaprint-tools From f66b72975302f154b751eb28cd830dd690cd872b Mon Sep 17 00:00:00 2001 From: Heewon Oh Date: Tue, 3 Nov 2026 01:25:06 +0900 Subject: [PATCH 4/4] ci: check documentation links and CLI flags after the fast suite Runs scripts/check_docs.py (merged in #5) in CI so README/docs commands and relative links stay in sync with the code. Context: this branch re-delivers the CI workflow from PRs #3/#4 (cherry-picked 21b1f4e, 6b13cbb, 4b7685c onto origin/main) because ci.yml never reached main. Assumption: check_docs runs after the suite, in the same job, since it needs the installed package to run each documented program's --help. --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f13513..4fbef24 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,3 +42,6 @@ jobs: - name: Run fast test suite run: python -m pytest -m "not slow" -q -p no:cacheprovider + + - name: Check documentation links and CLI flags + run: python scripts/check_docs.py