Remove check_source Travis configuration, make other simplifications

This commit is contained in:
Paul Romano 2017-12-14 16:42:24 +07:00
parent 64ca0b752f
commit f455ede482
4 changed files with 39 additions and 36 deletions

View file

@ -26,32 +26,18 @@ env:
- 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:
exclude:
- python: "2.7"
env: OPENMC_CONFIG="check_source"
before_install:
- if [[ $OPENMC_CONFIG != "check_source" ]]; then
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;
fi
- 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
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
- ./tools/ci/travis-install.sh
before_script:
- ./tools/ci/travis-before-script.sh

View file

@ -1,17 +1,16 @@
#!/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
# 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

19
tools/ci/travis-install.sh Executable file
View file

@ -0,0 +1,19 @@
#!/bin/bash
set -ex
# Install NJOY 2016
./tools/ci/travis-install-njoy.sh
# Running OpenMC's setup.py requires numpy/cython already
pip install numpy cython
# pytest installed by default -- make sure we get latest
pip install --upgrade pytest
# Pandas stopped supporting Python 3.4 with version 0.21
if [[ "$TRAVIS_PYTHON_VERSION" == "3.4" ]]; then
pip install pandas==0.20.3
fi
# Install OpenMC in editable mode
pip install -e .[test]

View file

@ -1,9 +1,8 @@
#!/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/
if [[ $TRAVIS_PYTHON_VERSION == "3.4" && $OPENMC_CONFIG == '^hdf5-debug$' ]]; then
./check_source.py
fi
./run_tests.py -C $OPENMC_CONFIG -j 2
pytest --cov=../openmc -v unit_tests/