forked from CBICA/CaPTk
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
91 lines (80 loc) · 3.33 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
language: cpp
# You may find that on your travis CI or on the master branch that for some reason travis is timing out,
# ccache can fix this if you compile the dependency manager one at a time since VTK takes 50 minutes to compile on travis
# To do this, go into the superbuild cmake and simply comment out the packages so that opencv only builds, then vtk and opencv, etc
# After that, also make sure the script terminates afterwards immediately so travis can pack and upload the cache
before_cache:
- ls '/home/travis/.ccache'
cache: ccache
#ccache: true
#directories:
#- $HOME/.ccache
#- $TRAVIS_BUILD_DIR
#cache:
# directories:
# - $TRAVIS_BUILD_DIR
# Build matrix to run jobs in parallel
matrix:
include:
- os: osx
- os: linux
dist: xenial
sudo: required
env:
- LINUX_DIST=xenial
# Dbus versions might mean that this build can never complete, therefore it should be on allowed_failures
- os: linux
dist: trusty
sudo: required
env:
- LINUX_DIST=trusty
# Test the installer on xenial
# - os: linux
# dist: xenial
# sudo: required
# env:
# - LINUX_DIST=xenial
# - INSTALL_TEST=true
# Test the installer on trusty
# - os: linux
# dist: trusty
# sudo: required
# env:
# - LINUX_DIST=trusty
# - INSTALL_TEST=true
- os: windows
env:
- MSBUILD_PATH="c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
# If the non-allowed failure builds complete, marked job as done
fast_finish: true
# Allow failures for specific platforms
allow_failures:
#- os: linux
# dist: xenial
- os: osx
- os: linux
dist: trusty
- os: windows
before_install:
# chmod all travis scripts
- chmod +x ./.travis/*
# Linux install step
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$LINUX_DIST" == "xenial" && "$INSTALL_TEST" != "true" ]]; then sudo apt-get install -qq gcc g++ make libgl-dev cmake python3-pip python-numpy dos2unix; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$LINUX_DIST" == "trusty" && "$INSTALL_TEST" != "true" ]]; then sudo apt-get install -qq gcc g++ make libgl1-mesa-dev cmake python3-pip python-numpy dos2unix; fi
# Install expect for install testers
- if [[ "$INSTALL_TEST" == "true" ]]; then sudo apt-get install -qq expect; fi
# Update step
# - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -qq; fi
# Git LFS
# - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then git lfs fetch --all; fi
### OSX
# OSX install step
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ccache && export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install caskroom/cask/mactex make git-lfs doxygen llvm ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then git lfs install && git lfs fetch --all; fi
script:
# Launch either the install linux script or compilation linux script
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./.travis/mac-generic.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then if [[ "$INSTALL_TEST" == "true" ]]; then ./.travis/linux-installer.sh; else ./.travis/linux-generic.sh; fi; fi
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then export PATH=$MSBUILD_PATH:$PATH; fi
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then ./.travis/windows-generic.sh; fi