From 21b1f4e6df7c4349e3149792fde8911164d8202d Mon Sep 17 00:00:00 2001 From: Heewon Oh Date: Tue, 3 Nov 2026 00:59:52 +0900 Subject: [PATCH 1/3] 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 6b13cbb6987e74e42bdee531bfa3005dd9817dc5 Mon Sep 17 00:00:00 2001 From: Heewon Oh Date: Tue, 3 Nov 2026 01:02:59 +0900 Subject: [PATCH 2/3] 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 4b7685c5bf14b81acedbae9519c9e16f217dc2f1 Mon Sep 17 00:00:00 2001 From: Heewon Oh Date: Tue, 3 Nov 2026 01:14:40 +0900 Subject: [PATCH 3/3] 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