-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
66 lines (64 loc) · 3.5 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
# 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
- mv deps_cached deps
- (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
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew tap homebrew/science; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew tap homebrew/versions; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install jq jansson coreutils md5sha1sum samtools rasqal gtk-doc bison raptor rasqal gperftools autogen gcc49; brew link bison --force; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew uninstall libtool; brew install libtool; 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++-4.9 || (brew unlink gcc && brew install gcc49); fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir -p ./bin; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ln -sf `which g++-4.9` ./bin/g++; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ln -sf `which gcc-4.9` ./bin/gcc; 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 && make test && make static -j4; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make -j4 && 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