-
Notifications
You must be signed in to change notification settings - Fork 70
/
Copy path.travis.yml
113 lines (100 loc) · 3.83 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
dist: xenial # Ubuntu version determines minimum GLIBC version required by AppImage
language: cpp
compiler:
- g++
- clang
git:
depth: 10
os:
- linux
- osx
env:
global:
# versions of VTK for each OS
# - On Ubuntu, use default version installed by apt-get
# - On macOS, build recent VTK version from sources and cache installation
- LINUX_VTK_VERSION=7.1.1
- MACOS_VTK_VERSION=9.0 # Homebrew versions: 8.2, 9.0; otherwise build from sources
- WITH_CCACHE=ON # speed up MIRTK build itself using ccache
- WITH_ARPACK=OFF # requires time consuming build of gcc on macOS
- WITH_UMFPACK=OFF # ARPACK & UMFPACK dependencies come in pairs
- WITH_TBB=ON # build with TBB is always recommended
- WITH_FLANN=ON # build with FLANN is optional, but requires only little extra build time
- WITH_FLTK=ON # build with FLTK-based Viewer when WITH_VTK is turned ON
- WITH_ITK=OFF # required by ANTs N4 which is included in DrawEM package
# exclude DrawEM from Travis CI build for now, see https://github.com/MIRTK/DrawEM/pull/27
# build and deployment of AppImage for Linux
- AppImage_BUILD=${AppImage_BUILD:-ON}
- AppImage_BRANCH=${AppImage_BRANCH:-master}
- AppImage_DEVEL=${AppImage_DEVEL:-ON}
- AppImage_LATEST=${AppImage_LATEST:-ON}
- AppImage_RELEASE=${AppImage_RELEASE}
jobs:
- WITH_VTK=OFF # make sure that MIRTK can be build fine without VTK
- WITH_VTK=ON # test build with all moduldes, including those using VTK
jobs:
allow_failures:
# the osx build often breaks with homebrew changes, so we allow it to fail
- os: osx
exclude:
# in order to reduce number of jobs to wait for, test only main compilers
# used on each OS
- os: linux
compiler: clang
- os: osx
compiler: g++
# travis-ci.org has low capacity for macOS jobs, thus reduce number of
# macOS jobs to only the essential ones. With the following, we only need
# to wait for one macOS job.
# Because on macOS usually a very recent VTK version is installed with
# Homebrew, it is more interesting to build with VTK on macOS than on
# Ubuntu. When the GCC build without VTK on Ubuntu succeeds, chances
# are very high it also builts fine on macOS.
- os: osx
compiler: clang
env: WITH_VTK=OFF
cache:
ccache: true
timeout: 1000
directories:
- "$HOME/VTK-$LINUX_VTK_VERSION"
- "$HOME/VTK-$MACOS_VTK_VERSION"
before_install:
- . Scripts/install_depends.sh # sourcing will enable export of env variables
- cd $TRAVIS_BUILD_DIR # working directory may have been changed
install: true
script:
- Scripts/travis.sh
after_success:
- 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
export AppImage_BINTRAY=ON;
else
export AppImage_BINTRAY=OFF;
fi
- if [ "$AppImage_BUILD" = ON ] && [ "$AppImage_BINTRAY" = ON -o -n "$TRAVIS_TAG" ]; then
Scripts/make_appimage.sh;
fi
before_deploy:
- git tag -f travis-${TAG}-build
- git remote add gh https://${OWNER}:${GITHUB_API_KEY}@github.com/${TRAVIS_REPO_SLUG}.git
- git push gh :travis-${TAG}-build || true
- git push -f gh travis-${TAG}-build
- git remote remove gh
deploy:
- provider: releases
api-key: $GITHUB_API_KEY
file: Deploy/*.AppImage
file_glob: true
skip_cleanup: true
name: AppImage of MIRTK master HEAD deployed by Travis CI build
body: Automatic MIRTK development build of $TRAVIS_BRANCH branch
(commit $TRAVIS_COMMIT) built by Travis CI on $(date +'%F %T %Z').
prerelease: true
overwrite: true
target_commitish: $TRAVIS_COMMIT
on:
condition: "$AppImage_BINTRAY = ON"
all_branches: true
tags: false
notifications:
email: false