Skip to content

Commit 237b09b

Browse files
committed
ci: Consider env variables in Travis CI settings
1 parent 7dfb4b6 commit 237b09b

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

.travis.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ env:
1919
# versions of VTK for each OS
2020
# - On Ubuntu, use default version installed by apt-get
2121
# - On macOS, build recent VTK version from sources and cache installation
22-
- LINUX_VTK_VERSION=6.0.0
23-
- MACOS_VTK_VERSION=9.0 # Homebrew versions: 8.2, 9.0; otherwise build from sources
24-
- WITH_CCACHE=ON # speed up MIRTK build itself using ccache
25-
- WITH_ARPACK=OFF # requires time consuming build of gcc on macOS
26-
- WITH_UMFPACK=OFF # ARPACK & UMFPACK dependencies come in pairs
27-
- WITH_TBB=ON # build with TBB is always recommended
28-
- WITH_FLANN=ON # build with FLANN is optional, but requires only little extra build time
29-
- WITH_FLTK=ON # build with FLTK-based Viewer when WITH_VTK is turned ON
30-
- WITH_ITK=OFF # required by ANTs N4 which is included in DrawEM package
22+
- VTK_VERSION_LINUX=${VTK_VERSION_LINUX:-6.0.0} # trusty: 6.0.0, xenial: 6.2.0, bionic: 6.3.0, 7.1.1
23+
- VTK_VERSION_MACOS=${VTK_VERSION_MACOS:-9.0} # Homebrew versions: 8.2, 9.0; otherwise build from sources
24+
- WITH_CCACHE=${WITH_CCACHE:-ON} # speed up MIRTK build itself using ccache
25+
- WITH_ARPACK=${WITH_ARPACK:-OFF} # requires time consuming build of gcc on macOS
26+
- WITH_UMFPACK=${WITH_UMFPACK:-OFF} # ARPACK & UMFPACK dependencies come in pairs
27+
- WITH_TBB=${WITH_TBB:-ON} # build with TBB is always recommended
28+
- WITH_FLANN=$(WITH_FLANN:-ON} # build with FLANN is optional, but requires only little extra build time
29+
- WITH_FLTK=${WITH_FLTK:-ON} # build with FLTK-based Viewer when WITH_VTK is turned ON
30+
- WITH_ITK=${WITH_ITK:-OFF} # required by ANTs N4 which is included in DrawEM package
3131
# exclude DrawEM from Travis CI build for now, see https://github.com/MIRTK/DrawEM/pull/27
3232
# build and deployment of AppImage for Linux
3333
- AppImage_BUILD=${AppImage_BUILD:-ON}
@@ -65,8 +65,8 @@ cache:
6565
ccache: true
6666
timeout: 1000
6767
directories:
68-
- "$HOME/VTK-$LINUX_VTK_VERSION"
69-
- "$HOME/VTK-$MACOS_VTK_VERSION"
68+
- "$HOME/VTK-$VTK_VERSION_LINUX"
69+
- "$HOME/VTK-$VTK_VERSION_MACOS"
7070

7171
before_install:
7272
- . Scripts/install_depends.sh # sourcing will enable export of env variables

Scripts/install_depends.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ if [ $os = linux ] || [ $os = Linux ]; then
105105
fi
106106

107107
if [ $WITH_VTK = ON ]; then
108-
if [ -n "$LINUX_VTK_VERSION" ]; then
109-
VTK_VERSION="$LINUX_VTK_VERSION"
108+
if [ -n "$VTK_VERSION_LINUX" ]; then
109+
VTK_VERSION="$VTK_VERSION_LINUX"
110110
fi
111111
if [ "$DISTRIB_CODENAME" = "trusty" ]; then
112112
if [ -z "$VTK_VERSION" ] || [ $VTK_VERSION = '6.0.0' ]; then
@@ -182,7 +182,7 @@ if [ $os = osx ] || [ $os = Darwin ]; then
182182
brew_install suite-sparse
183183
fi
184184
if [ $WITH_VTK = ON ]; then
185-
VTK_VERSION="$MACOS_VTK_VERSION"
185+
VTK_VERSION="$VTK_VERSION_MACOS"
186186
if [ -z "$VTK_VERSION" ]; then
187187
echo "Installing VTK using Homebrew"
188188
brew_install vtk

Scripts/travis.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ if [ $WITH_VTK = ON ]; then
6060
modules=(${modules[@]} Viewer)
6161
fi
6262
if [ $os = osx ] || [ $os = Darwin ]; then
63-
if [ -d "/usr/local/opt/vtk@$MACOS_VTK_VERSION" ]; then
64-
cmake_args+=(-D DEPENDS_VTK_DIR="/usr/local/opt/vtk@$MACOS_VTK_VERSION")
63+
if [ -d "/usr/local/opt/vtk@$VTK_VERSION_MACOS" ]; then
64+
cmake_args+=(-D DEPENDS_VTK_DIR="/usr/local/opt/vtk@$VTK_VERSION_MACOS")
6565
fi
6666
fi
6767
fi

0 commit comments

Comments
 (0)