-
Notifications
You must be signed in to change notification settings - Fork 2
98 lines (91 loc) · 3.13 KB
/
main.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
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
# main test workflow; ported from .travis.yaml
name: main
on:
push:
branches: [ '*', $default-branch ]
pull_request:
branches: [ $default-branch ]
jobs:
build:
runs-on: ubuntu-latest
env:
OMP_NUM_THREADS: 2
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Install MPI
run: sudo apt install -y -q build-essential mpich libmpich-dev python-is-python3 python3
- name: Cache conda
uses: actions/cache@v4
env:
# Increase this value to reset cache.
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}
- name: Cache depends/
uses: actions/cache@v4
with:
key: ${{ runner.os }}-build-${{ hashFiles('depends/Makefile', 'depends/install_pfft.sh') }}
path: |
~/depends/install
~/depends/include
~/depends/download
~/depends/src
~/depends/lib
- name: Install apt packages
run: |
sudo apt update
sudo apt install -y build-essential libopenmpi-dev openmpi-bin libgsl-dev python3-configobj python3-numpy python3-h5py python3-scipy cython3 libboost-all-dev
- name: Build
run: |
cp platform-options/Options.mk.travis Options.mk
make
- name: Unit tests
run: |
make test
- name: Install python packages for make_class_power
run: |
sudo pip install classy bigfile
- name: examples/travis
run: |
cd examples/travis
python3 ../../tools/make_class_power.py paramfile.genic --extraz 82.3333 65.6667
mpirun -np 2 ../../genic/MP-GenIC paramfile.genic
mpirun -np 2 ../../gadget/MP-Gadget paramfile.gadget 1 # this starts from the IC
mpirun -np 2 ../../gadget/MP-Gadget paramfile.gadget 99 #Checks the gravity force error
mpirun -np 2 ../../gadget/MP-Gadget paramfile.gadget 99 2
python ../../tools/convert_bigfile_gadget_hdf5.py --input output/PART_000 --output output
- name: examples/dm-small
run: |
cd examples/dm-small
#python3 ../../tools/make_class_power.py paramfile.genic --extraz 4 3
mpirun -np 2 ../../genic/MP-GenIC paramfile.genic
mpirun -np 2 ../../gadget/MP-Gadget paramfile.gadget
mpirun -np 2 ../../gadget/MP-Gadget paramfile.gadget 3 2 # Check FOF mode works
python check_results.py
- name: examples/star-small
run: |
cd examples/star-small
mpirun -np 2 ../../genic/MP-GenIC paramfile.genic
mpirun -np 2 ../../gadget/MP-Gadget paramfile.gadget
python check_results.py
- name: Setup nbodykit
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: latest
activate-environment: test
environment-file: maintainer/conda-env.yaml
channels: bccp
show-channel-urls: true
use-only-tar-bz2: true
- run: |
conda info
- name : Check travis results
run: |
cd examples/travis
python check-results.py #This script alone needs nbodykit.