Scale and harden continuous audio acquisition pipeline #85
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| pull_request: | |
| env: | |
| CACHE_NUMBER: 0 | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install system media libraries | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends ffmpeg | |
| - uses: mamba-org/setup-micromamba@v3 | |
| with: | |
| environment-name: sam-audio | |
| init-shell: bash | |
| create-args: >- | |
| python=3.14 | |
| uv | |
| - uses: actions/cache@v5 | |
| with: | |
| path: /home/runner/micromamba/envs/sam-audio | |
| key: ${{ hashFiles('pyproject.toml', 'pylock.toml') }}-${{ env.CACHE_NUMBER }} | |
| id: cache | |
| - name: Update environment | |
| shell: bash -l {0} | |
| run: | | |
| uv pip sync pylock.toml --group dev --torch-backend cu129 --strict | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| - name: Configure CUDA runtime library path | |
| shell: bash -l {0} | |
| run: | | |
| echo "LD_LIBRARY_PATH=${CONDA_PREFIX}/lib/python3.14/site-packages/nvidia/cu13/lib:${LD_LIBRARY_PATH}" >> "$GITHUB_ENV" | |
| - name: Import smoke test | |
| shell: bash -l {0} | |
| run: | | |
| python - <<'PY' | |
| import sam_audio | |
| from sam_audio import SAMAudio, SAMAudioProcessor | |
| from torchcodec.decoders import AudioDecoder | |
| from transformers import ModernBertConfig | |
| print("sam_audio", sam_audio.__version__ if hasattr(sam_audio, "__version__") else "imported") | |
| print(SAMAudio.__name__, SAMAudioProcessor.__name__, AudioDecoder.__name__, ModernBertConfig.__name__) | |
| PY | |
| - name: Check formatting | |
| shell: bash -l {0} | |
| run: | | |
| ruff format --check . | |
| - name: Lint | |
| shell: bash -l {0} | |
| run: | | |
| ruff check . |