-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (66 loc) · 3.86 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
language: cpp
dist: bionic
addons:
apt:
packages:
- libjemalloc-dev
script:
# Build and run unit tests
- |
set -exo pipefail
# use the Dockerfile to build the glnexus_tests container
effective_build_type=$TRAVIS_BUILD_TYPE
if [ "$effective_build_type" == "Valgrind" ]; then
effective_build_type="Release"
fi
docker build --no-cache -t glnexus_tests --target builder --build-arg build_type=$effective_build_type .
# copy the /GLnexus folder out of the image to mount for subsequent use
docker run --rm -v /:/io glnexus_tests cp -r /GLnexus/ /io
# Run the tests (with valgrind or coveralls as appropriate)
if [ "$TRAVIS_BUILD_TYPE" == "Valgrind" ]; then
docker run --rm -e ROCKSDB_VALGRIND_RUN=1 -v /GLnexus:/GLnexus glnexus_tests bash -ex -o pipefail -c "valgrind --soname-synonyms=somalloc=*jemalloc* --suppressions=test/GLnexus.supp --leak-check=full --gen-suppressions=all --error-exitcode=1 ./unit_tests -d yes"
else
docker run --rm -v /GLnexus:/GLnexus glnexus_tests
sudo chown -R $USER /GLnexus
if [ "$TRAVIS_BUILD_TYPE" == "Coverage" ]; then
sudo pip install -U cpp-coveralls
pushd /GLnexus && coveralls --include src --include include --gcov-options '\-lp' && popd
else
/GLnexus/glnexus_cli -h
/GLnexus/test/jemalloc_linking.sh
fi
fi
if [ "$TRAVIS_BUILD_TYPE" == "Release" ]; then
# build the minimal docker image with glnexus_cli & jemalloc, push it to quay.io
dockertag="quay.io/mlin/glnexus:$(git describe --tags)"
docker build -t $dockertag .
docker run $dockertag glnexus_cli -h 2>&1 | grep 'detected jemalloc'
set +x
if [ -n "${QUAY_PASSWORD:-}" ]; then
echo "$QUAY_PASSWORD" | docker login -u="mlin+glnexus" --password-stdin quay.io
docker push $dockertag
fi
set -x
fi
env:
global:
# QUAY_PASSWORD for https://quay.io/repository/mlin/glnexus
- secure: "YHCWM0zdAWNUyyQfmXZyfl/y07lHMPxyHQJaklmql6jFZTITFveNgDE5wXse4AppayPd5pB/ApYjvDm0es/K0aYl6U6uKB84VhajiIeSjOnbZ/ggTJ5ysD3ZenGVjLKiBu3uuZOMcOcVpZG5zD4awmzQskaSuqhC4uj/fYFPsRb17Xn69siySjGHS5QCbriZPaMgA6f4stccGG0e8T08vIg/E/MZqrRhUcLFCCHl8L2KeFaooGUXegHry7kUWWd52sv6edZ+/1svE/L7MEm00IC570TzTGpMGzw6mWhRV6eoEt5F3wsPd3zfPOISf73REDYlySnek3SMO2oP11zAWof7GMGitxS3/RHTEDeQ29ndLsh2QLRCAdvJLAJ25aNZc0AUCpx7U0ifXHmOyg5VmZpKUCbktas/LK4kJ0MaKySpIGO9U3VxFYuo8i4NCC4ECuM+O1NUjR6FneaKBDg0f5JjCIZO6HxdKZHax6iK827FHX2uJk2VgVhRm0+zNRGENq8np595JUlm9V0ona6tJgpIMwGCR8ZjZpPGKoayztkcWifr6iQnl+tFY6YFlY3EshVjTTnwr3sFRgP6drVkXPvTC7y3IbtmIEpLE4Ok6S5l1nrob8leHGw26Q0NNuJ7oUcYJtw8y7RoO4/SSwm1oEOSXBRjI5i1nsg0QnTQQXY="
matrix:
include:
- env: TRAVIS_BUILD_TYPE=Debug
- env: TRAVIS_BUILD_TYPE=Coverage
- env: TRAVIS_BUILD_TYPE=Valgrind
- env: TRAVIS_BUILD_TYPE=Release
# NB: some warnings we set to errors are detected only in Release mode (with
# compiler optimizations on). http://stackoverflow.com/q/11061970
deploy:
provider: releases
api_key:
secure: OXrWL2sImjEpPDpFnKhhdpccklYauXAGtErJHjVMc8VJtjsHt4xhsIpPUytdnOH0sbdno8PLEy0Tb3C4Ff5Xq82WU7B5TrYdRzEvq14i/Y+eiqDOUfI7ttvCJwQHjvD01/B/1qFLV9Mz1lR/dkR7NXr+e7GNEStjq1OeiyXYb6WSkFomW73yiNb084h/6wetRGx/o3Jnrcs56vBQyq3GpQc18GpDiBskZoEf9Z1SJXwfcRXKTsUJC6M95ZaRktBS09eVrr0c9zRW4meg4+Hb5dQlNItD8TUSt4Qz5Ilyzwvo7TpWtAKatVgU0xd8K+EDuFebwUOP3HbAje8m3kIbppkqvved5tfDEjw3vOaCUimoYCx2W6JXlhxct42VbesBexnZt0zLvxhR4bGv3p0Dckf1XgL2cK+IUie1VNcewHMCUGlwQBLDdcr2i8SLmWvYyyrp/k1d2KailmLCnwQbl3/eAtyGOEQtEamt3Fshd8Qs9806tw9ZfgKjNex3ELTEFHCWAatcsgANcP6QZfxl6kqKVTIbid0WjhW6270bAs5+Bu/bo8Tx2xWoWwZNXllyYg2fxVurcdyZQ5DCmyyMQIA5+fWq8RIbmkqpV+LhDHZKgeKimwzKYb2rLr6IYLXTh99LuotLGojQSXnq/qGukYuFjC4azAjaP3ca63wNwUU=
file: /GLnexus/glnexus_cli
skip_cleanup: true
on:
repo: dnanexus-rnd/GLnexus
tags: true
condition: "$TRAVIS_BUILD_TYPE == Release"