Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
- DOCKER_IMAGE: debian:stretch
- DOCKER_IMAGE: osrf/ubuntu_armhf:trusty
- DOCKER_IMAGE: osrf/ubuntu_armhf:xenial
- DOCKER_IMAGE: debian:sid
- DOCKER_IMAGE: debian:sid
USE_EXPERIMENTAL: TRUE
fail-fast: false

runs-on: ubuntu-latest
Expand All @@ -42,10 +45,11 @@ jobs:
export TRAVIS_BRANCH=${GITHUB_REF#refs/heads/}
export TRAVIS_OS_NAME=linux
export DOCKER_IMAGE=${{matrix.DOCKER_IMAGE}}
if [[ "$DOCKER_IMAGE" == *"arm"* ]]; then sudo apt-get install -y -qq qemu-user-static git; fi
export USE_EXPERIMENTAL=${{matrix.USE_EXPERIMENTAL}}
if [[ "$DOCKER_IMAGE" == *"arm"* ]]; then sudo apt update -y -qq && sudo apt-get install -y -qq qemu-user-static git; fi
if [[ "$DOCKER_IMAGE" == *"arm64v8"* ]]; then export QEMU_VOLUME="-v /usr/bin/qemu-aarch64-static:/usr/bin/qemu-aarch64-static"; export PLATFORM_OPTION="--platform linux/aarch64"; fi #
echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME"
docker run $PLATFORM_OPTION --rm $QEMU_VOLUME -v $CI_SOURCE_PATH:$CI_SOURCE_PATH -e "DOCKER_IMAGE=$DOCKER_IMAGE" -e "COLLISION_LIB=$COLLISION_LIB" -e "CI_SOURCE_PATH=$CI_SOURCE_PATH" -e "HOME=$HOME" -t $DOCKER_IMAGE sh -c "cd $CI_SOURCE_PATH; ./.travis.sh"
docker run $PLATFORM_OPTION --rm $QEMU_VOLUME -v $CI_SOURCE_PATH:$CI_SOURCE_PATH -e "DOCKER_IMAGE=$DOCKER_IMAGE" -e "COLLISION_LIB=$COLLISION_LIB" -e "USE_EXPERIMENTAL=$USE_EXPERIMENTAL" -e "CI_SOURCE_PATH=$CI_SOURCE_PATH" -e "HOME=$HOME" -t $DOCKER_IMAGE sh -c "cd $CI_SOURCE_PATH; ./.travis.sh"

linux-arm:
strategy:
Expand Down
9 changes: 8 additions & 1 deletion .travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function travis_time_end {

travis_time_start setup.apt-get_update
# Use archive repository for Debian Stretch
if [[ "$DOCKER_IMAGE" == *"stretch" ]]; then
if [[ "$DOCKER_IMAGE" == *"stretch" || "$DOCKER_IMAGE" == *"buster" ]]; then
sed -i 's/[[:alpha:]]*.debian.org/archive.debian.org/' /etc/apt/sources.list
sed -i '/stretch-updates/ s/^#*/#/' /etc/apt/sources.list
fi
Expand All @@ -36,6 +36,13 @@ echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selecti
#
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 # msttcorefonts could not install on 14.04 travis
# sudo apt-get install -qq -y texlive-latex-base ptex-bin latex2html nkf poppler-utils || echo "ok" # 16.04 does ont have ptex bin

# test with latest GCC's
if [[ "$USE_EXPERIMENTAL" == "true" ]]; then
echo 'deb http://deb.debian.org/debian experimental main' | sudo tee /etc/apt/sources.list.d/experimental.list
apt update -qq -y
apt-get -qq -y -t=experimental install gcc g++
fi
travis_time_end

if [[ "$COLLISION_LIB" != "" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion irteus/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ all: defun.h $(LIBNR) $(LIBIRTEUS) $(LIBIRTEUSG) $(LIBIRTEUSX) $(LIBIRTEUSIMG) $

.PHONY: defun.h
defun.h:
echo '#include "eus.h"\n#undef defun\npointer TEST();\nvoid test(void) {register context *ctx; pointer mod; defun(ctx,"TEST",mod,TEST,NULL);}' > test.c
echo '#include "eus.h"\n#undef defun\npointer TEST();\nvoid test(void) {register context *ctx; pointer mod; defun((context *)ctx,(char *)"TEST",(pointer)mod,(pointer(*)(context*,int,pointer*))TEST,(char *)NULL);}' > test.c
echo "// redefine defun for update defun() API () https://github.com/euslisp/EusLisp/pull/116" > defun.h
echo "#undef defun" >> defun.h
$(CC) $(CFLAGS) $(WFLAGS) -c test.c $(OBJOPT) test.o || echo "#define defun(a, b, c, d, e) defun(a, b, c, d) // for EusLisp < 9.24" >> defun.h
Expand Down
4 changes: 2 additions & 2 deletions irteus/eusbullet.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@

#include "eus.h"

extern pointer ___eusbullet();
extern pointer ___eusbullet(context*,int,pointer*);
static void register_eusbullet()
{ add_module_initializer("___eusbullet", ___eusbullet);}
{ add_module_initializer("___eusbullet", (pointer (*)(context*,int,pointer*))___eusbullet);}

extern eusinteger_t C_BT_MakeSphereModel(eusfloat_t r);
extern eusinteger_t C_BT_MakeBoxModel(eusfloat_t xsize, eusfloat_t ysize, eusfloat_t zsize);
Expand Down
4 changes: 2 additions & 2 deletions irteus/euspng.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
#include <png.h>
#include "eus.h"

extern pointer ___euspng();
extern pointer ___euspng(context*,int,pointer*);
static void register_euspng()
{ add_module_initializer("___euspng", ___euspng);}
{ add_module_initializer("___euspng", (pointer (*)(context*,int,pointer*))___euspng);}

pointer PNG_READ_IMAGE(register context *ctx, int n, register pointer *argv)
{
Expand Down
4 changes: 2 additions & 2 deletions irteus/euspqp.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@

#include "eus.h"

extern pointer ___euspqp();
extern pointer ___euspqp(context*,int,pointer*);
static void register_euspqp()
{ add_module_initializer("___euspqp", ___euspqp);}
{ add_module_initializer("___euspqp", (pointer (*)(context*,int,pointer*))___euspqp);}

extern eusinteger_t PQP_MakeModel();
extern void PQP_DeleteModel(eusinteger_t m);
Expand Down
7 changes: 3 additions & 4 deletions irteus/irtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
#include "eus.h"
#include "nr.h"
#include <math.h>
extern pointer ___irtc();
extern pointer ___irtc(context*,int,pointer*);
static void register_irtc()
{ add_module_initializer("___irtc", ___irtc);}
{ add_module_initializer("___irtc", (pointer (*)(context*,int,pointer*))___irtc);}

#define colsize(p) (intval(p->c.ary.dim[1]))
#define rowsize(p) (intval(p->c.ary.dim[0]))
Expand Down Expand Up @@ -1029,11 +1029,10 @@ register pointer *argv;
}

#include "defun.h" // redefine defun for update defun() API
pointer ___irtc(ctx,n,argv, env)
pointer ___irtc(ctx,n,argv)
register context *ctx;
int n;
pointer argv[];
pointer env;
{
pointer mod=argv[0];
defun(ctx,"ROTM3*",mod,MATTIMES3,NULL);
Expand Down
8 changes: 4 additions & 4 deletions irteus/irtgeoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#include "eus.h"
#include <math.h>

extern pointer ___irtgeoc();
extern pointer ___irtgeoc(context*,int,pointer*);
static void register_irtgeoc()
{ add_module_initializer("___irtgeoc", ___irtgeoc);}
{ add_module_initializer("___irtgeoc", (pointer (*)(context*,int,pointer*))___irtgeoc);}

//
//
Expand Down Expand Up @@ -355,8 +355,8 @@ pointer C_ISNAN (ctx,n,argv)
}

#include "defun.h" // redefine defun for update defun() API
pointer ___irtgeoc(ctx,n, argv, env)
register context *ctx;int n;pointer *argv;pointer env;
pointer ___irtgeoc(ctx,n, argv)
register context *ctx;int n;pointer *argv;
{
defun(ctx,"C-COORDS-TRANSFORM-VECTOR",argv[0],C_COORDS_TRNSFORM_VECTOR,NULL);
defun(ctx,"C-MATRIX-ROW",argv[0],C_MATRIX_ROW,NULL);
Expand Down
7 changes: 3 additions & 4 deletions irteus/irtglc.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@

#include "eus.h"

extern pointer ___irtglc();
extern pointer ___irtglc(context*,int,pointer*);
static void register_irtglc()
{ add_module_initializer("___irtglc", ___irtglc);}
{ add_module_initializer("___irtglc", (pointer (*)(context*,int,pointer*))___irtglc);}

#define colsize(p) (intval(p->c.ary.dim[1]))
#define rowsize(p) (intval(p->c.ary.dim[0]))
Expand Down Expand Up @@ -89,11 +89,10 @@ pointer CTRANSPOSE_IMAGE_ROWS(ctx,n,argv)
return((pointer)dst);}}

#include "defun.h" // redefine defun for update defun() API
pointer ___irtglc(ctx,n,argv,env)
pointer ___irtglc(ctx,n,argv)
register context *ctx;
int n;
pointer argv[];
pointer env;
{
pointer mod=argv[0];
defun(ctx,"CTRANSPOSE-IMAGE-ROWS",mod,CTRANSPOSE_IMAGE_ROWS,NULL);
Expand Down