-
Notifications
You must be signed in to change notification settings - Fork 15
34 lines (31 loc) · 1.01 KB
/
python.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
name: SPOCK (python)
on: [push, pull_request]
jobs:
unit_tests:
name: Unit tests on ${{ matrix.os }} (${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
matrix:
os: [ubuntu-latest, macos-14]
python-version: ["3.12", "3.9"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install OpenMP with brew if on OSX
if: ${{ contains(matrix.os, 'macos') }}
run: |
brew install libomp
export LDFLAGS="-L/usr/local/opt/libomp/lib"
export CPPFLAGS="-I/usr/local/opt/libomp/include"
export MKL_THREADING_LAYER=TBB
- name: "Install SPOCK"
run: |
python -m pip install --upgrade pip
pip install .[test]
- name: "Run unit tests"
run: python -m unittest discover