Simplify the integration routines #42
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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. |