summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorMatthias Geier <Matthias.Geier@gmail.com>2020-11-28 18:50:02 +0100
committerMatthias Geier <Matthias.Geier@gmail.com>2020-11-28 19:27:09 +0100
commit2ea706495cf2fa262199c0c2617230c935dc3b8b (patch)
treeaf65b99c86f8593535c80ce9e4e501ed8413e19b /.github/workflows
parent3412f954e5dcfb5914b2eb74fb12deb4c7ad6f69 (diff)
CI: switch from Travis-CI to Github Actions
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/docs.yml35
-rw-r--r--.github/workflows/python-versions.yml32
-rw-r--r--.github/workflows/sounddevice-data.yml31
3 files changed, 98 insertions, 0 deletions
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
new file mode 100644
index 0000000..5f07b15
--- /dev/null
+++ b/.github/workflows/docs.yml
@@ -0,0 +1,35 @@
+name: Build docs and check links
+on: [push, pull_request]
+jobs:
+ docs-linkcheck:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Install pandoc
+ run: |
+ sudo apt-get install --no-install-recommends pandoc
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.9
+ - name: Double-check Python version
+ run: |
+ python --version
+ - name: Clone Git repository (without depth limitation)
+ uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+ - name: Install dependencies
+ run: |
+ python -m pip install -r doc/requirements.txt
+ - name: Build HTML
+ run: |
+ python -m sphinx -W --keep-going --color -d _build/doctrees/ doc/ _build/html/ -b html
+ - name: Check links
+ run: |
+ python -m sphinx -W --keep-going --color -d _build/doctrees/ doc/ _build/linkcheck/ -b linkcheck
+ - name: Upload linkcheck results
+ uses: actions/upload-artifact@v2
+ if: ${{ success() || failure() }}
+ with:
+ name: linkcheck
+ path: _build/linkcheck/output.*
diff --git a/.github/workflows/python-versions.yml b/.github/workflows/python-versions.yml
new file mode 100644
index 0000000..ca979b6
--- /dev/null
+++ b/.github/workflows/python-versions.yml
@@ -0,0 +1,32 @@
+name: Test with different Python versions
+on: [push, pull_request]
+jobs:
+ python:
+ strategy:
+ matrix:
+ python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", pypy3]
+ runs-on: ubuntu-latest
+ steps:
+ - name: Install PortAudio
+ run: |
+ sudo apt-get install --no-install-recommends libportaudio2
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Double-check Python version
+ run: |
+ python --version
+ - name: Clone Git repository
+ uses: actions/checkout@v2
+ with:
+ path: git-repo
+ - name: Install Python package
+ working-directory: git-repo
+ run: |
+ python -m pip install .
+ - name: Run tests
+ run: |
+ python -m sounddevice
+ python -c "import sounddevice as sd; print(sd._libname)"
+ python -c "import sounddevice as sd; print(sd.get_portaudio_version())"
diff --git a/.github/workflows/sounddevice-data.yml b/.github/workflows/sounddevice-data.yml
new file mode 100644
index 0000000..61d1014
--- /dev/null
+++ b/.github/workflows/sounddevice-data.yml
@@ -0,0 +1,31 @@
+name: Test PortAudio binaries
+on: [push, pull_request]
+jobs:
+ binaries:
+ strategy:
+ matrix:
+ os: [macos-latest, windows-latest]
+ runs-on: ${{ matrix.os }}
+ steps:
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.9
+ - name: Double-check Python version
+ run: |
+ python --version
+ - name: Clone Git repository (with submodules)
+ uses: actions/checkout@v2
+ with:
+ path: git-repo
+ submodules: true
+ - name: Install Python package
+ working-directory: git-repo
+ run: |
+ python -m pip install .
+ - name: Run tests
+ run: |
+ python -m sounddevice
+ python -c "import sounddevice as sd; print(sd._libname)"
+ python -c "import sounddevice as sd; print(sd.get_portaudio_version())"
+