Skip to content

Commit

Permalink
Reduce the number of build jobs
Browse files Browse the repository at this point in the history
Many configuration options of NEST are actually independent.
This means we don't have to run the full matrix, but just a
minimal job, a maximal job, and some jobs for dependent options.

This commit simplifies the matrix from 8 runs to 4 runs while
also adding a new option for builds with and without threading.
  • Loading branch information
jougs committed Jun 27, 2016
1 parent dde213f commit 04c668b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
15 changes: 7 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ dist: trusty

env:
matrix:
- xGSL=0 xMPI=0 xPYTHON=1 xSTATIC_ANALYSIS=1 CACHE_NAME=JOB
- xGSL=0 xMPI=0 xPYTHON=0 xSTATIC_ANALYSIS=1 CACHE_NAME=JOB
- xGSL=0 xMPI=1 xPYTHON=0 xSTATIC_ANALYSIS=1 CACHE_NAME=JOB
- xGSL=0 xMPI=1 xPYTHON=1 xSTATIC_ANALYSIS=1 CACHE_NAME=JOB
- xGSL=1 xMPI=0 xPYTHON=0 xSTATIC_ANALYSIS=1 CACHE_NAME=JOB
- xGSL=1 xMPI=0 xPYTHON=1 xSTATIC_ANALYSIS=1 CACHE_NAME=JOB
- xGSL=1 xMPI=1 xPYTHON=0 xSTATIC_ANALYSIS=1 CACHE_NAME=JOB
- xGSL=1 xMPI=1 xPYTHON=1 xSTATIC_ANALYSIS=1 CACHE_NAME=JOB
# We don't have to run a full matrix here, because most of the options are
# independent. This means that we can test them together in the full build.
# See also https://docs.travis-ci.com/user/caching/#Caches-and-build-matrices
- xTHREADING=0 xMPI=0 xGSL=0 xPYTHON=0 xSTATIC_ANALYSIS=1 CACHE_NAME=JOB # minimal
- xTHREADING=0 xMPI=1 xGSL=0 xPYTHON=0 xSTATIC_ANALYSIS=1 CACHE_NAME=JOB # only MPI
- xTHREADING=1 xMPI=0 xGSL=0 xPYTHON=0 xSTATIC_ANALYSIS=1 CACHE_NAME=JOB # only threading
- xTHREADING=1 xMPI=1 xGSL=1 xPYTHON=1 xSTATIC_ANALYSIS=1 CACHE_NAME=JOB # full
matrix:
# do notify immediately about it when a job of a build fails.
fast_finish: true
Expand Down
9 changes: 7 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@ set -e

mkdir -p $HOME/.matplotlib
cat > $HOME/.matplotlib/matplotlibrc <<EOF
# ZYV
backend : svg
EOF

if [ "$xTHREADING" = "1" ] ; then
CONFIGURE_THREADING="-Dwith-openmp=ON"
else
CONFIGURE_THREADING="-Dwith-openmp=OFF"
fi

if [ "$xMPI" = "1" ] ; then

cat > $HOME/.nestrc <<EOF
% ZYV: NEST MPI configuration
/mpirun
[/integertype /stringtype]
[/numproc /slifile]
Expand Down Expand Up @@ -233,6 +237,7 @@ cmake \
-DCMAKE_INSTALL_PREFIX="$NEST_RESULT" \
-Dwith-optimize=ON \
-Dwith-warning=ON \
$CONFIGURE_THREADING \
$CONFIGURE_MPI \
$CONFIGURE_PYTHON \
$CONFIGURE_GSL \
Expand Down

0 comments on commit 04c668b

Please sign in to comment.