SUPRIYA-351: Fix BinaryOpUGen shortcut #931
Workflow file for this run
This file contains 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: | |
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: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
cache: pip | |
cache-dependency-path: "**/pyproject.toml" | |
- name: Install APT deps | |
shell: bash | |
run: | | |
export DEBIAN_FRONTEND=noninteractive | |
sudo apt-get update --yes | |
sudo apt-get install --yes \ | |
espeak \ | |
ffmpeg \ | |
graphviz \ | |
lame | |
- name: Install SuperCollider | |
uses: ./.github/actions/supercollider | |
with: | |
branch: ${{ env.SC_BRANCH }} | |
origin: ${{ env.SC_ORIGIN }} | |
- name: Install Supriya | |
run: pip install -e .[docs] | |
- name: Build docs | |
run: make docs | |
lint: | |
name: Lint Supriya | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
cache: pip | |
cache-dependency-path: "**/pyproject.toml" | |
- name: Install Supriya | |
run: pip install -e .[ipython,test] | |
- name: Install docstrfmt | |
run: pip install https://github.com/josiah-wolf-oberholtzer/docstrfmt/archive/refs/heads/master.zip | |
- name: Run Black | |
run: make black-check | |
- name: Run docstrfmt | |
run: | | |
make docstrfmt || true | |
make docstrfmt || true | |
git status | |
git diff | |
- name: Run Flake8 | |
run: make flake8 | |
- name: Run Mypy | |
run: make mypy | |
package: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build wheels | |
uses: pypa/[email protected] | |
test: | |
name: Test Supriya | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [3.8, 3.9, "3.10", 3.11] | |
include: | |
- os: macos-latest | |
python-version: "3.11" | |
# - os: windows-latest | |
# python-version: "3.10" | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
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: Install SuperCollider (Non-Windows) | |
if: ${{ matrix.os != 'windows-latest' }} | |
uses: ./.github/actions/supercollider | |
with: | |
branch: ${{ env.SC_BRANCH }} | |
origin: ${{ env.SC_ORIGIN }} | |
- name: Install SuperCollider (Windows) | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
choco install supercollider | |
mkdir C:\Users\runneradmin\AppData\Local\SuperCollider\synthdefs | |
- name: Setup audio (Windows) # https://github.com/actions/runner-images/issues/2528#issuecomment-934857719 | |
if: ${{ matrix.os == 'windows-latest' }} | |
shell: powershell | |
run: | | |
Invoke-WebRequest https://github.com/duncanthrax/scream/releases/download/3.8/Scream3.8.zip -OutFile Scream3.8.zip | |
Expand-Archive -Path Scream3.8.zip -DestinationPath Scream | |
Import-Certificate -FilePath Scream\Install\driver\x64\Scream.cat -CertStoreLocation Cert:\LocalMachine\TrustedPublisher | |
Scream\Install\helpers\devcon-x64.exe install Scream\Install\driver\x64\Scream.inf *Scream | |
net start audiosrv | |
Get-CimInstance Win32_SoundDevice | fl * | |
timeout-minutes: 2 | |
- 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.utils._intervals import IntervalTreeDriverEx; print(IntervalTreeDriverEx)" | |
- name: Sanity-check Supriya SHM (Non-Windows) | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: python -c "from supriya.contexts.shm import ServerSHM; print(ServerSHM)" | |
- 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 | |
uses: FedericoCarboni/setup-ffmpeg@v2 | |
- 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 | |
elif [ "$RUNNER_OS" == "macOS" ]; then | |
brew install \ | |
graphviz | |
elif [ "$RUNNER_OS" == "Windows" ]; then | |
choco install \ | |
graphviz \ | |
lame | |
fi | |
- name: Run Pytest | |
run: pytest --cov supriya | |
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 ) |