Skip to content

Commit 2ea7064

Browse files
committed
CI: switch from Travis-CI to Github Actions
1 parent 3412f95 commit 2ea7064

4 files changed

Lines changed: 98 additions & 31 deletions

File tree

.github/workflows/docs.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build docs and check links
2+
on: [push, pull_request]
3+
jobs:
4+
docs-linkcheck:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Install pandoc
8+
run: |
9+
sudo apt-get install --no-install-recommends pandoc
10+
- name: Set up Python
11+
uses: actions/setup-python@v2
12+
with:
13+
python-version: 3.9
14+
- name: Double-check Python version
15+
run: |
16+
python --version
17+
- name: Clone Git repository (without depth limitation)
18+
uses: actions/checkout@v2
19+
with:
20+
fetch-depth: 0
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install -r doc/requirements.txt
24+
- name: Build HTML
25+
run: |
26+
python -m sphinx -W --keep-going --color -d _build/doctrees/ doc/ _build/html/ -b html
27+
- name: Check links
28+
run: |
29+
python -m sphinx -W --keep-going --color -d _build/doctrees/ doc/ _build/linkcheck/ -b linkcheck
30+
- name: Upload linkcheck results
31+
uses: actions/upload-artifact@v2
32+
if: ${{ success() || failure() }}
33+
with:
34+
name: linkcheck
35+
path: _build/linkcheck/output.*
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Test with different Python versions
2+
on: [push, pull_request]
3+
jobs:
4+
python:
5+
strategy:
6+
matrix:
7+
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", pypy3]
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Install PortAudio
11+
run: |
12+
sudo apt-get install --no-install-recommends libportaudio2
13+
- name: Set up Python ${{ matrix.python-version }}
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: ${{ matrix.python-version }}
17+
- name: Double-check Python version
18+
run: |
19+
python --version
20+
- name: Clone Git repository
21+
uses: actions/checkout@v2
22+
with:
23+
path: git-repo
24+
- name: Install Python package
25+
working-directory: git-repo
26+
run: |
27+
python -m pip install .
28+
- name: Run tests
29+
run: |
30+
python -m sounddevice
31+
python -c "import sounddevice as sd; print(sd._libname)"
32+
python -c "import sounddevice as sd; print(sd.get_portaudio_version())"
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test PortAudio binaries
2+
on: [push, pull_request]
3+
jobs:
4+
binaries:
5+
strategy:
6+
matrix:
7+
os: [macos-latest, windows-latest]
8+
runs-on: ${{ matrix.os }}
9+
steps:
10+
- name: Set up Python
11+
uses: actions/setup-python@v2
12+
with:
13+
python-version: 3.9
14+
- name: Double-check Python version
15+
run: |
16+
python --version
17+
- name: Clone Git repository (with submodules)
18+
uses: actions/checkout@v2
19+
with:
20+
path: git-repo
21+
submodules: true
22+
- name: Install Python package
23+
working-directory: git-repo
24+
run: |
25+
python -m pip install .
26+
- name: Run tests
27+
run: |
28+
python -m sounddevice
29+
python -c "import sounddevice as sd; print(sd._libname)"
30+
python -c "import sounddevice as sd; print(sd.get_portaudio_version())"
31+

.travis.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)