diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 9b9fac88..863ef081 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -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 @@ -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: diff --git a/.travis.sh b/.travis.sh index 14a68340..90402169 100755 --- a/.travis.sh +++ b/.travis.sh @@ -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 @@ -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 diff --git a/irteus/Makefile b/irteus/Makefile index 51fed4ae..ab6d8798 100644 --- a/irteus/Makefile +++ b/irteus/Makefile @@ -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 diff --git a/irteus/eusbullet.c b/irteus/eusbullet.c index ad12be03..ab92861b 100644 --- a/irteus/eusbullet.c +++ b/irteus/eusbullet.c @@ -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); diff --git a/irteus/euspng.c b/irteus/euspng.c index 2f69e547..17f4c7b4 100644 --- a/irteus/euspng.c +++ b/irteus/euspng.c @@ -46,9 +46,9 @@ #include #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) { diff --git a/irteus/euspqp.c b/irteus/euspqp.c index 4d925073..aa5fd233 100644 --- a/irteus/euspqp.c +++ b/irteus/euspqp.c @@ -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); diff --git a/irteus/irtc.c b/irteus/irtc.c index 1f56065d..80faf80e 100644 --- a/irteus/irtc.c +++ b/irteus/irtc.c @@ -44,9 +44,9 @@ #include "eus.h" #include "nr.h" #include -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])) @@ -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); diff --git a/irteus/irtgeoc.c b/irteus/irtgeoc.c index 5203b017..d5324b63 100644 --- a/irteus/irtgeoc.c +++ b/irteus/irtgeoc.c @@ -2,9 +2,9 @@ #include "eus.h" #include -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);} // // @@ -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); diff --git a/irteus/irtglc.c b/irteus/irtglc.c index 218b2057..1e01cc24 100644 --- a/irteus/irtglc.c +++ b/irteus/irtglc.c @@ -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])) @@ -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);