-
Notifications
You must be signed in to change notification settings - Fork 637
71 lines (67 loc) · 2.34 KB
/
build-ci.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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
name: "Test ${{ matrix.name-prefix }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name-prefix: "C++ without MPI"
enable-mpi: false
configure-options: "--without-python"
python-version: "none"
- name-prefix: "C++ with MPI"
enable-mpi: true
configure-options: "--without-python --with-mpi"
python-version: "none"
- name-prefix: "Python 3.6"
enable-mpi: false
configure-options: "--with-python --enable-maintainer-mode"
python-version: "3.6"
- name-prefix: "Python 3.9"
enable-mpi: false
configure-options: "--with-python --enable-maintainer-mode"
python-version: "3.9"
steps:
- name: Install Dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y autoconf automake libaec-dev libctl-dev libfftw3-dev libgdsii-dev libgsl-dev libharminv-dev libhdf5-dev libtool mpb mpb-dev swig
- name: Install MPI
if: matrix.enable-mpi
run: |
sudo apt-get install libhdf5-openmpi-dev libopenmpi-dev
sudo update-alternatives --set hdf5.pc /usr/lib/x86_64-linux-gnu/pkgconfig/hdf5-openmpi.pc
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python (version ${{ matrix.python-version }})
if: ${{ matrix.python-version != 'none' }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
if: ${{ matrix.python-version != 'none' }}
run: pip install autograd h5py jax jaxlib matplotlib mpi4py numpy parameterized pytest scipy
- name: Autoreconf
run: autoreconf -if
- name: configure
run: ./configure --with-hdf5 --without-scheme --enable-shared ${{ matrix.configure-options }}
- name: make
run: make
- name: Run Python tests
if: ${{ matrix.python-version != 'none' }}
env:
MEEP_SKIP_LARGE_TESTS: 1
run: |
export PYTHONPATH="${PWD}/python:${PYTHONPATH}"
pytest python/tests
- name: Run C++ tests
if: ${{ matrix.python-version == 'none' }}
run: make check