Skip to content

Commit 3e25e57

Browse files
authored
Merge pull request #349 from Affonso-Gui/cl-compatible
Merge master into cl-compatible
2 parents abfa0a7 + b9770d3 commit 3e25e57

Some content is hidden

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

74 files changed

+4133
-2789
lines changed

.travis.sh

+135-16
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
#!/bin/bash
22

33
set -e
4+
export DEBIAN_FRONTEND=noninteractive
45

56
function travis_time_start {
6-
set +x
7-
TRAVIS_START_TIME=$(date +%s%N)
8-
TRAVIS_TIME_ID=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 8 | head -n 1)
7+
TRAVIS_START_TIME=$(date +%s)
8+
TRAVIS_TIME_ID=$(cat /dev/urandom | LC_ALL=C LC_CTYPE=C tr -dc 'a-z0-9' | fold -w 8 | head -n 1)
99
TRAVIS_FOLD_NAME=$1
10-
echo -e "\e[0Ktraivs_fold:start:$TRAVIS_FOLD_NAME"
11-
echo -e "\e[0Ktraivs_time:start:$TRAVIS_TIME_ID"
12-
set -x
10+
echo -e "\e[0Ktravis_fold:start:$TRAVIS_FOLD_NAME"
11+
echo -e "\e[0Ktravis_time:start:$TRAVIS_TIME_ID"
12+
set -x # enable debug information
1313
}
1414
function travis_time_end {
15-
set +x
15+
set +x # disable debug information
1616
_COLOR=${1:-32}
17-
TRAVIS_END_TIME=$(date +%s%N)
17+
TRAVIS_END_TIME=$(date +%s)
1818
TIME_ELAPSED_SECONDS=$(( ($TRAVIS_END_TIME - $TRAVIS_START_TIME)/1000000000 ))
19-
echo -e "traivs_time:end:$TRAVIS_TIME_ID:start=$TRAVIS_START_TIME,finish=$TRAVIS_END_TIME,duration=$(($TRAVIS_END_TIME - $TRAVIS_START_TIME))\n\e[0K"
20-
echo -e "traivs_fold:end:$TRAVIS_FOLD_NAME"
19+
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+
echo -e "travis_fold:end:$TRAVIS_FOLD_NAME"
2121
echo -e "\e[0K\e[${_COLOR}mFunction $TRAVIS_FOLD_NAME takes $(( $TIME_ELAPSED_SECONDS / 60 )) min $(( $TIME_ELAPSED_SECONDS % 60 )) sec\e[0m"
22-
set -x
2322
}
2423

2524
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
@@ -55,20 +54,140 @@ travis_time_end
5554

5655
travis_time_start script.make # All commands must exit with code 0 on success. Anything else is considered failure.
5756
cd jskeus
57+
if [[ "$DOCKER_IMAGE" == *"trusty"* || "$DOCKER_IMAGE" == *"jessie"* ]]; then
58+
make eus-installed WFLAGS="-Werror=implicit-int -Werror=implicit-function-declaration -Werror=unused-result"
59+
else
60+
make eus-installed WFLAGS="-Werror=implicit-int -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=unused-result"
61+
fi
5862
make
5963

