forked from labstreaminglayer/pylsl
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (54 loc) · 1.67 KB
/
ci.yml
File metadata and controls
60 lines (54 loc) · 1.67 KB
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
name: Continuous Integration
on:
push:
branches: [main]
pull_request:
branches:
- main
workflow_dispatch:
env:
LSL_RELEASE_URL: "https://github.com/sccn/liblsl/releases/download/v1.17.4"
LSL_RELEASE: "1.17.4"
jobs:
style:
name: Check style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- run: uv run ruff check
- run: uv run ruff format --check
test:
needs: style
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
os: ["ubuntu-latest", "windows-latest", "macOS-latest"]
name: Run tests (${{ matrix.os }} Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Download liblsl (Windows)
if: matrix.os == 'windows-latest'
shell: bash
run: |
curl -L ${LSL_RELEASE_URL}/liblsl-${LSL_RELEASE}-Win_amd64.zip -o liblsl.zip
unzip -oj liblsl.zip '*/bin/lsl.dll' -d src/pylsl/lib/
- name: Install liblsl (MacOS)
if: matrix.os == 'macos-latest'
run: |
brew install labstreaminglayer/tap/lsl
echo "PYLSL_LIB=$(brew --prefix lsl)/Frameworks/lsl.framework/Versions/A/lsl" >> $GITHUB_ENV
- name: Install liblsl (Ubuntu)
if: startsWith(matrix.os, 'ubuntu-')
run: |
curl -L ${LSL_RELEASE_URL}/liblsl-${LSL_RELEASE}-$(lsb_release -sc)_amd64.deb -o liblsl.deb
sudo apt install ./liblsl.deb
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
python-version: ${{ matrix.python-version }}
- name: Build
run: uv sync --all-extras
- name: Run tests
run: uv run pytest