Skip to content

Commit 2cfe9b3

Browse files
authored
Merge branch 'master' into test-defforeign
2 parents 10e3b09 + 21a5d86 commit 2cfe9b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+3656
-2432
lines changed

.circleci/config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ references:
44
setup-tex: &setup-tex
55
run:
66
name: Setup TeX
7-
command: sudo apt-get install -qq -y texlive-latex-base ptex-bin latex2html nkf poppler-utils
7+
command: |-
8+
sudo apt-get update
9+
sudo apt-get install -qq -y texlive-latex-base ptex-bin latex2html nkf poppler-utils
810
setup-eus: &setup-eus
911
run:
1012
name: Setup EusLisp

.travis.sh

Lines changed: 128 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ set -e
44
export DEBIAN_FRONTEND=noninteractive
55

66
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
812
TRAVIS_TIME_ID=$(cat /dev/urandom | LC_ALL=C LC_CTYPE=C tr -dc 'a-z0-9' | fold -w 8 | head -n 1)
913
TRAVIS_FOLD_NAME=$1
1014
echo -e "\e[0Ktravis_fold:start:$TRAVIS_FOLD_NAME"
@@ -14,7 +18,11 @@ function travis_time_start {
1418
function travis_time_end {
1519
set +x # disable debug information
1620
_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
1826
TIME_ELAPSED_SECONDS=$(( ($TRAVIS_END_TIME - $TRAVIS_START_TIME)/1000000000 ))
1927
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"
2028
echo -e "travis_fold:end:$TRAVIS_FOLD_NAME"
@@ -28,7 +36,9 @@ if [ "$TRAVIS_OS_NAME" == "linux" ]; then
2836
travis_time_end
2937

3038
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"
3242
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
3343
travis_time_end
3444

@@ -38,16 +48,93 @@ if [ "$TRAVIS_OS_NAME" == "osx" ]; then
3848
# skip if already installed
3949
# https://discourse.brew.sh/t/skip-ignore-brew-install-if-package-is-already-installed/633/2
4050
# 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
4456
travis_time_end
4557

4658
fi
4759

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+
48135
travis_time_start install # Use this to install any prerequisites or dependencies necessary to run your build
49136
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
51138
ln -s $CI_SOURCE_PATH jskeus/eus
52139
ln -s `pwd`/jskeus/irteus jskeus/eus/irteus
53140
travis_time_end
@@ -59,8 +146,21 @@ if [[ "$DOCKER_IMAGE" == *"trusty"* || "$DOCKER_IMAGE" == *"jessie"* ]]; then
59146
else
60147
make eus-installed WFLAGS="-Werror=implicit-int -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=unused-result"
61148
fi
149+
travis_time_end
150+
151+
travis_time_start script.make.jskeus
152+
62153
make
63154

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+
64164
travis_time_end
65165

66166
if [ "$TRAVIS_OS_NAME" == "linux" -a "`uname -m`" == "x86_64" -a "$ROS_DISTRO" != "" ]; then
@@ -145,24 +245,30 @@ fi
145245

146246
travis_time_end `expr 32 - $TMP_EXIT_STATUS`
147247

248+
if [[ $TMP_EXIT_STATUS != 0 ]]; then echo "Failed running $test_l. Exiting with $TMP_EXIT_STATUS"; fi
249+
148250
export EXIT_STATUS=`expr $TMP_EXIT_STATUS + $EXIT_STATUS`;
149251
done;
150252
echo "Exit status : $EXIT_STATUS";
151253

152254

153255
# run test in compiled EusLisp/test
154256
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;
159257

160258
travis_time_start compiled.${test_l##*/}.test
161259

162260
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))))"
163261
export TMP_EXIT_STATUS=$?
164262

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
166272

167273
export EXIT_STATUS=`expr $TMP_EXIT_STATUS + $EXIT_STATUS`;
168274
done;
@@ -171,14 +277,21 @@ fi
171277
# run test in jskeus/irteus
172278
for test_l in irteus/test/*.l; do
173279

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-
176280
travis_time_start irteus.${test_l##*/}.test
177281

178282
irteusgl $test_l;
179283
export TMP_EXIT_STATUS=$?
180284

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
182295

183296
export EXIT_STATUS=`expr $TMP_EXIT_STATUS + $EXIT_STATUS`;
184297
done;

.travis.yml

