mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Try installing NJOY on Travis, separate things into scripts
This commit is contained in:
parent
455efffdbf
commit
64ca0b752f
4 changed files with 54 additions and 28 deletions
48
.travis.yml
48
.travis.yml
|
|
@ -8,18 +8,29 @@ addons:
|
|||
apt:
|
||||
packages:
|
||||
- gfortran
|
||||
- g++
|
||||
- mpich
|
||||
- libmpich-dev
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/nndc_hdf5
|
||||
- $HOME/endf-b-vii.1
|
||||
env:
|
||||
- OPENMC_CONFIG="check_source"
|
||||
- OPENMC_CONFIG="^hdf5-debug$"
|
||||
- OPENMC_CONFIG="^omp-hdf5-debug$"
|
||||
- OPENMC_CONFIG="^mpi-hdf5-debug$"
|
||||
- OPENMC_CONFIG="^phdf5-debug$"
|
||||
global:
|
||||
- FC=gfortran
|
||||
- MPI_DIR=/usr
|
||||
- PHDF5_DIR=/usr
|
||||
- HDF5_DIR=/usr
|
||||
- OMP_NUM_THREADS=2
|
||||
- OPENMC_CROSS_SECTIONS=$HOME/nndc_hdf5/cross_sections.xml
|
||||
- OPENMC_ENDF_DATA=$HOME/endf-b-vii.1
|
||||
- OPENMC_MULTIPOLE_LIBRARY=$HOME/multipole_lib
|
||||
- PATH=$PATH:$HOME/NJOY2016/build
|
||||
matrix:
|
||||
- OPENMC_CONFIG="check_source"
|
||||
- OPENMC_CONFIG="^hdf5-debug$"
|
||||
- OPENMC_CONFIG="^omp-hdf5-debug$"
|
||||
- OPENMC_CONFIG="^mpi-hdf5-debug$"
|
||||
- OPENMC_CONFIG="^phdf5-debug$"
|
||||
|
||||
# We aren't testing the check_source script so just run it with Python 3.
|
||||
matrix:
|
||||
|
|
@ -32,37 +43,18 @@ before_install:
|
|||
sudo add-apt-repository ppa:nschloe/hdf5-backports -y;
|
||||
sudo apt-get update -q;
|
||||
sudo apt-get install libhdf5-serial-dev libhdf5-mpich-dev -y;
|
||||
export FC=gfortran;
|
||||
export MPI_DIR=/usr;
|
||||
export PHDF5_DIR=/usr;
|
||||
export HDF5_DIR=/usr;
|
||||
fi
|
||||
|
||||
install:
|
||||
- if [[ $OPENMC_CONFIG != "check_source" ]]; then
|
||||
./tools/ci/travis-install-njoy.sh
|
||||
pip install numpy cython;
|
||||
pip install --upgrade pytest;
|
||||
pip install -e .[test];
|
||||
fi
|
||||
|
||||
before_script:
|
||||
- if [[ $OPENMC_CONFIG != "check_source" ]]; then
|
||||
if [[ ! -e $HOME/nndc_hdf5/cross_sections.xml ]]; then
|
||||
wget https://anl.box.com/shared/static/a6sw2cep34wlz6b9i9jwiotaqoayxcxt.xz -O - | tar -C $HOME -xvJ;
|
||||
fi;
|
||||
export OPENMC_CROSS_SECTIONS=$HOME/nndc_hdf5/cross_sections.xml;
|
||||
git clone --branch=master git://github.com/smharper/windowed_multipole_library.git wmp_lib;
|
||||
tar xzvf wmp_lib/multipole_lib.tar.gz;
|
||||
export OPENMC_MULTIPOLE_LIBRARY=$PWD/multipole_lib;
|
||||
fi
|
||||
- ./tools/ci/travis-before-script.sh
|
||||
|
||||
script:
|
||||
- cd tests
|
||||
- export OMP_NUM_THREADS=2
|
||||
- if [[ $OPENMC_CONFIG == "check_source" ]]; then
|
||||
./check_source.py;
|
||||
else
|
||||
./run_tests.py -C $OPENMC_CONFIG -j 2 &&
|
||||
pytest --cov=../openmc -v unit_tests/;
|
||||
fi
|
||||
- cd ..
|
||||
- ./tools/ci/travis-script.sh
|
||||
|
|
|
|||
17
tools/ci/travis-before-script.sh
Executable file
17
tools/ci/travis-before-script.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
set -ex
|
||||
if [[ $OPENMC_CONFIG != "check_source" ]]; then
|
||||
# Download NNDC HDF5 data
|
||||
if [[ ! -e $HOME/nndc_hdf5/cross_sections.xml ]]; then
|
||||
wget https://anl.box.com/shared/static/a6sw2cep34wlz6b9i9jwiotaqoayxcxt.xz -O - | tar -C $HOME -xvJ
|
||||
fi
|
||||
|
||||
# Download ENDF/B-VII.1 distribution
|
||||
if [[ ! -d $HOME/endf-b-vii.1/neutrons ]]; then
|
||||
wget https://anl.box.com/shared/static/4kd2gxnf4gtk4w1c8eua5fsua22kvgjb.xz -O - | tar -C $HOME -xvJ
|
||||
fi
|
||||
|
||||
# Download multipole library
|
||||
git clone --branch=master git://github.com/smharper/windowed_multipole_library.git wmp_lib
|
||||
tar -C $HOME -xzvf wmp_lib/multipole_lib.tar.gz
|
||||
fi
|
||||
8
tools/ci/travis-install-njoy.sh
Executable file
8
tools/ci/travis-install-njoy.sh
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
set -ex
|
||||
cd $HOME
|
||||
git clone https://github.com/njoy/NJOY2016
|
||||
cd NJOY2016
|
||||
sed -i -e 's/5\.1/4.8/' CMakeLists.txt
|
||||
mkdir build && cd build
|
||||
cmake .. && make 2>/dev/null && sudo make install
|
||||
9
tools/ci/travis-script.sh
Executable file
9
tools/ci/travis-script.sh
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
set -ex
|
||||
cd tests
|
||||
if [[ $OPENMC_CONFIG == "check_source" ]]; then
|
||||
./check_source.py;
|
||||
else
|
||||
./run_tests.py -C $OPENMC_CONFIG -j 2
|
||||
pytest --cov=../openmc -v unit_tests/
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue