forked from vgteam/vg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
73 lines (71 loc) · 4.1 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
# Control file for continuous integration testing at http://travis-ci.org/
language: cpp
compiler: gcc
sudo: required
dist: trusty
# We have some shenanigans to let us cache submodules, and update changed files
# without messing up mtimes and triggering rebuilds unnecessarily. Travis checks
# out our submodules and then restores the cache over them. We move the cached
# version out of the way, check out the versions we want, rsync over only the
# differing/updated files (updating only their mtimes), and then put the fixed
# version back.
before_install:
- if [ -e deps ]; then mv deps deps_cached; fi
- git submodule update --init --recursive
- rsync -rv --checksum deps/ deps_cached/
- rm -Rf deps
# Keep the cached deps if the right compiler version was used.
# Otherwise start fresk
- if [[ "$TRAVIS_OS_NAME" == "linux" && -e deps_cached/gcc49 ]]; then mv deps_cached deps; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" && -e deps_cached/gcc6 ]]; then mv deps_cached deps; fi
- (ls -lah deps/; ls -lah bin/; ls -lah lib/; ls -lah include/) || true
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ls /etc/apt/sources.list.d; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo rm /etc/apt/sources.list.d/google-chrome.list; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -qq gcc-4.9 g++-4.9; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9; fi
- gcc --version && g++ --version
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -qq bc rs jq samtools; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -qq; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -y install cmake; fi
# Record that we are building these deps with gcc 4.9
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mkdir -p deps; touch deps/gcc49; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rvm install ruby-2.3.3; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rvm use 2.3.3; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew tap homebrew/science; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install jq jansson coreutils md5sha1sum samtools rasqal bison raptor rasqal gperftools autogen gcc6 lz4 xz; brew link bison --force; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH="/usr/local/opt/coreutils/libexec/gnubin:/usr/local/bin:$PATH"; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export LD_LIBRARY_PATH=/usr/local/lib/; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export CFLAGS="-I/usr/local/include/"; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export LIBRARY_PATH=$LD_LIBRARY_PATH; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then which g++-6 || (brew install gcc6; brew link --overwrite gcc@6); fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir -p ./bin; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ln -sf `which g++-6` ./bin/g++; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ln -sf `which gcc-6` ./bin/gcc; fi
# Record that we are building these deps with gcc 6
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir -p deps; touch deps/gcc6; fi
- python ./configure.py
- source ./source_me.sh
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make get-deps;fi
script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then git submodule update --recursive && make -j4 && echo Testing && make test && make static -j4; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then git submodule update --recursive && timeout 1500 make deps -j4 && make -j4 && echo Testing && travis_wait 40 make test; fi
# Cache all our dependency directories, and our lib and include
cache:
directories:
- deps
- lib
- include
- bin
before_cache:
- rm -f lib/libvg.*
- rm -f include/vg.pb.h include/vg_git_version.hpp
- rm -f bin/vg /bin/vg* bin/g++ bin/gcc
os:
- linux
- osx
compiler:
- gcc