This repository has been archived by the owner on Jan 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
/
.travis.yml
73 lines (66 loc) · 3.29 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
#Adapted from http://gronlier.fr/blog/2015/01/adding-code-coverage-to-your-c-project/
sudo: required
dist: trusty
language: python
python: "3.4"
services:
- postgresql
env:
global:
- LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/dependencies/libcsv/.libs
- JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
- GENOMICSDB_BUILD_DIR=$TRAVIS_BUILD_DIR/build
- GENOMICSDB_INSTALL_DIR=$GENOMICSDB_BUILD_DIR/install
- PATH=$GENOMICSDB_INSTALL_DIR/bin:$TRAVIS_BUILD_DIR/bin:$PATH
- GENOMICSDB_RELEASE_VERSION=0.10.2
- CLASSPATH=$GENOMICSDB_INSTALL_DIR/bin/genomicsdb-${GENOMICSDB_RELEASE_VERSION}-jar-with-dependencies.jar:$GENOMICSDB_BUILD_DIR/target/genomicsdb-${GENOMICSDB_RELEASE_VERSION}-examples.jar:.
install:
#Install dependencies
- pip install -r requirements.txt
- sudo pip2 install jsondiff
- sudo apt-get -y install lcov mpich zlib1g-dev libssl-dev rsync cmake uuid-dev libcurl4-openssl-dev
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo add-apt-repository -y ppa:openjdk-r/ppa
- sudo apt-get update -q
- sudo apt-get install g++-4.9 -y
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 60
- sudo apt-get install libdbi-dev libdbd-pgsql -y
- sudo apt-get -y install openjdk-8-jdk icedtea-plugin
- jdk_switcher use openjdk8
- echo $JAVA_HOME
- export PATH=$JAVA_HOME/bin:$PATH
- which javac && javac -version
- which java && java -version
#Copy protobuf binaries
- wget https://github.com/Intel-HLS/GenomicsDB/releases/download/0.4.0/protobuf-3.0.2-trusty.tar.gz -O protobuf-3.0.2-trusty.tar.gz
- tar xzf protobuf-3.0.2-trusty.tar.gz && sudo rsync -a protobuf-3.0.2-trusty/ /usr/
#install gtest
#- sudo apt-get -y install libgtest0 libgtest-dev
# above package (libgtest0) not built for 14.04
- sudo apt-get -y install libgtest-dev
- cd /usr/src/gtest
- sudo cmake . -DBUILD_SHARED_LIBS=1
- sudo make
- sudo mv libgtest* /usr/lib
#Install libcsv
- cd $TRAVIS_BUILD_DIR
- cd dependencies && git clone https://github.com/rgamble/libcsv && cd libcsv && ./configure && make
- cd $TRAVIS_BUILD_DIR
# install lcov to coveralls conversion + upload tool
- gem install coveralls-lcov
- mkdir -p $GENOMICSDB_BUILD_DIR
before_script:
- cd $GENOMICSDB_BUILD_DIR && lcov --directory . --zerocounters
- psql -U postgres -c 'create database gendb'
- psql -U postgres gendb < $TRAVIS_BUILD_DIR/src/resources/gendb_state_for_tests.txt
- psql gendb -U postgres -c 'select count(*) from reference'
script:
#- pylint $TRAVIS_BUILD_DIR/docker/vcf_combiner/usr/bin/combine_vcf.py
- pytest $TRAVIS_BUILD_DIR/docker/vcf_combiner/usr/bin/combine_vcf.py
- cd $GENOMICSDB_BUILD_DIR
- cmake $TRAVIS_BUILD_DIR -DBUILD_JAVA=1 -DCMAKE_BUILD_TYPE=Coverage -DCMAKE_INSTALL_PREFIX=$GENOMICSDB_INSTALL_DIR -DLIBCSV_DIR=$TRAVIS_BUILD_DIR/dependencies/libcsv -DGENOMICSDB_RELEASE_VERSION=$GENOMICSDB_RELEASE_VERSION -DMAVEN_QUIET=True -DENABLE_LIBCURL=True
- ln -s $TRAVIS_BUILD_DIR/tests
- make -j 4 && make install && make test ARGS=-V
after_success:
- cd $GENOMICSDB_INSTALL_DIR && lcov --list tests/coverage.info # debug before upload
#- coveralls-lcov --repo-token ${COVERALLS_TOKEN} tests/coverage.info # uploads to coveralls