-
Notifications
You must be signed in to change notification settings - Fork 56
66 lines (66 loc) · 2.3 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: ci
on: [pull_request, push]
jobs:
codespell_and_ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pip install --user codespell[toml] ruff
- run: codespell **/*.py **/*.txt --skip="venv/lib/python3*"
- run: ruff check --output-format=github --target-version=py38 .
ci:
strategy:
fail-fast: false
max-parallel: 4
matrix: # macos-13 in Intel, macos-14 is Apple Silicon ARM
os: [macos-13, macos-14, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: {python-version: 3.x}
- name: Dump runner context
env:
RUNNER_CONTEXT: ${{ toJson(runner) }}
run: echo "$RUNNER_CONTEXT"
- if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install fluidsynth python3-pyaudio portaudio19-dev libasound-dev
- if: runner.os == 'macOS'
run: |
brew install fluid-synth
echo "DYLD_LIBRARY_PATH=$(brew --prefix fluid-synth)/lib/" >> $GITHUB_ENV
- if: runner.os == 'Windows'
run: choco install fluidsynth
- run: pip install --upgrade pip
- run: pip install pyaudio
- run: pip install --editable .
- shell: python
run: |
import fluidsynth
print(fluidsynth)
print(dir(fluidsynth))
# NOTE: The files in test/ are NOT unittests or pytests.
# On macOS ARM64 the following tests will pass but each takes 8 minutes to run.
# On macOS X64 all tests will pass quickly.
- if: runner.os == 'macOS' && runner.arch == 'X64'
run: |
python test/test1.py
python test/test2.py
python test/test3.py
python test/sequencerTest.py
# On Linux test2.py will fail even with xvfb-run but the other tests will pass quickly.
- if: runner.os == 'Linux'
run: |
python test/test1.py
# xvfb-run python test/test2.py
python test/test3.py
python test/sequencerTest.py
# On Windows all tests will pass quickly.
- if: runner.os == 'Windows'
run: |
python test/test1.py
python test/test2.py
python test/test3.py
python test/sequencerTest.py