Skip to content

Commit

Permalink
Merge branch 'master' into test-defforeign
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada committed May 26, 2020
2 parents 10e3b09 + 21a5d86 commit 2cfe9b3
Show file tree
Hide file tree
Showing 76 changed files with 3,656 additions and 2,432 deletions.
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ references:
setup-tex: &setup-tex
run:
name: Setup TeX
command: sudo apt-get install -qq -y texlive-latex-base ptex-bin latex2html nkf poppler-utils
command: |-
sudo apt-get update
sudo apt-get install -qq -y texlive-latex-base ptex-bin latex2html nkf poppler-utils
setup-eus: &setup-eus
run:
name: Setup EusLisp
Expand Down
143 changes: 128 additions & 15 deletions .travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ set -e
export DEBIAN_FRONTEND=noninteractive

function travis_time_start {
TRAVIS_START_TIME=$(date +%s)
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
TRAVIS_START_TIME=$(( $(date +%s)*1000000000 ))
else
TRAVIS_START_TIME=$(date +%s%N)
fi
TRAVIS_TIME_ID=$(cat /dev/urandom | LC_ALL=C LC_CTYPE=C tr -dc 'a-z0-9' | fold -w 8 | head -n 1)
TRAVIS_FOLD_NAME=$1
echo -e "\e[0Ktravis_fold:start:$TRAVIS_FOLD_NAME"
Expand All @@ -14,7 +18,11 @@ function travis_time_start {
function travis_time_end {
set +x # disable debug information
_COLOR=${1:-32}
TRAVIS_END_TIME=$(date +%s)
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
TRAVIS_END_TIME=$(( $(date +%s)*1000000000 ))
else
TRAVIS_END_TIME=$(date +%s%N)
fi
TIME_ELAPSED_SECONDS=$(( ($TRAVIS_END_TIME - $TRAVIS_START_TIME)/1000000000 ))
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"
echo -e "travis_fold:end:$TRAVIS_FOLD_NAME"
Expand All @@ -28,7 +36,9 @@ if [ "$TRAVIS_OS_NAME" == "linux" ]; then
travis_time_end

travis_time_start setup.apt-get_install
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
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
# unset protocol version https://github.com/juju/charm-tools/issues/532
git config --global --unset protocol.version || echo "OK"
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
travis_time_end

Expand All @@ -38,16 +48,93 @@ if [ "$TRAVIS_OS_NAME" == "osx" ]; then
# skip if already installed
# https://discourse.brew.sh/t/skip-ignore-brew-install-if-package-is-already-installed/633/2
# brew install jpeg libpng mesalib-glw;
brew list jpeg &>/dev/null || brew install jpeg
brew list libpng &>/dev/null || brew install libpng
brew list mesalib-glw &>/dev/null || brew install mesalib-glw
# 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
brew list jpeg &>/dev/null || HOMEBREW_NO_AUTO_UPDATE=1 brew install jpeg
brew list libpng &>/dev/null || HOMEBREW_NO_AUTO_UPDATE=1 brew install libpng
brew list mesalib-glw &>/dev/null || HOMEBREW_NO_AUTO_UPDATE=1 brew install mesalib-glw
brew list bullet &>/dev/null || HOMEBREW_NO_AUTO_UPDATE=1 brew install bullet
travis_time_end

fi

### for multiarch compile test
if [ "$QEMU" != "" ]; then
travis_time_start install.dpkg-dev
apt-get install -qq -y dpkg-dev
travis_time_end

echo "uname -a : $(uname -a)"
echo "uname -m : $(uname -m)"
echo "gcc -dumpmachine : $(gcc -dumpmachine)"
echo "gcc -dumpversion : $(gcc -dumpversion)"
echo "getconf LONG_BIT : $(getconf LONG_BIT)"

travis_time_start compile.euslisp
export EUSDIR=`pwd`
eval "$(dpkg-buildflags --export=sh)"
make -C lisp -f Makefile.Linux eus0 eus1 eus2 eusg eusx eusgl eus eusjpeg
travis_time_end

if [[ `gcc -dumpmachine | egrep "^(arm|aarch)"` != "" ]]; then
export ARCHDIR=LinuxARM
elif [[ `gcc -dumpmachine | egrep "^x86_64"` != "" ]]; then
export ARCHDIR=Linux64
else
export ARCHDIR=Linux
fi
export PATH=`pwd`/$ARCHDIR/bin:$PATH

export EXIT_STATUS=0;
set +e
# run test in EusLisp/test
for test_l in test/*.l; do

travis_time_start euslisp.${test_l##*/}.test

sed -i 's/\(i-max\ [0-9]000\)0*/\1/' $test_l

eusgl $test_l;
export TMP_EXIT_STATUS=$?

travis_time_end `expr 32 - $TMP_EXIT_STATUS`

export EXIT_STATUS=`expr $TMP_EXIT_STATUS + $EXIT_STATUS`;

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

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

export CONTINUE=0
# const.l does not compilable https://github.com/euslisp/EusLisp/issues/318
if [[ $test_l =~ const.l ]]; then export CONTINUE=1; fi

if [[ $CONTINUE == 0 ]]; then travis_time_end `expr 32 - $TMP_EXIT_STATUS`; else travis_time_end 33; fi

if [[ $TMP_EXIT_STATUS != 0 ]]; then echo "Failed running $test_l. Exiting with $TMP_EXIT_STATUS"; fi

if [[ $CONTINUE != 0 ]]; then continue; fi

export EXIT_STATUS=`expr $TMP_EXIT_STATUS + $EXIT_STATUS`;
done;
echo "Exit status : $EXIT_STATUS";

travis_time_start euslisp.eusjpeg.test

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))'

