-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (60 loc) · 1.78 KB
/
test-all.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Tests
on:
pull_request:
push:
branches:
- main
jobs:
test:
name: Run tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
python-version: ["3.8", "3.9", "3.10", "3.11"]
backend: [numpy, jax]
env:
OMPI_MCA_rmaps_base_oversubscribe: "1"
OMPI_MCA_mpi_yield_when_idle: "1"
ROGER_REQUIRE_CYTHON_EXT: "0"
steps:
- uses: actions/checkout@v4
# make sure tags are fetched so we can get a version
- run: git fetch --prune --unshallow --tags
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Restore pip cache
uses: actions/cache@v4
id: pip-cache
with:
path: ~/.cache/pip
key: ${{ matrix.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ matrix.os }}-pip-
- name: Setup Python environment
run: |
python -m pip install --upgrade pip
pip install wheel
pip install cython
- name: Install system requirements
run: |
sudo apt-get update
sudo apt-get install libopenmpi-dev
- name: Install Roger
run: |
pip install mpi4py
if [ ${{ matrix.backend }} == "jax" ]
then
pip install mpi4jax
pip install -e .[test,jax]
else
pip install -e .[test]
fi
- name: Run tests
run: |
pytest . -v --cov --backend ${{ matrix.backend }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3