-
Notifications
You must be signed in to change notification settings - Fork 11
142 lines (134 loc) · 4.54 KB
/
develop-test.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Develop test
on:
pull_request:
branches: [develop, feature/**]
jobs:
build-numpy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
test-group: [short, optimize, multivariate, optimize-experimental]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install numpy dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8
python -m pip install -e .[tests,hnswlib]
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
sh scripts/flake/fatal.sh
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
sh scripts/flake/issues.sh
- name: Short Tests
if: matrix.test-group == 'short'
run: |
python tests/data.py
python tests/neighbors.py
python tests/kernels.py
python tests/gp.py
python tests/batch.py
python tests/predict.py
python tests/precompute/fast_posterior_mean.py
python tests/scale_opt.py
python tests/experimental/shear.py
- name: Optimize Tests
if: matrix.test-group == 'optimize'
run: python tests/optimize.py
- name: Optimize Tests - experimental
if: matrix.test-group == 'optimize-experimental'
run: python tests/experimental/mini_batch.py
- name: Multivariate Tests
if: matrix.test-group == 'multivariate'
run: python tests/multivariate.py
build-jax:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install JAX dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[tests,hnswlib,jax_cpu]
- name: Test JAX correctness
run: |
python tests/backend/jax_correctness.py
build-mpi:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install MPI dependencies
run: |
sudo apt-get install mpich
python -m pip install --upgrade pip
python -m pip install -e .[tests,hnswlib,mpi]
- name: Test MPI correctness
run: |
export MUYGPYS_BACKEND=mpi
mpirun -n 4 python tests/backend/mpi_correctness.py
build-torch:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Torch dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[tests,hnswlib,torch]
- name: Test Torch correctness
run: |
python tests/backend/torch_correctness.py
export MUYGPYS_BACKEND=torch
export MUYGPYS_FTYPE=32
python tests/torch/muygps_torch.py
build-docs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get install pandoc
python -m pip install --upgrade pip
python -m pip install -e .[docs]
- name: Build docs
run: |
sphinx-build -b html docs docs/_build/html/