forked from icyphy/ptII
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
285 lines (247 loc) · 13.3 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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
# Configure requires $PTII
env:
matrix:
# Run separate jobs with these variables. The name of the
# variable corresponds with the target name in $PTII/build.xml and
# should be alphabetical.
- PT_TRAVIS_BUILD_ALL=true
# Don't include PT_TRAVIS_CLEAN=true here, we run it as a separate
# clean stage before running the tests.
# - PT_TRAVIS_CLEAN=true
- PT_TRAVIS_DOCS=true
# - PT_TRAVIS_PRIME_INSTALLER=true
- PT_TRAVIS_TEST_CAPECODE1_XML=true
- PT_TRAVIS_TEST_CAPECODE2_XML=true
- PT_TRAVIS_TEST_CAPECODE3_XML=true
- PT_TRAVIS_TEST_CORE1_XML=true
- PT_TRAVIS_TEST_CORE2_XML=true
- PT_TRAVIS_TEST_CORE3_XML=true
- PT_TRAVIS_TEST_CORE4_XML=true
- PT_TRAVIS_TEST_CORE5_XML=true
- PT_TRAVIS_TEST_EXPORT1_XML=true
- PT_TRAVIS_TEST_EXPORT2_XML=true
- PT_TRAVIS_TEST_EXPORT3_XML=true
- PT_TRAVIS_TEST_EXPORT4_XML=true
- PT_TRAVIS_TEST_EXPORT5_XML=true
- PT_TRAVIS_TEST_EXPORT6_XML=true
- PT_TRAVIS_TEST_EXPORT7_XML=true
# Building the installers tends to fail in deployment, so do this last.
# - PT_TRAVIS_TEST_INSTALLERS=true
# - PT_TRAVIS_TEST_REPORT_SHORT=true
global:
# Environment variables shared between all builds(in alphabetical order)
- PTII=${TRAVIS_BUILD_DIR}
- ANT_OPTS=-Xmx2048m
- BCVTB_HOME=${TRAVIS_BUILD_DIR}/lbnl
# GeoCoding
- secure: "kw7ZvdNDOSg6i4+b0oaSwuZbmuQKli87FjpS5UfOL3LdhjLaJlhft8aDc2ZLuiDxtCmB3X45Y+2M+ncqlRZULj0nRxz9OnVD6nQdgM2FPKBBmgZ2Z9/e/4MwD/3GcpnNs9rmW+3DXDMbMSc7nqYgYDKwws9x7KvF3hzrs0jj1ZvxUV/F1O9jCyyKzPJgaW46mQ9VrZi0xgl9Qn+8hccx8Z9G8XL/A3M/dCwaKUbaGk56+63GLNX62T20LQOQCJVgSztVkV/GLgmAnekwPBWuQ9UvaaQAiJFRbWpWz7qzgz5qL94zhHeew79iv+0jPgyjgTQSc0Sv2BNuTfY0GZbr5yvHFgxPNcvtCBwHmqQLB5r6VT0kuYaXXIMNs2yvU0DQvgnIVen9PFR9Euui3/qKY5/cHyYbI8n+2xtZHnideR3C9lbWSOih4H58f0W3Gf9jgPeCGI1jRuuR+fSUxD2pkHMDskBvEodlrKc+g0mSdybIuPGF0l8qMPyIuRMbuMgHaJA4zYBmKSUrL7w599SuteKKbZXcLXL8YkEjE8old+q2Ajdu9UA5NRFEmqs/YtqaJEBZnMh3IFCsXDXlfQQWFLuC9L1ShBC2tJYei8N7aEuuPECBelPjKr3F+QRpAjpRrCvU9bxwWsfJqBARQc2Ktsxg1RHzxGERpBSWfvT9YlA="
- LD_LIBRARY_PATH=/usr/lib/jni:/usr/local/share/OpenCV/java/:/usr/share/OpenCV/java:${LD_LIBRARY_PATH}
- PT_NO_NET=true
# CERTI_HOME is set by org/hlacerti/build-certi.sh below, so we use a slightly different variable here.
- CERTI_HOME_TRAVIS=${HOME}/pthla/certi-tools
- PATH=${PTII}/bin:${CERTI_HOME_TRAVIS}/bin:${PATH}
# Heartbeat
- secure: "yFRoAj3VTJs0ue19oKxJ8qxjM/LbthiJFx/iTJiUK1PPVWeOQpBlraXnhSEtefxNq7KXnXJY1OjQpTbr+j9hFipxOjoGgAGU7rv3iOCKP9ttdlnzUrsyu7iXSx/xoyQPRpnCiJBrgl839PzpolzF0dGeTfwtjXKO0d4YF8YUn7a9QJesqh0vxjnmxcHcdfJnaufzw9uUQpggrJInrtnp8B+WWH24RJpeJhlE/cOzi1SZIlhsCBaNGr11N6iJWoUvyv/lkw1fbVJRgUIRP5kN9bwAUQ7azcXB0cpgpa3RHP8fybBGGM2yVhR+RNwxuLKwF6Zqm38qq3ty1YVSWprgX/HGvAeyC0voFyuj3XhvFqMKSICNB7kjIfjbnjRrPgbIiCDCXukFejII+jvJ7bXgmZqgk7SBP8FtugEX4hIMy6PoxUf9pLPRyUAugqPGbNg5SSE2zLUKGtnT/VizeMeHZjd0tArlKdZkN6s1+oO3EmG5LtyYtwczVIsc6YxXunyXxZfNxI1GBfUDHyAKRMhK0JXBIrj/aLSs11KmkNOytU3qghXl8oChLbnV2YnkwPl2J6qCcYNlubVpHlsQgO51LuPaU3tpvxp4TZ0qZhTPvmGucqfD/tjL/ztK+t0FtvElOZZd981wy9Irok9m1X19tavY4dsaiVTDzehQZUeaxaY="
# SpaceCadet
- secure: "rF8A4+P8J7oQe7VUOxD1Ei70U04kZu5RBHI9I2PICQwBM5op8Jl+sG/me83FH1txDEv2q3dov8BjbFotZGRQ//wHntmkvzGomxUkjiMGtg42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1qmxRo57av8gJQRCDbvnveAe38cD/db3wNi5VFws+flC/x2orXnfUiyjPO/Y9WayfTLopusIicdYaydiPI/afakH3tVZds0C9kKAlRZPWvrq6/llTKcMmJqVTHO48wuFkU+pC5ziyIBDjGggfS1exqLX8ahiM2QOfABIQh1qw6D+x/M1BJ85ul/2vxPAEjHmA7Fmg0Usa4X0G4="
language: node_js
# Node 8 breaks npm horribly, see http://www.accessors.org/wiki/Notes/Npm5
node_js:
- "7"
addons:
ssh_known_hosts: localhost
# Need X11 to create the DOP Center map and for testing.
before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
# Add npm to path for AccessorSSHCodeGenerator.tcl
- echo "export PTII=$PTII; export PATH=$PTII/bin:\${PATH}" >> ~/.bashrc
- echo "export PTII=$PTII; export PATH=$PTII/bin:\${PATH}" >> ~/.bash_profile
- cat ~/.bashrc
- cat ~/.bash_profile
install:
# We keep logs in a directory to avoid the 10k line problem.
- mkdir -p $PTII/logs $PTII/reports/junit
- echo $HOME
- echo "Created by Travis-ci" > $HOME/README.md
- ls -l $HOME
# Avoid "Package libdc1394-22-dev is not available, but is referred to by another package."
# See https://github.com/travis-ci/travis-ci/issues/5221
- sudo apt-get update
# Below are the packages that are needed, in alphabetical order:
# coreutils for timeout, used by ptIITravisBuild.sh
# genisoimage for building Darwin dmg files under Linux.
# eclipse and eclipse-rcp for backtracking.
# Java3D
# libv4l for Bridj for the camera.
# p7zip-full for installing jogl as part of the installers.
# pdflatex for the DOP Center image.
- sudo apt-get install -y coreutils genisoimage eclipse eclipse-rcp libjava3d-java libv4l-dev p7zip-full texlive-latex-base || true
# Install JAI. If the wget fails, then don't stop the build.
- if [ ! -f $PTII/vendors/jai-1_1_2_01/lib/jai_core.jar ]; then wget --quiet --no-cookies --header Cookie:\ oraclelicense=accept-securebackup-cookie http://download.oracle.com/otn-pub/java/jai/1.1.2_01-fcs/jai-1_1_2_01-lib-linux-i586.tar.gz -O /tmp/jai.tar.gz || true; if [ -f /tmp/jai.tar.gz ] ; then (cd vendors; tar -zxvf /tmp/jai.tar.gz) fi; fi
# Install JMF. If the wget fails, then don't stop the build.
- ls $PTII/vendors/JMF-2.1.1e || true
- if [ ! -f $PTII/vendors/JMF-2.1.1e/lib/jmf.jar ]; then wget --quiet --no-cookies --header Cookie:\ oraclelicense=accept-securebackup-cookie http://download.oracle.com/otn-pub/java/jmf/2.1.1e/jmf-2_1_1e-alljava.zip -O /tmp/jmf.zip || true; if [ -f /tmp/jmf.zip ] ; then (cd vendors; unzip /tmp/jmf.zip) fi; fi
# Install Sphinx for the speech recognition accessor
- if [ ! -d $PTII/vendors/misc/sphinx4 ]; then mkdir $PTII/vendors/misc/sphinx4; fi
- if [ ! -f $PTII/vendors/misc/sphinx4/sphinx4-core-5prealpha.jar ]; then wget --quiet -O $PTII/vendors/misc/sphinx4/sphinx4-core-5prealpha.jar 'https://oss.sonatype.org/service/local/artifact/maven/redirect?r=releases&g=net.sf.phat&a=sphinx4-core&v=5prealpha&e=jar' || true; fi
- if [ ! -f $PTII/vendors/misc/sphinx4/sphinx4-data-5prealpha.jar ]; then wget --quiet -O $PTII/vendors/misc/sphinx4/sphinx4-data-5prealpha.jar 'https://oss.sonatype.org/service/local/artifact/maven/redirect?r=releases&g=net.sf.phat&a=sphinx4-data&v=5prealpha&e=jar' || true; fi
# Needed for building installers.
- sudo ln -s /bin/tar /usr/local/bin/tar
# Longer running installations:
# Use the Travis cache, see https://docs.travis-ci.com/user/cachingp
- sudo -E $PTII/org/ptolemy/opencv/travis_build_opencv.sh
# If ${CERTI_HOME_TRAVIS}/share/scripts/myCERTI_env.sh does not exist, then download and build CERTI.
# Building CERTI will result in a log of more than 10,000 lines, so we just show the last 50.
- sudo -E org/hlacerti/build-certi.sh >& /tmp/build-certi.out || true
- tail -50 /tmp/build-certi.out
- source ${CERTI_HOME_TRAVIS}/share/scripts/myCERTI_env.sh || true
# - echo "CERTI_HOME: $CERTI_HOME" || true
# List the contents of vendors and cached directories
- ls $PTII/vendors
- ls -l $PTII/vendors/adm/gen-11.0/node || true
- ls -l $PTII/vendors/installer || true
- ls -l $PTII/vendors/jai-1_1_2_01 || true
- ls -l $PTII/vendors/JMF-2.1.1e || true
- ls -l $PTII/vendors/jogl || true
- ls -l $PTII/vendors/misc/sphinx4 || true
- ls -l $PTII/vendors/opencv || true
- ls -l $PTII/vendors/opencv/share/OpenCV/java || true
- ls -l $CERTI_HOME_TRAVIS || true
# Display environment variables
- env | sort
- ./configure --enable-verbose
# Set up and test 'ssh localhost' for $PTII/ptolemy/cg/kernel/generic/accessor/test/AccessorSSHCodeGenerator.tcl
- ssh-keygen -N '' -f ~/.ssh/id_rsa
- cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
- ssh localhost cat /etc/issue
- sudo ln -s `which npm` /usr/local/bin/npm
- sudo ln -s `which node` /usr/local/bin/node
- ssh localhost npm --version || true
script:
- ant clean >& $PTII/logs/ant_clean.txt
# travis_wait does not help here because we want to redirect the output of cmake.
# See https://github.com/travis-ci/travis-ci/issues/4190
# Echo status messages so that Travis knows we are alive.
# If you need to get status about available memory, insert "free -m" inside the loop.
- while sleep 1m; do echo "=====[ $SECONDS seconds still running ]====="; done &
- echo "About to call ptIITravisBuild.sh at $SECONDS seconds."
- $PTII/bin/ptIITravisBuild.sh $SECONDS
- echo "Done with ptIITravisBuild.sh at $SECONDS seconds."
# Killing background sleep loop.
- kill %1
# Below is the order of the stages.
# See https://docs.travis-ci.com/user/build-stages/ and
# https://docs.travis-ci.com/user/build-stages/matrix-expansion/
stages:
#
# The clean stage runs first to remove JUnit output from the gh-pages branch.
- clean
#
# Most of the targets in the test stage only run if the job is a cron
# job or RUN_TESTS=true.
- test
#
# The report stage should be run before installers because deploying
# installers might fail.
- report
- installers
- deploy
# Below are the definitions for the stages.
jobs:
include:
#
# Clean the gh-pages branch of JUnit output before running the tests.
- stage: clean
script: $PTII/bin/ptIITravisBuild.sh $SECONDS
env: PT_TRAVIS_CLEAN=true
#
# The test stage uses the script target above.
## - stage: test
#
# Run "ant junitreport" in the gh-branch, which uses a different
# build.xml than $PTII.
- stage: report
script: $PTII/bin/ptIITravisBuild.sh $SECONDS
env: PT_TRAVIS_JUNITREPORT=true
#
# Build the installers last because it might fail.
- stage: installers
script:
- while sleep 1m; do echo "=====[ $SECONDS seconds still running ]====="; done &
- echo "About to call ptIITravisBuild.sh at $SECONDS seconds."
- $PTII/bin/ptIITravisBuild.sh $SECONDS
- echo "Done with ptIITravisBuild.sh at $SECONDS seconds."
# Killing background sleep loop.
- kill %1
env: PT_TRAVIS_TEST_INSTALLERS=true
# See https://docs.travis-ci.com/user/caching
cache:
directories:
- $PTII/vendors/adm/gen-11.0/node
- $CERTI_HOME_TRAVIS
- $PTII/vendors/installer
- $PTII/vendors/jai-1_1_2_01
- $PTII/vendors/JMF-2.1.1e
- $PTII/vendors/jogl
- $PTII/vendors/misc/sphinx4
- $PTII/vendors/opencv
deploy:
# If PT_TRAVIS_TEST_CORE2_XML == true, then copy the SpaceCadet files
- provider: releases
api_key: $GITHUB_TOKEN
file_glob: true
file:
- $PTII/ptolemy/domains/space/demo/DOPCenter/DOPCenter.png
- $PTII/ptolemy/domains/space/demo/DOPCenter/DOP.csv
- $PTII/ptolemy/domains/space/demo/DOPCenter/Placard.tex
- $PTII/ptolemy/domains/space/demo/DOPCenter/Placard.pdf
on:
tags: true
condition: $PT_TRAVIS_TEST_CORE2_XML = true
overwrite: true
skip_cleanup: true
verbose: true
# If PT_TRAVIS_DOCS == true, then update codeDoc tar files.
- provider: releases
api_key: $GITHUB_TOKEN
file_glob: true
file:
- $PTII/doc/codeDoc*.jar
on:
tags: true
condition: $PT_TRAVIS_DOCS = true
overwrite: true
skip_cleanup: true
verbose: true
# If PT_TRAVIS_TEST_INSTALLERS == true, then deploy the installers
# If this errors out with timeouts, then see
# https://github.com/travis-ci/dpl/issues/796
- provider: releases
api_key: $GITHUB_TOKEN
file_glob: true
file:
- $PTII/adm/gen-11.0/capecode0.2.devel.setup.linux.tar.gz
- $PTII/adm/gen-11.0/capecode0.2.devel.setup.mac.app.tar.gz
- $PTII/adm/gen-11.0/capecode0_2_devel_setup_windows_64.exe
- $PTII/adm/gen-11.0/ptII11.0.devel.setup.linux.tar.gz
- $PTII/adm/gen-11.0/ptII11.0.devel.setup.mac.app.tar.gz
- $PTII/adm/gen-11.0/ptII11_0_devel_setup_windows_64.exe
- $PTII/adm/gen-11.0/ptII11_0_devel_setup_windows.exe
- $PTII/adm/gen-11.0/ptII11.0.devel.src.tar
- $PTII/adm/gen-11.0/ptII11.0.devel.src.zip
on:
tags: true
condition: $PT_TRAVIS_TEST_INSTALLERS = true
overwrite: true
skip_cleanup: true
verbose: true
notifications:
email:
recipients:
- cxh@eecs.berkeley.edu
on_success: always # default: change
on_failure: always # default: always