-
Notifications
You must be signed in to change notification settings - Fork 67
/
.travis.yml
240 lines (223 loc) · 9.59 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
dist: trusty
os: linux
git:
depth: 150
env:
global:
- CACHE_DIR="$HOME/misc_cache"
- MINICONDA_DIR="$HOME/miniconda"
- PIP_DIR="$HOME/virtualenv"
- GATK_PATH="$CACHE_DIR"
- PYTHONIOENCODING=UTF8
- PYTEST_ADDOPTS="-rsxX -n 2 --durations=25 --fixture-durations=10 --junit-xml=pytest.xml --cov-report= --cov broad_utils --cov illumina --cov assembly --cov interhost --cov intrahost --cov metagenomics --cov ncbi --cov read_utils --cov kmer_utils --cov reports --cov taxon_filter --cov tools --cov util --cov file_utils"
- DOCKER_REGISTRY="quay.io"
- DOCKER_REPO_PROD="quay.io/broadinstitute/viral-ngs"
- DOCKER_REPO_DEV="quay.io/broadinstitute/viral-ngs-dev"
- DOCKER_REGISTRY_MIRROR="docker.io"
- DOCKER_REPO_PROD_MIRROR="broadinstitute/viral-ngs"
- BOTO_CONFIG=/dev/null # bogus value to override config on travis
- _JAVA_OPTIONS="-Xmx3g" # overrides jvm opts set elsewhere; see: https://stackoverflow.com/questions/28327620/difference-between-java-options-java-tool-options-and-java-opts
cache:
directories:
- $HOME/misc_cache
- $HOME/miniconda
timeout: 1000
#stages:
# - build
# - test
jobs:
fast_finish: true
include:
- language: java
jdk: openjdk8
sudo: required
addons:
apt:
packages:
- docker-ce
env:
- TRAVIS_JOB=docker_wdl
# DOCKER_USER (for Quay.io)
- secure: "A+Ej5Xa/BKWkcGl1DSWTZCvchaanKE0/7NuPnNtT+PA4xVoM4w8Rj4e4fBBclCcCH+y0hg4pkS8UptB7NjLVdXXn/ytFNcLj7asuaPxheOLIRddQ0fGEVpYeM3ZCU25Mb8LI1nQECpJMl1TE4HaxOVunfN7MSxo1SQ0GlQ98YGo="
# DOCKER_PASS (for Quay.io)
- secure: "V+2MVaKXpMdno91MIF8fTqsRORT4GyheeVXzjVSC28IlyMntGe5N0wBI0nC/NdfQD3DH7MYRltDH/CgE2kcu1tWNGQK9hupClBzxz2X++md995DeyV+fTdkVnsQIYIrLfq/Lw0PuO3gYX7UATur1jevewpf+LbL7/Ar2mYE2pgY="
## DOCKER_USER_MIRROR (for DockerHub)
- secure: "cEf0IdgJapIVX+rchN/Q+PgCYFXmUjfBBATlOt6KSQfozGc3YvT8BxtIaRj5v+fARc/gymBPfy2ZWfaLG9jWMdbjML7NIfMl2gRAHDuJSerl6xlYWrioIPe0zs7pBPT0JyRjqi0Gt9VJltn6CUBSbqK32TheLAKA1YJJqWoQOWo="
## DOCKER_PASS_MIRROR (for DockerHub)
- secure: "Vzm7gwu/h1Gg8wg4ulYipSmdW0BMT7n0DIi8Pf6AgNFle1dvW7/LC21rHOQbI+ClJj7nV9v/Qv/nkbpbH7XmJ/F/dW5B7mf07mmk2VR+Ncl0ThOEsSWBQF6Md4HTnU3fUREvTxY17AgMjSKx6ErppirNetmnmJ4Ogcusv4N33Fo="
# DX_API_TOKEN (for DNAnexus builds)
- secure: "BnUw6ceEClSBFJjZgCy6GebD1ENxaHp3En05maWExdx0xyCb+T09XM1BrsCpPOv25npVUt8Q/YB6YpAiSGMT+RUwdiGj4OtaJb+I3HY/2fT1P7eCIEVITQhtGy5e/vFnavSk0eKzCV09z94c1kqjG3JnTocpPUa1W3JBxVr96vs="
- DX_PROJECT=project-F8PQ6380xf5bK0Qk0YPjB17P
install:
#- travis/upgrade-docker.sh
- travis/install-wdl.sh
- travis/install-gatk.sh
script:
- set -e
# pull old docker image
- if [ -f "$CACHE_DIR/old-docker-tag.txt" ]; then OLD_DOCKER_TAG=$(cat $CACHE_DIR/old-docker-tag.txt); else OLD_DOCKER_TAG=$DOCKER_REPO_PROD; fi; echo "old docker tag = $OLD_DOCKER_TAG"
- if docker pull $OLD_DOCKER_TAG; then _CACHE_FROM="--cache-from $OLD_DOCKER_TAG"; else _CACHE_FROM=""; fi
# build new docker image
- docker build -t local/viral-ngs:build $_CACHE_FROM .;
# run tests using the docker image
- travis/tests-docker.sh
# deploy docker image
- travis/deploy-docker.sh
# version and validate WDL code
- travis/version-wdl-runtimes.sh
- travis/validate-wdl.sh
# build DNAnexus pipelines and launch a few test executions
- travis/build-dx.sh
- travis/tests-dx.sh
#- if [ "$TRAVIS_BRANCH" = "master" ]; then travis/tests-dx.sh; fi
# test Cromwell local execution engine
- travis/tests-cromwell.sh
before_cache:
- travis/list-docker-tags.sh | tail -1 > $CACHE_DIR/old-docker-tag.txt
#- language: generic
# stage: build
# env:
# - TRAVIS_JOB=build_docker
# # DOCKER_USER
# - secure: hYX8492Wqpq3yqv+eHBV9c6VY8JlUSS8mUDfT1eWNEZF2vw8WrnTt8SrLIPC8etQUk1ZaSI/8XbJQKEr9LRqgvuO07AIv6BxYCg9l9BPHCj6B2YTTPo2qPkPapfvtGVd7PUZcWDUvzvPxJqMveuKVkTnCuuQSWwR68Y/Khxj8UY=
# # DOCKER_PASS
# - secure: QYylIMLvn1op6d//5yBD7KpquNxK/+xxQxIJLXWFgIl08sdT/MvrI6edgm3k8CumS7735eSV6C+KGOkF9JqM12aGUK/3PPckFGY+h/j4zQX26taT+6221ozbzF6hqYk6qm86FT5QVkBFLxsoDvt0Sh+1FPeVsWJf0o9yrLTrj2E=
# install: travis/upgrade-docker.sh
# script:
# - set -e
# - if [ -f "$CACHE_DIR/old-docker-tag.txt" ]; then OLD_DOCKER_TAG=$(cat $CACHE_DIR/old-docker-tag.txt); else OLD_DOCKER_TAG=$DOCKER_REPO_PROD; fi; echo "old docker tag = $OLD_DOCKER_TAG"
# - if docker pull $OLD_DOCKER_TAG; then _CACHE_FROM="--cache-from $OLD_DOCKER_TAG"; else _CACHE_FROM=""; fi
# - travis_wait docker build -t local/viral-ngs:build $_CACHE_FROM .;
# - travis/deploy-docker.sh
# before_cache:
# - travis/list-docker-tags.sh | tail -1 > $CACHE_DIR/old-docker-tag.txt
#
#- language: java
# jdk: openjdk8
# stage: build
# env:
# - TRAVIS_JOB=build_dxWDL
# # DX_API_TOKEN (for DNAnexus builds)
# - secure: "IPvLIQudIRyUl8iLNLujDig1afV+2v8AtRHpw0LsbL45xr0TvkmqjoHRmkYDnbdEeVdGC91ydLwfLNXcU/Cn7KRuIPE3InYX6VeomVO87aIXUzmmBCdFNGKd6o0u6Q/T+oJxemXwztW9XpKx3yT4RdLj7/zEpXnJm07/mKiquZE="
# - DX_PROJECT=project-F856jv809y3VkzyFGkKqX367
# install:
# - travis/install-wdl.sh
# script:
# - travis/version-wdl-runtimes.sh
# - travis/validate-wdl.sh
# - travis/build-dx.sh
#- language: java
# jdk: openjdk8
# stage: test
# env:
# - TRAVIS_JOB=test_cromwell
# install:
# - DOCKER_TAG=`travis/list-docker-tags.sh | tail -1`
# - docker pull $DOCKER_TAG
# - travis/install-gatk.sh
# - travis/install-wdl.sh
# script:
# - travis/version-wdl-runtimes.sh
# - travis/validate-wdl.sh
# - travis/tests-cromwell.sh
- language: python
sudo: false
#stage: build
env: TRAVIS_JOB=build_docs
install: travis/install-pip-docs.sh
script: travis/build-docs.sh
- language: python
python: 3.6
sudo: required
#stage: test
env:
- TRAVIS_JOB=build_conda
# $ANACONDA_TOKEN for uploading builds to anaconda.org ("broad-viral" channel)
- secure: "cDKRuVUr2NMZk933RHMMYKDCfU2gZfe3VJLNG82zsj47rrfoRzUsDny71v27OuydgjICiBWGuFAl4alNBVkzQWGt7G1DaFVLn48SwqtnG4u0KAUVX32b/0sw7OrXRDDqD5pr5Q8J59xwxSKQmmXFXlMbZpSEeREf8c3Yn6pvm2c="
install:
- source travis/install-conda.sh
- travis/install-conda-build.sh
script:
- travis/build-conda.sh
before_cache:
- conda clean --all --yes
- language: python
python: 3.6
#stage: test
sudo: required
env:
- TRAVIS_JOB=test_py36
before_install: travis/before_install.sh
install:
- source travis/install-conda.sh
- travis/install-gatk.sh
- travis/install-tools.sh
- source travis/activate-conda.sh
script:
- travis/tests-long.sh
- travis/tests-unit.sh
after_success:
- coveralls
before_cache:
- conda clean --all --yes
- language: python
python: 3.6
#stage: test
sudo: required
env:
- TRAVIS_JOB=test_snakemake
before_install: travis/before_install.sh
install:
- source travis/install-conda.sh
- travis/install-gatk.sh
- travis/install-tools.sh
- source travis/activate-conda.sh
script:
- travis/tests-snakemake.sh
after_success:
- coveralls
before_cache:
- conda clean --all --yes
#- language: python
# stage: test
# env:
# - TRAVIS_JOB=test_py36_in_docker
# install:
# - DOCKER_TAG=`travis/list-docker-tags.sh | tail -1`
# - docker pull $DOCKER_TAG
# - travis/install-gatk.sh
# - pip install coveralls==1.1
# - mkdir coverage
# script:
# - docker run -e _JAVA_OPTIONS -e PYTEST_ADDOPTS -v $GATK_PATH:/gatk -v coverage:/coverage --entrypoint /bin/bash $DOCKER_TAG -c 'set -e; cd /opt/viral-ngs/source; gatk3-register /gatk/GenomeAnalysisTK.jar; pytest test/integration test/unit; cp .coverage /coverage'
# after_success:
# - mv coverage/.coverage .
# - coveralls
#
#- language: generic
# stage: test
# env:
# - TRAVIS_JOB=build_conda_in_docker
# # $ANACONDA_TOKEN for uploading builds to anaconda.org ("broad-viral" channel)
# - secure: "cDKRuVUr2NMZk933RHMMYKDCfU2gZfe3VJLNG82zsj47rrfoRzUsDny71v27OuydgjICiBWGuFAl4alNBVkzQWGt7G1DaFVLn48SwqtnG4u0KAUVX32b/0sw7OrXRDDqD5pr5Q8J59xwxSKQmmXFXlMbZpSEeREf8c3Yn6pvm2c="
# install:
# - DOCKER_TAG=`travis/list-docker-tags.sh | tail -1`
# - docker pull $DOCKER_TAG
# - travis/install-gatk.sh
# script:
# - docker run -v $GATK_PATH:/gatk -e _JAVA_OPTIONS -e TRAVIS_BRANCH -e TRAVIS_PULL_REQUEST -e TRAVIS_TAG -e TRAVIS_COMMIT -e ANACONDA_TOKEN --entrypoint /bin/bash $DOCKER_TAG -c 'set -e; cd /opt/viral-ngs/source; gatk3-register /gatk/GenomeAnalysisTK.jar; travis/install-conda-build.sh; travis/build-conda.sh'
# - os: osx
# language: generic
# stage: test
# env:
# - TRAVIS_JOB=test_osx
# - TRAVIS_OSX_PYTHON_VERSION=py36
# - TRAVIS_PYTHON_VERSION=3.6
# before_install:
# - travis/before_install.sh
# # Under OSX, some versions of ruby seem to cause this error.
# # See: https://github.com/travis-ci/travis-ci/issues/6307
# - rvm get head
# after_script:
# # correct post-build failure on OSX due to non-zero exit code
# - set +e