6064
travis_time_end
61-
travis_time_start script.test
65+
66+
if [ "$TRAVIS_OS_NAME" == "linux" -a "`uname -m`" == "x86_64" -a "$ROS_DISTRO" != "" ]; then
67+
68+
travis_time_start setup.ros
69+
70+
export TZ=Asia/Tokyo
71+
echo "${TZ}" > /etc/timezone
72+
apt-get install -qq -y lsb-release gnupg
73+
sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
74+
ret=1; while [ $ret != 0 ]; do apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116 && ret=0; done
75+
apt-get update -qq
76+
apt-get install -qq -y wget python-rosdep python-wstool python-catkin-tools ros-$ROS_DISTRO-rosbash ros-$ROS_DISTRO-rospack
77+
mkdir -p ~/ws/src
78+
cd ~/ws/src
79+
80+
travis_time_end
81+
travis_time_start setup.workspace
82+
83+
# setup roseus
84+
git clone http://github.com/jsk-ros-pkg/jsk_roseus
85+
# setup euslisp
86+
ln -sf ~/jskeus/eus ./euslisp
87+
wget https://raw.githubusercontent.com/tork-a/euslisp-release/release/kinetic/euslisp/package.xml -O euslisp/package.xml
88+
mkdir -p euslisp/cmake euslisp/env-hooks
89+
for file in CMakeLists.txt cmake/euslisp-extras.cmake.in env-hooks/99.euslisp.sh.in; do
90+
wget https://raw.githubusercontent.com/tork-a/euslisp-release/master/patches/${file} -O euslisp/${file}
91+
done
92+
# setup jskeus
93+
mkdir jskeus
94+
ln -sf ~/jskeus/irteus ./jskeus/irteus
95+
cp -r ~/jskeus/doc ~/jskeus/images ./jskeus/
96+
wget https://raw.githubusercontent.com/tork-a/jskeus-release/release/$ROS_DISTRO/jskeus/package.xml -O jskeus/package.xml
97+
wget https://raw.githubusercontent.com/tork-a/jskeus-release/master/patches/CMakeLists.txt -O jskeus/CMakeLists.txt
98+
#
99+
travis_time_end
100+
travis_time_start rosdep.update
101+
102+
cd ~/ws
103+
source /opt/ros/$ROS_DISTRO/setup.bash
104+
sudo rosdep init
105+
rosdep update
106+
rosdep install -y -q -r --from-paths ./src --ignore-src
107+
108+
travis_time_end
109+
travis_time_start compile.roseus
110+
111+
catkin build roseus
112+
113+
travis_time_end
114+
travis_time_start run_tests.roseus
115+
116+
catkin run_tests -p1 -j1 roseus
117+
source devel/setup.bash
118+
rospack find roseus
119+
(roscd roseus; rostest -t test/test-roseus.test)
120+
catkin_test_results --verbose --all build
121+
122+
travis_time_end
123+
124+
exit 0
125+
fi
62126

63127
source bashrc.eus
64128
export DISPLAY=
129+
export EXIT_STATUS=0;
65130
set +e
66-
if [[ "`uname -m`" == "arm"* || "`uname -m`" == "aarch"* ]]; then
67-
export EXIT_STATUS=0; for test_l in irteus/test/*.l; do [[ $test_l =~ geo.l|interpolator.l|irteus-demo.l|test-irt-motion.l|object.l|coords.l|bignum.l|mathtest.l ]] && continue; irteusgl $test_l; export EXIT_STATUS=`expr $? + $EXIT_STATUS`; done;echo "Exit status : $EXIT_STATUS"; [ $EXIT_STATUS == 0 ] || exit 1
68-
else
69-
export EXIT_STATUS=0; for test_l in irteus/test/*.l; do irteusgl $test_l; export EXIT_STATUS=`expr $? + $EXIT_STATUS`; done;echo "Exit status : $EXIT_STATUS"; [ $EXIT_STATUS == 0 ] || exit 1
131+
132+
# arm target (ubuntu_arm64/trusty) takes too long time (>50min) for test
133+
if [[ "`uname -m`" == "aarch"* ]]; then
134+
sed -i 's@00000@0000@' $CI_SOURCE_PATH/test/object.l $CI_SOURCE_PATH/test/coords.l
70135
fi
71136

137+
# run test in EusLisp/test
138+
for test_l in $CI_SOURCE_PATH/test/*.l; do
139+
140+
travis_time_start euslisp.${test_l##*/}.test
141+
142+
eusgl $test_l;
143+
export TMP_EXIT_STATUS=$?
144+
145+
travis_time_end `expr 32 - $TMP_EXIT_STATUS`
146+
147+
export EXIT_STATUS=`expr $TMP_EXIT_STATUS + $EXIT_STATUS`;
148+
done;
149+
echo "Exit status : $EXIT_STATUS";
150+
151+
152+
# run test in compiled EusLisp/test
153+
for test_l in $CI_SOURCE_PATH/test/*.l; do
154+
# bignum test fails on armhf
155+
[[ "`uname -m`" == "arm"* && $test_l =~ bignum.l ]] && continue;
156+
# const.l does not compilable https://github.com/euslisp/EusLisp/issues/318
157+
[[ $test_l =~ const.l ]] && continue;
158+
159+
travis_time_start compiled.${test_l##*/}.test
160+
161+
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))))"
162+
export TMP_EXIT_STATUS=$?
163+
164+
travis_time_end `expr 32 - $TMP_EXIT_STATUS`
165+
166+
export EXIT_STATUS=`expr $TMP_EXIT_STATUS + $EXIT_STATUS`;
167+
done;
168+
echo "Exit status : $EXIT_STATUS";
169+
170+
# run test in jskeus/irteus
171+
for test_l in irteus/test/*.l; do
172+
173+
[[ ("`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;
174+
175+
travis_time_start irteus.${test_l##*/}.test
176+
177+
irteusgl $test_l;
178+
export TMP_EXIT_STATUS=$?
179+
180+
travis_time_end `expr 32 - $TMP_EXIT_STATUS`
181+
182+
export EXIT_STATUS=`expr $TMP_EXIT_STATUS + $EXIT_STATUS`;
183+
done;
184+
echo "Exit status : $EXIT_STATUS";
185+
186+
187+
[ $EXIT_STATUS == 0 ] || exit 1
188+
189+
travis_time_start eus64.test
190+
72191
if [[ "$TRAVIS_OS_NAME" == "osx" || "`uname -m`" == "arm"* ]]; then
73192
uname -a
74193
else

