Implement Sessions #2067
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: Test | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "0 0 * * 0" | |
env: | |
PYNPUT_BACKEND: dummy | |
SC_ORIGIN: https://github.com/supercollider/supercollider.git | |
SC_BRANCH: develop | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
docs: | |
name: Build docs | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.13"] | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
cache-dependency-path: "**/pyproject.toml" | |
- name: Install APT deps | |
shell: bash | |
run: | | |
sudo apt-get update --yes | |
sudo apt-get install --yes \ | |
espeak \ | |
ffmpeg \ | |
graphviz \ | |
lame \ | |
libasound2-dev | |
- name: Setup audio | |
timeout-minutes: 3 | |
uses: ./.github/actions/setup-audio | |
- name: Install SuperCollider | |
uses: ./.github/actions/build-supercollider | |
with: | |
branch: ${{ env.SC_BRANCH }} | |
origin: ${{ env.SC_ORIGIN }} | |
- name: Install Supriya | |
run: pip install -e .[docs] | |
- name: Build docs | |
run: make docs | |
- name: Check for FailWarning | |
run: "! grep -R ': FailWarning: ' *" | |
working-directory: docs/build/html | |
- name: Link check | |
run: make linkcheck | |
working-directory: docs | |
lint: | |
name: Lint Supriya | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
cache-dependency-path: "**/pyproject.toml" | |
- name: Install Supriya | |
run: pip install -e .[test] | |
- name: Run Ruff format checker | |
run: make ruff-format | |
- name: Run Ruff imports checker | |
run: make ruff-imports | |
- name: Run Ruff lint checker | |
run: make ruff-lint | |
- name: Run Mypy | |
run: make mypy | |
package: | |
name: Build wheels | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- {os: macos-15, arch: "arm64,x86_64", build: "cp3{10,11,12,13}-*"} | |
- {os: ubuntu-24.04, arch: auto, build: "cp3{10,11,12,13}-manylinux*"} | |
- {os: ubuntu-24.04, arch: auto, build: "cp3{10,11,12,13}-musllinux*"} | |
- {os: ubuntu-24.04-arm, arch: auto, build: "cp3{10,11,12,13}-manylinux*"} | |
- {os: ubuntu-24.04-arm, arch: auto, build: "cp3{10,11,12,13}-musllinux*"} | |
- {os: windows-latest, arch: AMD64, build: "cp3{10,11,12,13}-*"} | |
- {os: windows-latest, arch: ARM64, build: "cp3{10,11,12,13}-*"} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build wheels | |
env: | |
CIBW_ARCHS: ${{ matrix.arch }} | |
CIBW_BUILD: ${{ matrix.build }} | |
uses: pypa/cibuildwheel@v3.1.3 | |
test: | |
name: Test Supriya | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.10", "3.11", "3.12", "3.13"] | |
include: | |
- {os: macos-15, python-version: "3.13"} | |
- {os: windows-latest, python-version: "3.13"} | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
cache-dependency-path: "**/pyproject.toml" | |
- name: Upgrade pip | |
run: python3 -m pip install -U pip | |
- name: Install Supriya | |
run: pip install -e . | |
- name: Setup audio | |
timeout-minutes: 3 | |
uses: ./.github/actions/setup-audio | |
- name: Build SuperCollider | |
uses: ./.github/actions/build-supercollider | |
with: | |
branch: ${{ env.SC_BRANCH }} | |
origin: ${{ env.SC_ORIGIN }} | |
- name: Sanity-check Supriya | |
run: | | |
python -c "import logging, supriya; logging.getLogger('supriya').setLevel(logging.INFO); logging.basicConfig(); server = supriya.Server().boot(); exit()" | |
python -c "from supriya.contexts.shm import ServerSHM; print(ServerSHM)" | |
timeout-minutes: 1 | |
- name: Check for stray processes (Non-Windows) | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: | | |
! ( ps aux | grep scsynth | grep -v grep ) | |
! ( ps aux | grep supernova | grep -v grep ) | |
- name: Install Supriya test dependencies | |
run: pip install -e .[test] | |
- name: Install ffmpeg | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
sudo apt-get install --yes ffmpeg | |
elif [ "$RUNNER_OS" == "macOS" ]; then | |
brew install ffmpeg | |
elif [ "$RUNNER_OS" == "Windows" ]; then | |
choco install ffmpeg | |
fi | |
shell: bash | |
- name: Install additional packages | |
shell: bash | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
export DEBIAN_FRONTEND=noninteractive | |
sudo apt-get update --yes | |
sudo apt-get install --yes espeak graphviz lame libasound2-dev | |
elif [ "$RUNNER_OS" == "macOS" ]; then | |
brew update | |
brew install python@3.13 || true | |
brew install graphviz | |
elif [ "$RUNNER_OS" == "Windows" ]; then | |
choco install graphviz lame | |
fi | |
- name: Run Pytest | |
run: pytest --cov supriya --showlocals | |
timeout-minutes: 15 | |
- name: Check for stray processes (Non-Windows) | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: | | |
! ( ps aux | grep scsynth | grep -v grep ) | |
! ( ps aux | grep supernova | grep -v grep ) |