forked from SyneRBI/SIRF-SuperBuild
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
95 lines (84 loc) · 3.36 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
# Language selection
language: python
# Currently commented out as set with environment flags
# Both clang and gcc can be tested. The more is the better.
#compiler:
# - clang
# - gcc
# Cross-operating system test
os:
- linux
# - osx
# Environment variables
# Note: On trusty we need to build Armadillo ourselves (the system version is too old)
matrix:
include:
- python: 3.5
env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_FFTW3=ON" CC=gcc-5 CXX=g++-5
- python: 2.7
env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_SWIG=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_FFTW3=ON" CC=gcc-5 CXX=g++-5
- python: 3.5
env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_FFTW3=OFF -DDEVEL_BUILD=ON" CC=gcc-5 CXX=g++-5
- python: 2.7
env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_SWIG=OFF -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_FFTW3=OFF -DDEVEL_BUILD=ON" CC=gcc-5 CXX=g++-5
env:
global:
- BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DCMAKE_BUILD_TYPE=Release"
# This works on osx but we need to sort out the matrix
# env: EXTRA_BUILD_FLAGS="-DPYTHON_LIBRARY=$(python-config --prefix)/lib/libpython2.7.dylib -DPYTHON_INCLUDE_DIR=$(python-config --prefix)/include/python2.7 " CC=clang CXX=clang++
# Ubuntu 14.04 LTS
dist: trusty
# No need for sudo
sudo: false
# Compilation dependencies
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- git-core
- build-essential
- g++-5
- libboost-all-dev
- libhdf5-serial-dev
- libfftw3-dev
- python-dev
- python3-dev
- liblapack-dev
- libxml2-dev
- libxslt-dev
- libarmadillo-dev
- libace-dev
- libgtest-dev
- libplplot-dev
- root-system-bin
- swig
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew tap homebrew/science; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- # Note: boost is already installed on osx on travis so should not be included. However, we currently need boost-python
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install boost-python; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ace; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install swig; fi
- #if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install scipy matplotlib; fi
- # need curl to get more recent cmake
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install curl; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -0 https://cmake.org/files/v3.8/cmake-3.8.0-Darwin-x86_64.tar.gz -o cmake.tar.gz; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then curl -0 https://cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.tar.gz -o cmake.tar.gz; fi
- tar xzf cmake.tar.gz
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mv cmake-*/CMake.app/Contents/* cmake-*; fi
install:
- #pip install --upgrade pip setuptools wheel
- pip install --only-binary=numpy,scipy,matplotlib numpy scipy matplotlib
- ./cmake-*/bin/cmake $BUILD_FLAGS $EXTRA_BUILD_FLAGS .
- make -j 6
- mv INSTALL/share/gadgetron/config/gadgetron.xml.example INSTALL/share/gadgetron/config/gadgetron.xml
- source $PWD/INSTALL/bin/env_ccppetmr.sh
- #env
script:
- python ./SIRF/src/xSTIR/pSTIR/tests/test1.py
- ./INSTALL/bin/gadgetron >& gadgetron.log&
- python ./SIRF/src/xGadgetron/pGadgetron/tests/fully_sampled.py
- python ./SIRF/src/xGadgetron/pGadgetron/tests/undersampled.py
- # print for debugging
- cat gadgetron.log