-
Notifications
You must be signed in to change notification settings - Fork 5
52 lines (46 loc) · 1.47 KB
/
run_tests.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Run Unit Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
version: ["3.9", "3.x"]
defaults:
run:
shell: bash -l {0}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python version ${{ matrix.version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.version }}
- name: Install OMP (MacOS)
if: runner.os == 'macOS'
run: |
brew install llvm libomp
echo "export CC=/usr/local/opt/llvm/bin/clang" >> ~/.bashrc
echo "export CFLAGS=\"$CFLAGS -I/usr/local/opt/libomp/include\"" >> ~/.bashrc
echo "export CXXFLAGS=\"$CXXFLAGS -I/usr/local/opt/libomp/include\"" >> ~/.bashrc
echo "export LDFLAGS=\"$LDFLAGS -Wl,-rpath,/usr/local/opt/libomp/lib -L/usr/local/opt/libomp/lib -lomp\"" >> ~/.bashrc
source ~/.bashrc
- name: Install OMP (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt install libomp-dev
- name: Install and Test with pytest
run: |
python -m pip install -e .[Dev]
pytest -s tests/ --cov=RATapi --cov-report=term