-
Notifications
You must be signed in to change notification settings - Fork 8
70 lines (65 loc) · 1.75 KB
/
build-test.yaml
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
name: Build and Test
on: [push, pull_request]
env:
HOMEBREW_NO_AUTO_UPDATE: 1
CPATH: /usr/local/include
LPATH: /usr/local/lib
defaults:
run:
shell: bash
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
cxx: [g++-10, g++-11, g++-12]
include:
- os: macos-latest
python-version: "3.10"
cxx: g++-12
runs-on: ${{ matrix.os }}
env:
CXX: ${{ matrix.cxx }}
steps:
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install dependencies
if: matrix.os == 'ubuntu-latest'
shell: bash
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update -qq
sudo apt install libfftw3-dev libgsl0-dev libhdf5-serial-dev
sudo apt install gcc-10 g++-10 gcc-11 g++-11 gcc-12 g++-12
- name: Install dependencies
if: matrix.os == 'macos-latest'
shell: bash
run: |
brew install gcc@12 fftw gsl hdf5
brew link gsl
- name: Compile code
working-directory: genetIC
run: make
- name: Install python dependencies
shell: bash
run: |
export CC=gcc-12
export CXX=g++-12
python -m pip install --upgrade pip setuptools wheel
python -m pip install numpy scipy cython
python -m pip install --pre pynbody
- name: Run tests
shell: bash
working-directory: genetIC/tests
run: ./run_tests.sh
- name: Run mapper tests
shell: bash
working-directory: genetIC/tests
run: ./run_mapper_tests.sh