export TMP_EXIT_STATUS=$?

travis_time_end `expr 32 - $TMP_EXIT_STATUS`
export EXIT_STATUS=`expr $TMP_EXIT_STATUS + $EXIT_STATUS`;
echo "Exit status : $EXIT_STATUS";
[ $EXIT_STATUS == 0 ] || exit 1
exit 0
fi

travis_time_start install # Use this to install any prerequisites or dependencies necessary to run your build
cd ${HOME}
[ -e jskeus ] || git clone http://github.com/euslisp/jskeus jskeus
[ -e jskeus ] || git clone --depth 1 http://github.com/euslisp/jskeus jskeus
ln -s $CI_SOURCE_PATH jskeus/eus
ln -s `pwd`/jskeus/irteus jskeus/eus/irteus
travis_time_end
Expand All @@ -59,8 +146,21 @@ if [[ "$DOCKER_IMAGE" == *"trusty"* || "$DOCKER_IMAGE" == *"jessie"* ]]; then
else
make eus-installed WFLAGS="-Werror=implicit-int -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=unused-result"
fi
travis_time_end

travis_time_start script.make.jskeus

make

travis_time_end

travis_time_start script.eustag

(cd eus/lisp/tool; make)

travis_time_end


travis_time_end

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

travis_time_end `expr 32 - $TMP_EXIT_STATUS`

if [[ $TMP_EXIT_STATUS != 0 ]]; then echo "Failed running $test_l. Exiting with $TMP_EXIT_STATUS"; fi

export EXIT_STATUS=`expr $TMP_EXIT_STATUS + $EXIT_STATUS`;
done;
echo "Exit status : $EXIT_STATUS";


# run test in compiled EusLisp/test
for test_l in $CI_SOURCE_PATH/test/*.l; do
# bignum test fails on armhf
[[ "`uname -m`" == "arm"* && $test_l =~ bignum.l ]] && continue;
# const.l does not compilable https://github.com/euslisp/EusLisp/issues/318
[[ $test_l =~ const.l ]] && continue;

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

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

travis_time_end `expr 32 - $TMP_EXIT_STATUS`
export CONTINUE=0
# const.l does not compilable https://github.com/euslisp/EusLisp/issues/318
if [[ $test_l =~ const.l ]]; then export CONTINUE=1; fi

if [[ $CONTINUE == 0 ]]; then travis_time_end `expr 32 - $TMP_EXIT_STATUS`; else travis_time_end 33; fi

if [[ $TMP_EXIT_STATUS != 0 ]]; then echo "Failed running $test_l. Exiting with $TMP_EXIT_STATUS"; fi

if [[ $CONTINUE != 0 ]]; then continue; fi

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

[[ ("`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;

travis_time_start irteus.${test_l##*/}.test

irteusgl $test_l;
export TMP_EXIT_STATUS=$?

travis_time_end `expr 32 - $TMP_EXIT_STATUS`
export CONTINUE=0
# skip collision test because bullet of 2.83 or later version is not released in trusty and jessie.
# https://github.com/euslisp/jskeus/blob/6cb08aa6c66fa8759591de25b7da68baf76d5f09/irteus/Makefile#L37
if [[ ( "$DOCKER_IMAGE" == *"trusty"* || "$DOCKER_IMAGE" == *"jessie"* ) && $test_l =~ test-collision.l ]]; then export CONTINUE=1; fi

if [[ $CONTINUE == 0 ]]; then travis_time_end `expr 32 - $TMP_EXIT_STATUS`; else travis_time_end 33; fi

if [[ $TMP_EXIT_STATUS != 0 ]]; then echo "Failed running $test_l. Exiting with $TMP_EXIT_STATUS"; fi

if [[ $CONTINUE != 0 ]]; then continue; fi

