4
4
export DEBIAN_FRONTEND=noninteractive
5
5
6
6
function travis_time_start {
7
- TRAVIS_START_TIME=$( date +%s)
7
+ if [ " $TRAVIS_OS_NAME " == " osx" ]; then
8
+ TRAVIS_START_TIME=$(( $(date +% s)* 1000000000 ))
9
+ else
10
+ TRAVIS_START_TIME=$( date +%s%N)
11
+ fi
8
12
TRAVIS_TIME_ID=$( cat /dev/urandom | LC_ALL=C LC_CTYPE=C tr -dc ' a-z0-9' | fold -w 8 | head -n 1)
9
13
TRAVIS_FOLD_NAME=$1
10
14
echo -e " \e[0Ktravis_fold:start:$TRAVIS_FOLD_NAME "
@@ -14,7 +18,11 @@ function travis_time_start {
14
18
function travis_time_end {
15
19
set +x # disable debug information
16
20
_COLOR=${1:- 32}
17
- TRAVIS_END_TIME=$( date +%s)
21
+ if [ " $TRAVIS_OS_NAME " == " osx" ]; then
22
+ TRAVIS_END_TIME=$(( $(date +% s)* 1000000000 ))
23
+ else
24
+ TRAVIS_END_TIME=$( date +%s%N)
25
+ fi
18
26
TIME_ELAPSED_SECONDS=$(( ($TRAVIS_END_TIME - $TRAVIS_START_TIME )/ 1000000000 ))
19
27
echo -e " travis_time:end:$TRAVIS_TIME_ID :start=$TRAVIS_START_TIME ,finish=$TRAVIS_END_TIME ,duration=$(( $TRAVIS_END_TIME - $TRAVIS_START_TIME )) \n\e[0K"
20
28
echo -e " travis_fold:end:$TRAVIS_FOLD_NAME "
@@ -28,7 +36,9 @@ if [ "$TRAVIS_OS_NAME" == "linux" ]; then
28
36
travis_time_end
29
37
30
38
travis_time_start setup.apt-get_install
31
- ret=1; while [ $ret != 0 ]; do sudo apt-get install -qq -y git make gcc g++ libjpeg-dev libxext-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev libpq-dev libpng-dev xfonts-100dpi xfonts-75dpi && ret=0 || echo " failed, retry" ; done # msttcorefonts could not install on 14.04 travis
39
+ ret=1; while [ $ret != 0 ]; do sudo apt-get install -qq -y git make gcc g++ libjpeg-dev libxext-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev libpq-dev libpng-dev xfonts-100dpi xfonts-75dpi pkg-config libbullet-dev && ret=0 || echo " failed, retry" ; done # msttcorefonts could not install on 14.04 travis
40
+ # unset protocol version https://github.com/juju/charm-tools/issues/532
41
+ git config --global --unset protocol.version || echo " OK"
32
42
if [ " ` uname -m` " == " x86_64" ] ; then sudo apt-get install -qq -y texlive-latex-base ptex-bin latex2html nkf poppler-utils || echo " ok" ; fi # 16.04 does ont have ptex bin
33
43
travis_time_end
34
44
@@ -38,16 +48,93 @@ if [ "$TRAVIS_OS_NAME" == "osx" ]; then
38
48
# skip if already installed
39
49
# https://discourse.brew.sh/t/skip-ignore-brew-install-if-package-is-already-installed/633/2
40
50
# brew install jpeg libpng mesalib-glw;
41
- brew list jpeg & > /dev/null || brew install jpeg
42
- brew list libpng & > /dev/null || brew install libpng
43
- brew list mesalib-glw & > /dev/null || brew install mesalib-glw
51
+ # use HOMEBREW_NO_AUT_UPDATE to fix unexpected keyword error https://travis-ci.community/t/syntax-error-unexpected-keyword-rescue-expecting-keyword-end-in-homebrew/5623
52
+ brew list jpeg & > /dev/null || HOMEBREW_NO_AUTO_UPDATE=1 brew install jpeg
53
+ brew list libpng & > /dev/null || HOMEBREW_NO_AUTO_UPDATE=1 brew install libpng
54
+ brew list mesalib-glw & > /dev/null || HOMEBREW_NO_AUTO_UPDATE=1 brew install mesalib-glw
55
+ brew list bullet & > /dev/null || HOMEBREW_NO_AUTO_UPDATE=1 brew install bullet
44
56
travis_time_end
45
57
46
58
fi
47
59
60
+ # ## for multiarch compile test
61
+ if [ " $QEMU " != " " ]; then
62
+ travis_time_start install.dpkg-dev
63
+ apt-get install -qq -y dpkg-dev
64
+ travis_time_end
65
+
66
+ echo " uname -a : $( uname -a) "
67
+ echo " uname -m : $( uname -m) "
68
+ echo " gcc -dumpmachine : $( gcc -dumpmachine) "
69
+ echo " gcc -dumpversion : $( gcc -dumpversion) "
70
+ echo " getconf LONG_BIT : $( getconf LONG_BIT) "
71
+
72
+ travis_time_start compile.euslisp
73
+ export EUSDIR=` pwd`
74
+ eval " $( dpkg-buildflags --export=sh) "
75
+ make -C lisp -f Makefile.Linux eus0 eus1 eus2 eusg eusx eusgl eus eusjpeg
76
+ travis_time_end
77
+
78
+ if [[ ` gcc -dumpmachine | egrep " ^(arm|aarch)" ` != " " ]]; then
79
+ export ARCHDIR=LinuxARM
80
+ elif [[ ` gcc -dumpmachine | egrep " ^x86_64" ` != " " ]]; then
81
+ export ARCHDIR=Linux64
82
+ else
83
+ export ARCHDIR=Linux
84
+ fi
85
+ export PATH=` pwd` /$ARCHDIR /bin:$PATH
86
+
87
+ export EXIT_STATUS=0;
88
+ set +e
89
+ # run test in EusLisp/test
90
+ for test_l in test/* .l; do
91
+
92
+ travis_time_start euslisp.${test_l##*/ } .test
93
+
94
+ sed -i ' s/\(i-max\ [0-9]000\)0*/\1/' $test_l
95
+
96
+ eusgl $test_l ;
97
+ export TMP_EXIT_STATUS=$?
98
+
99
+ travis_time_end ` expr 32 - $TMP_EXIT_STATUS `
100
+
101
+ export EXIT_STATUS=` expr $TMP_EXIT_STATUS + $EXIT_STATUS ` ;
102
+
103
+ travis_time_start compiled.${test_l##*/ } .test
104
+
105
+ eusgl " (let ((o (namestring (merge-pathnames \" .o\" \" $test_l \" ))) (so (namestring (merge-pathnames \" .so\" \" $test_l \" )))) (compile-file \" $test_l \" :o o) (if (probe-file so) (load so) (exit 1))))"
106
+ export TMP_EXIT_STATUS=$?
107
+
108
+ export CONTINUE=0
109
+ # const.l does not compilable https://github.com/euslisp/EusLisp/issues/318
110
+ if [[ $test_l =~ const.l ]]; then export CONTINUE=1; fi
111
+
112
+ if [[ $CONTINUE == 0 ]]; then travis_time_end ` expr 32 - $TMP_EXIT_STATUS ` ; else travis_time_end 33; fi
113
+
114
+ if [[ $TMP_EXIT_STATUS != 0 ]]; then echo " Failed running $test_l . Exiting with $TMP_EXIT_STATUS " ; fi
115
+
116
+ if [[ $CONTINUE != 0 ]]; then continue ; fi
117
+
118
+ export EXIT_STATUS=` expr $TMP_EXIT_STATUS + $EXIT_STATUS ` ;
119
+ done ;
120
+ echo " Exit status : $EXIT_STATUS " ;
121
+
122
+ travis_time_start euslisp.eusjpeg.test
123
+
124
+ eusgl ' (progn (load (format nil "~A/lisp/image/jpeg/eusjpeg.l" *eusdir*))(image::write-jpeg-file "test.jpg" (instance color-image24 :init 100 100)) (print *user*) (unix::exit))'
125
+
126
+ export TMP_EXIT_STATUS=$?
127
+
128
+ travis_time_end ` expr 32 - $TMP_EXIT_STATUS `
129
+ export EXIT_STATUS=` expr $TMP_EXIT_STATUS + $EXIT_STATUS ` ;
130
+ echo " Exit status : $EXIT_STATUS " ;
131
+ [ $EXIT_STATUS == 0 ] || exit 1
132
+ exit 0
133
+ fi
134
+
48
135
travis_time_start install # Use this to install any prerequisites or dependencies necessary to run your build
49
136
cd ${HOME}
50
- [ -e jskeus ] || git clone http://github.com/euslisp/jskeus jskeus
137
+ [ -e jskeus ] || git clone --depth 1 http://github.com/euslisp/jskeus jskeus
51
138
ln -s $CI_SOURCE_PATH jskeus/eus
52
139
ln -s ` pwd` /jskeus/irteus jskeus/eus/irteus
53
140
travis_time_end
@@ -59,8 +146,21 @@ if [[ "$DOCKER_IMAGE" == *"trusty"* || "$DOCKER_IMAGE" == *"jessie"* ]]; then
59
146
else
60
147
make eus-installed WFLAGS=" -Werror=implicit-int -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=unused-result"
61
148
fi
149
+ travis_time_end
150
+
151
+ travis_time_start script.make.jskeus
152
+
62
153
make
63
154
155
+ travis_time_end
156
+
157
+ travis_time_start script.eustag
158
+
159
+ (cd eus/lisp/tool; make)
160
+
161
+ travis_time_end
162
+
163
+
64
164
travis_time_end
65
165
66
166
if [ " $TRAVIS_OS_NAME " == " linux" -a " ` uname -m` " == " x86_64" -a " $ROS_DISTRO " != " " ]; then
145
245
146
246
travis_time_end ` expr 32 - $TMP_EXIT_STATUS `
147
247
248
+ if [[ $TMP_EXIT_STATUS != 0 ]]; then echo " Failed running $test_l . Exiting with $TMP_EXIT_STATUS " ; fi
249
+
148
250
export EXIT_STATUS=` expr $TMP_EXIT_STATUS + $EXIT_STATUS ` ;
149
251
done ;
150
252
echo " Exit status : $EXIT_STATUS " ;
151
253
152
254
153
255
# run test in compiled EusLisp/test
154
256
for test_l in $CI_SOURCE_PATH /test/* .l; do
155
- # bignum test fails on armhf
156
- [[ " ` uname -m` " == " arm" * && $test_l =~ bignum.l ]] && continue ;
157
- # const.l does not compilable https://github.com/euslisp/EusLisp/issues/318
158
- [[ $test_l =~ const.l ]] && continue ;
159
257
160
258
travis_time_start compiled.${test_l##*/ } .test
161
259
162
260
eusgl " (let ((o (namestring (merge-pathnames \" .o\" \" $test_l \" ))) (so (namestring (merge-pathnames \" .so\" \" $test_l \" )))) (compile-file \" $test_l \" :o o) (if (probe-file so) (load so) (exit 1))))"
163
261
export TMP_EXIT_STATUS=$?
164
262
165
- travis_time_end ` expr 32 - $TMP_EXIT_STATUS `
263
+ export CONTINUE=0
264
+ # const.l does not compilable https://github.com/euslisp/EusLisp/issues/318
265
+ if [[ $test_l =~ const.l ]]; then export CONTINUE=1; fi
266
+
267
+ if [[ $CONTINUE == 0 ]]; then travis_time_end ` expr 32 - $TMP_EXIT_STATUS ` ; else travis_time_end 33; fi
268
+
269
+ if [[ $TMP_EXIT_STATUS != 0 ]]; then echo " Failed running $test_l . Exiting with $TMP_EXIT_STATUS " ; fi
270
+
271
+ if [[ $CONTINUE != 0 ]]; then continue ; fi
166
272
167
273
export EXIT_STATUS=` expr $TMP_EXIT_STATUS + $EXIT_STATUS ` ;
168
274
done ;
171
277
# run test in jskeus/irteus
172
278
for test_l in irteus/test/* .l; do
173
279
174
- [[ (" ` uname -m` " == " arm" * || " ` uname -m` " == " aarch" * ) && $test_l =~ geo.l| mathtest.l| interpolator.l| test-irt-motion.l| test-pointcloud.l| irteus-demo.l ]] && continue ;
175
-
176
280
travis_time_start irteus.${test_l##*/ } .test
177
281
178
282
irteusgl $test_l ;
179
283
export TMP_EXIT_STATUS=$?
180
284
181
- travis_time_end ` expr 32 - $TMP_EXIT_STATUS `
285
+ export CONTINUE=0
286
+ # skip collision test because bullet of 2.83 or later version is not released in trusty and jessie.
287
+ # https://github.com/euslisp/jskeus/blob/6cb08aa6c66fa8759591de25b7da68baf76d5f09/irteus/Makefile#L37
288
+ if [[ ( " $DOCKER_IMAGE " == * " trusty" * || " $DOCKER_IMAGE " == * " jessie" * ) && $test_l =~ test-collision.l ]]; then export CONTINUE=1; fi
289
+
290
+ if [[ $CONTINUE == 0 ]]; then travis_time_end ` expr 32 - $TMP_EXIT_STATUS ` ; else travis_time_end 33; fi
291
+
292
+ if [[ $TMP_EXIT_STATUS != 0 ]]; then echo " Failed running $test_l . Exiting with $TMP_EXIT_STATUS " ; fi
293
+
294
+ if [[ $CONTINUE != 0 ]]; then continue ; fi
182
295
183
296
export EXIT_STATUS=` expr $TMP_EXIT_STATUS + $EXIT_STATUS ` ;
184
297
done ;
0 commit comments