.travis.yml

+31-6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,21 @@ matrix:
1616
sudo: required
1717
cache: apt
1818
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
1934
- os: linux
2035
dist: trusty
2136
sudo: required
@@ -41,11 +56,21 @@ matrix:
4156
sudo: required
4257
cache: apt
4358
env: DOCKER_IMAGE=debian:jessie
59+
- os: linux
60+
dist: trusty
61+
sudo: required
62+
cache: apt
63+
env: DOCKER_IMAGE=debian:stretch
4464
- os: linux
4565
dist: trusty
4666
sudo: required
4767
cache: apt
4868
env: DOCKER_IMAGE=osrf/debian_arm64:jessie
69+
- os: linux
70+
dist: trusty
71+
sudo: required
72+
cache: apt
73+
env: DOCKER_IMAGE=osrf/debian_arm64:stretch
4974
- os: osx
5075
env:
5176
global:
@@ -61,7 +86,7 @@ before_install: # Use this to prepare the system to install prerequisites or dep
6186
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
6287
# use stable rvm to avoid "shell_session_update: command not found" error on OSX.
6388
# https://github.com/travis-ci/travis-ci/issues/6307
64-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; command curl -sSL https://rvm.io/mpapis.asc | gpg --import -; then rvm get stable; fi
89+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then set -x; gpg --version; gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB || command curl -sSL https://rvm.io/mpapis.asc | gpg --import -; rvm get stable; set +x; fi
6590
# Define some config vars
6691
install:
6792
- export CI_SOURCE_PATH=$(pwd)
@@ -70,15 +95,15 @@ install:
7095
- if [[ "$DOCKER_IMAGE" == *"arm"* ]]; then git clone http://github.com/euslisp/jskeus ${HOME}/jskeus; fi
7196
script:
7297
- echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME"
73-
- 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" -t $DOCKER_IMAGE sh -c "cd $CI_SOURCE_PATH; ./.travis.sh"; fi
98+
- 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
7499
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then source ./.travis.sh; fi
75100
after_failure:
76101
- echo "failure"
77102
after_success:
78-
- sudo apt-get install -qq -y texlive-latex-base ptex-bin latex2html nkf poppler-utils
79-
- (cd doc/latex; make; make html)
80-
- (cd doc/jlatex; make; make html)
81-
- git checkout doc/html/index.html # do not overwrite
103+
- if [[ "$DOCKER_IMAGE" == "ubuntu"* && "$ROS_DISTRO" == "" ]]; then sudo apt-get install -qq -y texlive-latex-base ptex-bin latex2html nkf poppler-utils; fi
104+
- if [[ "$DOCKER_IMAGE" == "ubuntu"* && "$ROS_DISTRO" == "" ]]; then (cd doc/latex; make; make html); fi
105+
- if [[ "$DOCKER_IMAGE" == "ubuntu"* && "$ROS_DISTRO" == "" ]]; then (cd doc/jlatex; make; make html); fi
106+
- if [[ "$DOCKER_IMAGE" == "ubuntu"* && "$ROS_DISTRO" == "" ]]; then git checkout doc/html/index.html; fi # do not overwrite
82107
deploy:
83108
provider: releases
84109
api_key: "$GH_TOKEN"

0 commit comments

Comments
 (0)