Lines changed: 37 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,39 @@
11
# Travis Continuous Integration Configuration File
2+
os: linux
3+
dist: bionic
4+
sudo: required
5+
cache: apt
6+
services: docker
27
matrix:
38
include:
4-
- os: linux
5-
dist: trusty
6-
sudo: required
7-
cache: apt
8-
env: DOCKER_IMAGE=ubuntu:trusty
9-
- os: linux
10-
dist: trusty
11-
sudo: required
12-
cache: apt
13-
env: DOCKER_IMAGE=ubuntu:xenial
14-
- os: linux
15-
dist: trusty
16-
sudo: required
17-
cache: apt
18-
env: DOCKER_IMAGE=ubuntu:bionic
19-
- os: linux
20-
dist: trusty
21-
sudo: required
22-
cache: apt
23-
env: DOCKER_IMAGE=ubuntu:trusty ROS_DISTRO=indigo
24-
- os: linux
25-
dist: trusty
26-
sudo: required
27-
cache: apt
28-
env: DOCKER_IMAGE=ubuntu:xenial ROS_DISTRO=kinetic
29-
- os: linux
30-
dist: trusty
31-
sudo: required
32-
cache: apt
33-
env: DOCKER_IMAGE=ubuntu:bionic ROS_DISTRO=melodic
34-
- os: linux
35-
dist: trusty
36-
sudo: required
37-
cache: apt
38-
env: DOCKER_IMAGE=osrf/ubuntu_armhf:trusty
39-
- os: linux
40-
dist: trusty
41-
sudo: required
42-
cache: apt
43-
env: DOCKER_IMAGE=osrf/ubuntu_armhf:xenial
44-
- os: linux
45-
dist: trusty
46-
sudo: required
47-
cache: apt
48-
env: DOCKER_IMAGE=osrf/ubuntu_arm64:trusty
49-
- os: linux
50-
dist: trusty
51-
sudo: required
52-
cache: apt
53-
env: DOCKER_IMAGE=osrf/ubuntu_arm64:xenial
54-
- os: linux
55-
dist: trusty
56-
sudo: required
57-
cache: apt
58-
env: DOCKER_IMAGE=debian:stretch
59-
- os: linux
60-
dist: trusty
61-
sudo: required
62-
cache: apt
63-
env: DOCKER_IMAGE=osrf/debian_arm64:stretch
9+
- env: DOCKER_IMAGE=ubuntu:trusty
10+
- env: DOCKER_IMAGE=ubuntu:xenial
11+
- env: DOCKER_IMAGE=ubuntu:bionic
12+
- env: DOCKER_IMAGE=ubuntu:trusty ROS_DISTRO=indigo
13+
- env: DOCKER_IMAGE=ubuntu:xenial ROS_DISTRO=kinetic
14+
- env: DOCKER_IMAGE=ubuntu:bionic ROS_DISTRO=melodic
15+
- env: DOCKER_IMAGE=osrf/ubuntu_armhf:trusty
16+
- env: DOCKER_IMAGE=osrf/ubuntu_armhf:xenial
17+
- env: DOCKER_IMAGE=osrf/ubuntu_arm64:trusty
18+
- env: DOCKER_IMAGE=osrf/ubuntu_arm64:xenial
19+
- env: DOCKER_IMAGE=debian:stretch
20+
- env: DOCKER_IMAGE=osrf/debian_arm64:stretch
21+
- env: QEMU=amd64 DOCKER_IMAGE=amd64/debian:unstable # amd64
22+
- env: QEMU=aarch64 DOCKER_IMAGE=arm64v8/debian:buster # arm64
23+
- env: QEMU=arm DOCKER_IMAGE=arm32v5/debian:jessie # armel
24+
- env: QEMU=arm DOCKER_IMAGE=arm32v7/debian:jessie # armhf
25+
# hppa
26+
# hurd-i386
27+
- env: QEMU=i386 DOCKER_IMAGE=i386/debian:unstable # i386
28+
# ia64
29+
# m68k
30+
- env: QEMU=mips64el DOCKER_IMAGE=loongnix/debian:buster # mips64el
31+
# mipsel
32+
# - env: QEMU=ppc DOCKER_IMAGE=vicamo/debian:unstable-powerpc # powerpc / somehow failing loading eusgl
33+
- env: QEMU=ppc64le DOCKER_IMAGE=ppc64le/debian:buster # ppc64
34+
# riscv64
35+
# sh4
36+
# sparc64
6437
- os: osx
6538
env:
6639
global:
@@ -81,11 +54,13 @@ before_install: # Use this to prepare the system to install prerequisites or dep
8154
install:
8255
- export CI_SOURCE_PATH=$(pwd)
8356
- export REPOSITORY_NAME=${PWD##*/}
57+
- if [[ "$QEMU" != "" ]]; then sudo apt-get install -y -qq qemu-user-static; ls /usr/bin/qemu-*-static; export QEMU_VOLUME="-v /usr/bin/qemu-$QEMU-static:/usr/bin/qemu-$QEMU-static" ; fi
58+
- if [[ "$QEMU" != "" ]]; then docker run --rm --privileged multiarch/qemu-user-static:register; fi
8459
- if [[ "$DOCKER_IMAGE" == *"arm"* ]]; then sudo apt-get install -y -qq qemu-user-static; fi
8560
- if [[ "$DOCKER_IMAGE" == *"arm"* ]]; then git clone http://github.com/euslisp/jskeus ${HOME}/jskeus; fi
8661
script:
87-
- echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME"
88-
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then docker run --rm -i -v $HOME:$HOME -e "TRAVIS_OS_NAME=$TRAVIS_OS_NAME" -e "CI_SOURCE_PATH=$CI_SOURCE_PATH" -e "HOME=$HOME" -e "MAKEFLAGS=$MAKEFLAGS" -e "DOCKER_IMAGE=$DOCKER_IMAGE" -t $DOCKER_IMAGE sh -c "cd $CI_SOURCE_PATH; ./.travis.sh"; fi
62+
- echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME on $QEMU_VOLUME"
63+
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then docker run --rm -i $QEMU_VOLUME -v $HOME:$HOME -e "QEMU=$QEMU" -e "TRAVIS_OS_NAME=$TRAVIS_OS_NAME" -e "CI_SOURCE_PATH=$CI_SOURCE_PATH" -e "HOME=$HOME" -e "MAKEFLAGS=$MAKEFLAGS" -e "DOCKER_IMAGE=$DOCKER_IMAGE" -t $DOCKER_IMAGE sh -c "cd $CI_SOURCE_PATH; ./.travis.sh"; fi
8964
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then ./.travis.sh; fi
9065
after_failure:
9166
- echo "failure"

contrib/cygwin-check/tzname.c

100755100644
File mode changed.

contrib/talk/akaho/randline

100644100755
File mode changed.

contrib/talk/akaho/talk.sh

100644100755
File mode changed.

contrib/talk/akaho/talk2.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)