mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Merge pull request #902 from smharper/travis_build_matrix
Run CI Tests in Parallel
This commit is contained in:
commit
cb3674baf8
2 changed files with 36 additions and 30 deletions
55
.travis.yml
55
.travis.yml
|
|
@ -14,6 +14,18 @@ addons:
|
|||
cache:
|
||||
directories:
|
||||
- $HOME/nndc_hdf5
|
||||
env:
|
||||
- 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:
|
||||
# ============== Handle Python third-party packages ==============
|
||||
|
|
@ -28,32 +40,37 @@ before_install:
|
|||
- conda config --set always_yes yes --set changeps1 no
|
||||
- conda update -q conda
|
||||
- conda info -a
|
||||
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION six numpy scipy h5py=2.5 pandas
|
||||
- source activate test-environment
|
||||
|
||||
# Install GCC, HDF5, PHDF5
|
||||
- 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
|
||||
- if [[ $OPENMC_CONFIG != "check_source" ]]; then
|
||||
conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION six numpy scipy h5py=2.5 pandas;
|
||||
source activate test-environment;
|
||||
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: true
|
||||
|
||||
before_script:
|
||||
- if [[ ! -e $HOME/nndc_hdf5/cross_sections.xml ]]; then
|
||||
wget https://anl.box.com/shared/static/a6sw2cep34wlz6b9i9jwiotaqoayxcxt.xz -O - | tar -C $HOME -xvJ;
|
||||
- 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
|
||||
- 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
|
||||
|
||||
script:
|
||||
- cd tests
|
||||
- export OMP_NUM_THREADS=2
|
||||
- ./travis.sh
|
||||
- if [[ $OPENMC_CONFIG == "check_source" ]]; then
|
||||
./check_source.py;
|
||||
else
|
||||
./run_tests.py -C $OPENMC_CONFIG -j 2;
|
||||
fi
|
||||
- cd ..
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -ev
|
||||
|
||||
# Run all debug tests
|
||||
./check_source.py
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||
./run_tests.py -C "^hdf5-debug$|^omp-hdf5-debug|^mpi-hdf5-debug|^phdf5-debug$" -j 2
|
||||
else
|
||||
./run_tests.py -C "^hdf5-debug$" -j 2
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue