Add devcontainer configuration for CPU environment #570
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: | |
push: | |
branches: [ master, develop ] | |
pull_request: | |
branches: [ master, develop ] | |
jobs: | |
test: | |
name: test (${{ matrix.os }}, py-${{ matrix.python_version }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ['ubuntu-22.04', windows-latest, macOS-latest] | |
python_version: ['3.8'] | |
include: | |
# Experimental: Python 3.9 | |
# Works fine, commented out because mostly covered (at least installing/building deps) by the typecheck job | |
# See issue: https://github.com/NeuroTechX/eeg-notebooks/issues/50 | |
#- os: ubuntu-latest | |
# python_version: 3.9 | |
# Check 3.10 for future-proofing | |
- os: ubuntu-22.04 | |
python_version: '3.10' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python_version }} | |
# Not needed if pywinhook is installed from wheels | |
#- name: Install swig | |
# if: "startsWith(runner.os, 'windows')" | |
# run: | | |
# (New-Object System.Net.WebClient).DownloadFile("http://prdownloads.sourceforge.net/swig/swigwin-4.0.1.zip","swigwin-4.0.1.zip"); | |
# Expand-Archive .\swigwin-4.0.1.zip .; | |
# echo "$((Get-Item .).FullName)/swigwin-4.0.1" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: Install APT dependencies | |
if: "startsWith(runner.os, 'Linux')" | |
run: | | |
make install-deps-apt | |
- name: Upgrade pip | |
run: | | |
python -m pip install --upgrade pip wheel | |
- name: Install Linux dependencies | |
if: "startsWith(runner.os, 'Linux')" | |
run: | | |
make install-deps-wxpython | |
- name: Install dependencies | |
run: | | |
make build | |
- name: Run eegnb install test | |
shell: bash | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
Xvfb :0 -screen 0 1024x768x24 -ac +extension GLX +render -noreset &> xvfb.log & | |
export DISPLAY=:0 | |
fi | |
eegnb --help | |
eegnb runexp --help | |
- name: Run examples with coverage | |
shell: bash | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
Xvfb :0 -screen 0 1024x768x24 -ac +extension GLX +render -noreset &> xvfb.log & | |
export DISPLAY=:0 | |
fi | |
make test | |
typecheck: | |
name: typecheck (${{ matrix.os }}, py-${{ matrix.python_version }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ['ubuntu-22.04'] | |
python_version: [3.9] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python_version }} | |
- name: Install APT dependencies | |
if: "startsWith(runner.os, 'Linux')" | |
run: | | |
make install-deps-apt | |
- name: Upgrade pip | |
run: | | |
python -m pip install --upgrade pip wheel | |
- name: Install Linux dependencies | |
if: "startsWith(runner.os, 'Linux')" | |
run: | | |
make install-deps-wxpython | |
- name: Install dependencies | |
run: | | |
make build | |
- name: Typecheck | |
run: | | |
make typecheck |