export EXIT_STATUS=`expr $TMP_EXIT_STATUS + $EXIT_STATUS`;
done;
Expand Down
99 changes: 37 additions & 62 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,39 @@
# Travis Continuous Integration Configuration File
os: linux
dist: bionic
sudo: required
cache: apt
services: docker
matrix:
include:
- os: linux
dist: trusty
sudo: required
cache: apt
env: DOCKER_IMAGE=ubuntu:trusty
- os: linux
dist: trusty
sudo: required
cache: apt
env: DOCKER_IMAGE=ubuntu:xenial
- os: linux
dist: trusty
sudo: required
cache: apt
env: DOCKER_IMAGE=ubuntu:bionic
- os: linux
dist: trusty
sudo: required
cache: apt
env: DOCKER_IMAGE=ubuntu:trusty ROS_DISTRO=indigo
- os: linux
dist: trusty
sudo: required
cache: apt
env: DOCKER_IMAGE=ubuntu:xenial ROS_DISTRO=kinetic
- os: linux
dist: trusty
sudo: required
cache: apt
env: DOCKER_IMAGE=ubuntu:bionic ROS_DISTRO=melodic
- os: linux
dist: trusty
sudo: required
cache: apt
env: DOCKER_IMAGE=osrf/ubuntu_armhf:trusty
- os: linux
dist: trusty
sudo: required
cache: apt
env: DOCKER_IMAGE=osrf/ubuntu_armhf:xenial
- os: linux
dist: trusty
sudo: required
cache: apt
env: DOCKER_IMAGE=osrf/ubuntu_arm64:trusty
- os: linux
dist: trusty
sudo: required
cache: apt
env: DOCKER_IMAGE=osrf/ubuntu_arm64:xenial
- os: linux
dist: trusty
sudo: required
cache: apt
env: DOCKER_IMAGE=debian:stretch
- os: linux
dist: trusty
sudo: required
cache: apt
env: DOCKER_IMAGE=osrf/debian_arm64:stretch
- env: DOCKER_IMAGE=ubuntu:trusty
- env: DOCKER_IMAGE=ubuntu:xenial
- env: DOCKER_IMAGE=ubuntu:bionic
- env: DOCKER_IMAGE=ubuntu:trusty ROS_DISTRO=indigo
- env: DOCKER_IMAGE=ubuntu:xenial ROS_DISTRO=kinetic
- env: DOCKER_IMAGE=ubuntu:bionic ROS_DISTRO=melodic
- env: DOCKER_IMAGE=osrf/ubuntu_armhf:trusty
- env: DOCKER_IMAGE=osrf/ubuntu_armhf:xenial
- env: DOCKER_IMAGE=osrf/ubuntu_arm64:trusty
- env: DOCKER_IMAGE=osrf/ubuntu_arm64:xenial
- env: DOCKER_IMAGE=debian:stretch
- env: DOCKER_IMAGE=osrf/debian_arm64:stretch
- env: QEMU=amd64 DOCKER_IMAGE=amd64/debian:unstable # amd64
- env: QEMU=aarch64 DOCKER_IMAGE=arm64v8/debian:buster # arm64
- env: QEMU=arm DOCKER_IMAGE=arm32v5/debian:jessie # armel
- env: QEMU=arm DOCKER_IMAGE=arm32v7/debian:jessie # armhf
# hppa
# hurd-i386
- env: QEMU=i386 DOCKER_IMAGE=i386/debian:unstable # i386
# ia64
# m68k
- env: QEMU=mips64el DOCKER_IMAGE=loongnix/debian:buster # mips64el
# mipsel
# - env: QEMU=ppc DOCKER_IMAGE=vicamo/debian:unstable-powerpc # powerpc / somehow failing loading eusgl
- env: QEMU=ppc64le DOCKER_IMAGE=ppc64le/debian:buster # ppc64
# riscv64
# sh4
# sparc64
- os: osx
env:
global:
Expand All @@ -81,11 +54,13 @@ before_install: # Use this to prepare the system to install prerequisites or dep
install:
- export CI_SOURCE_PATH=$(pwd)
- export REPOSITORY_NAME=${PWD##*/}
- 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
- if [[ "$QEMU" != "" ]]; then docker run --rm --privileged multiarch/qemu-user-static:register; fi
- if [[ "$DOCKER_IMAGE" == *"arm"* ]]; then sudo apt-get install -y -qq qemu-user-static; fi
- if [[ "$DOCKER_IMAGE" == *"arm"* ]]; then git clone http://github.com/euslisp/jskeus ${HOME}/jskeus; fi
script:
- echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME"
- 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
- echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME on $QEMU_VOLUME"
- 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
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then ./.travis.sh; fi
after_failure:
- echo "failure"
Expand Down
Empty file modified contrib/cygwin-check/tzname.c
100755 → 100644
Empty file.
Empty file modified contrib/talk/akaho/randline
100644 → 100755
Empty file.
Empty file modified contrib/talk/akaho/talk.sh
100644 → 100755
Empty file.
Empty file modified contrib/talk/akaho/talk2.sh
100644 → 100755
Empty file.
Loading

0 comments on commit 2cfe9b3

Please sign in to comment.