@@ -3,17 +3,9 @@ sudo: required
33
44language : cpp
55
6- compiler :
7- - g++
8- - clang
9-
106git :
117 depth : 10
128
13- os :
14- - linux
15- - osx
16-
179env :
1810 global :
1911 # versions of VTK for each OS
2719 - WITH_TBB=${WITH_TBB:-ON} # build with TBB is always recommended
2820 - WITH_FLANN=${WITH_FLANN:-ON} # build with FLANN is optional, but requires only little extra build time
2921 - WITH_FLTK=${WITH_FLTK:-ON} # build with FLTK-based Viewer when WITH_VTK is turned ON
22+ - WITH_VTK=${WITH_VTK:-ON} # by default, build with VTK
3023 - WITH_ITK=${WITH_ITK:-OFF} # required by ANTs N4 which is included in DrawEM package
31- # exclude DrawEM from Travis CI build for now, see https://github.com/MIRTK/DrawEM/pull/27
24+ # exclude DrawEM from Travis CI build for now, see https://github.com/MIRTK/DrawEM/pull/27
25+ - BUILD_TYPE=Release # default build configuration
3226 # build and deployment of AppImage for Linux
3327 - AppImage_BUILD=${AppImage_BUILD:-ON}
3428 - AppImage_BRANCH=${AppImage_BRANCH:-master}
3529 - AppImage_DEVEL=${AppImage_DEVEL:-ON}
3630 - AppImage_LATEST=${AppImage_LATEST:-ON}
3731 - AppImage_RELEASE=${AppImage_RELEASE}
38- matrix :
39- - WITH_VTK=OFF # make sure that MIRTK can be build fine without VTK
40- - WITH_VTK=ON # test build with all moduldes, including those using VTK
4132
42- matrix :
33+ jobs :
34+ include :
35+ # build optimized code with all modules for AppImage generation
36+ - os : linux
37+ compiler : g++
38+ env : BUILD_TYPE=Release WITH_VTK=ON
39+ # ensure assertions and debug code compiles
40+ - os : linux
41+ compiler : g++
42+ env : BUILD_TYPE=Debug WITH_VTK=ON
43+ # make sure that MIRTK can be build fine without VTK
44+ - os : linux
45+ compiler : g++
46+ env : BUILD_TYPE=Release WITH_VTK=OFF
47+ # build on macOS using clang and recent VTK version
48+ - os : osx
49+ compiler : clang
50+ env : BUILD_TYPE=Release WITH_VTK=ON
51+ # the osx build often breaks with homebrew changes, so we allow it to fail on master
4352 allow_failures :
44- # the osx build often breaks with homebrew changes, so we allow it to fail
4553 - os : osx
46- exclude :
47- # in order to reduce number of jobs to wait for, test only main compilers
48- # used on each OS
49- - os : linux
50- compiler : clang
51- - os : osx
52- compiler : g++
53- # travis-ci.org has low capacity for macOS jobs, thus reduce number of
54- # macOS jobs to only the essential ones. With the following, we only need
55- # to wait for one macOS job.
56- # Because on macOS usually a very recent VTK version is installed with
57- # Homebrew, it is more interesting to build with VTK on macOS than on
58- # Ubuntu. When the GCC build without VTK on Ubuntu succeeds, chances
59- # are very high it also builts fine on macOS.
60- - os : osx
61- compiler : clang
62- env : WITH_VTK=OFF
54+ if : branch = master
55+ fast_finish : true
6356
6457cache :
6558 ccache : true
@@ -78,7 +71,7 @@ script:
7871 - Scripts/travis.sh
7972
8073after_success :
81- - if [ "$AppImage_BUILD" = ON ] && [ "$TRAVIS_REPO_SLUG" = "BioMedIA/MIRTK" ] && [ "$TRAVIS_BRANCH" = "$AppImage_BRANCH" ] && [ "$TRAVIS_PULL_REQUEST" = false ] && [ "$TRAVIS_OS_NAME" = linux ] && [ "$WITH_VTK" = ON ]; then
74+ - if [ "$AppImage_BUILD" = ON ] && [ "$TRAVIS_REPO_SLUG" = "BioMedIA/MIRTK" ] && [ "$TRAVIS_BRANCH" = "$AppImage_BRANCH" ] && [ "$TRAVIS_PULL_REQUEST" = false ] && [ "$TRAVIS_OS_NAME" = linux ] && [ "$WITH_VTK" = ON ] && [ "$BUILD_TYPE" = Release ] ; then
8275 export AppImage_BINTRAY=ON;
8376 else
8477 export AppImage_BINTRAY=OFF;
0 commit comments