From b21b6e8331260246ec70fcd07cdb52875d2d6dfa Mon Sep 17 00:00:00 2001 From: Sterling Harper Date: Tue, 11 Jul 2017 11:32:29 -0400 Subject: [PATCH 1/4] Use Travis CI build matrix --- .travis.yml | 3 +++ tests/travis.sh | 6 +----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index fcefaa8f1..ece6c3fc6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,9 @@ addons: cache: directories: - $HOME/nndc_hdf5 +env: + - OPENMC_CONFIG="^hdf5-debug$|^omp-hdf5-debug$" + - OPENMC_CONFIG="^mpi-hdf5-debug$|^phdf5-debug$" before_install: # ============== Handle Python third-party packages ============== diff --git a/tests/travis.sh b/tests/travis.sh index 2dc352834..f7cc3cd77 100755 --- a/tests/travis.sh +++ b/tests/travis.sh @@ -4,8 +4,4 @@ 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 +./run_tests.py -C $OPENMC_CONFIG -j 2 From 952224324e1ee6bf9cda2c95b6e19254e8fa4f6c Mon Sep 17 00:00:00 2001 From: Sterling Harper Date: Wed, 12 Jul 2017 15:46:37 -0400 Subject: [PATCH 2/4] Run check_source separately from run_tests --- .travis.yml | 27 +++++++++++++++++++-------- tests/travis.sh | 7 ------- 2 files changed, 19 insertions(+), 15 deletions(-) delete mode 100755 tests/travis.sh diff --git a/.travis.yml b/.travis.yml index ece6c3fc6..099bba55a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,8 +15,13 @@ cache: directories: - $HOME/nndc_hdf5 env: + - OPENMC_CONFIG="check_source" - OPENMC_CONFIG="^hdf5-debug$|^omp-hdf5-debug$" - OPENMC_CONFIG="^mpi-hdf5-debug$|^phdf5-debug$" +matrix: + exclude: + - python: "2.7" + env: OPENMC_CONFIG="check_source" before_install: # ============== Handle Python third-party packages ============== @@ -35,13 +40,15 @@ before_install: - 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 + 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 @@ -58,5 +65,9 @@ before_script: 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 .. diff --git a/tests/travis.sh b/tests/travis.sh deleted file mode 100755 index f7cc3cd77..000000000 --- a/tests/travis.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -set -ev - -# Run all debug tests -./check_source.py -./run_tests.py -C $OPENMC_CONFIG -j 2 From 0b36d0cd74a450c238f6828acb20d663e30a2871 Mon Sep 17 00:00:00 2001 From: Sterling Harper Date: Wed, 12 Jul 2017 16:52:44 -0400 Subject: [PATCH 3/4] Speed up Travis check_source jobs --- .travis.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 099bba55a..22408b72e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,8 @@ env: - OPENMC_CONFIG="check_source" - OPENMC_CONFIG="^hdf5-debug$|^omp-hdf5-debug$" - OPENMC_CONFIG="^mpi-hdf5-debug$|^phdf5-debug$" + +# We aren't testing the check_source script so just run it with Python 3. matrix: exclude: - python: "2.7" @@ -36,11 +38,9 @@ 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 - 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; @@ -53,14 +53,15 @@ before_install: 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 From a97779d5497ab4f68a686f1b0dee54d1f9df1677 Mon Sep 17 00:00:00 2001 From: Sterling Harper Date: Thu, 13 Jul 2017 11:32:45 -0400 Subject: [PATCH 4/4] Split CI builds into 4 different configurations --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 22408b72e..64fbdc9df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,8 +16,10 @@ cache: - $HOME/nndc_hdf5 env: - OPENMC_CONFIG="check_source" - - OPENMC_CONFIG="^hdf5-debug$|^omp-hdf5-debug$" - - OPENMC_CONFIG="^mpi-hdf5-debug$|^phdf5-debug$" + - 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: