Adding more Jenkins tests
This commit is contained in:
parent
0af0378c0e
commit
1752e4a8fc
|
|
@ -18,11 +18,17 @@ pipeline {
|
||||||
tests.each { test ->
|
tests.each { test ->
|
||||||
stage("${implementation} ${test}") {
|
stage("${implementation} ${test}") {
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
sh "docker build --build-arg COMPILE_R7RS=${implementation} --tag=r7rs-pffi-test-${implementation} -f Dockerfile.test ."
|
sh "docker build --build-arg COMPILE_R7RS=${implementation} --tag=r7rs-pffi-test-${implementation} -f dockerfiles/Dockerfile.test ."
|
||||||
sh "docker run -v ${WORKSPACE}:/workdir -w /workdir -t r7rs-pffi-test-${implementation} sh -c \"make COMPILE_R7RS=${implementation} TESTNAME=primitives test-compile-r7rs\""
|
sh "docker run -v ${WORKSPACE}:/workdir -w /workdir -t r7rs-pffi-test-${implementation} sh -c \"make COMPILE_R7RS=${implementation} TESTNAME=primitives test-compile-r7rs\""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage("${implementation} snow-chibi install test") {
|
||||||
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "docker build --build-arg COMPILE_R7RS=${implementation} --tag=r7rs-pffi-test-${implementation} -f dockerfiles/Dockerfile.snow-chibi-install-test ."
|
||||||
|
sh "docker run -v ${WORKSPACE}:/workdir -w /workdir -t r7rs-pffi-test-${implementation} sh -c \"make clean-package package && snow-chibi install --impls=foreign-c-0.10.0.tgz && ${implementation} tests/hello.scm\""
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
65
Makefile
65
Makefile
|
|
@ -21,6 +21,7 @@ package:
|
||||||
--version=${VERSION} \
|
--version=${VERSION} \
|
||||||
--authors="Retropikzel" \
|
--authors="Retropikzel" \
|
||||||
--doc=README.html \
|
--doc=README.html \
|
||||||
|
--foreign-depends=ffi \
|
||||||
--description="Portable foreign function interface for R7RS Schemes" \
|
--description="Portable foreign function interface for R7RS Schemes" \
|
||||||
foreign/c.sld
|
foreign/c.sld
|
||||||
|
|
||||||
|
|
@ -89,6 +90,69 @@ docs:
|
||||||
-o documentation/foreign-c.pdf \
|
-o documentation/foreign-c.pdf \
|
||||||
README.md
|
README.md
|
||||||
|
|
||||||
|
chibi: foreign/c/primitives/chibi/foreign-c.stub
|
||||||
|
chibi-ffi foreign/c/primitives/chibi/foreign-c.stub
|
||||||
|
${CC} \
|
||||||
|
-g3 \
|
||||||
|
-o foreign/c/primitives/chibi/foreign-c.so \
|
||||||
|
foreign/c/primitives/chibi/foreign-c.c \
|
||||||
|
-fPIC \
|
||||||
|
-lffi \
|
||||||
|
-shared
|
||||||
|
|
||||||
|
chicken:
|
||||||
|
@echo "Nothing to build for Chicken"
|
||||||
|
|
||||||
|
cyclone:
|
||||||
|
@echo "Nothing to build for Cyclone"
|
||||||
|
|
||||||
|
gambit:
|
||||||
|
@echo "Nothing to build for Gambit"
|
||||||
|
|
||||||
|
gauche: primitives/gauche/foreign-c-primitives-gauche.c primitives/gauche/gauchelib.scm
|
||||||
|
gauche-package compile \
|
||||||
|
--srcdir=primitives/gauche \
|
||||||
|
--cc=${CC} \
|
||||||
|
--cflags="-I./primitives/include" \
|
||||||
|
--libs=-lffi \
|
||||||
|
foreign-c-primitives-gauche foreign-c-primitives-gauche.c gauchelib.scm
|
||||||
|
mkdir -p lib
|
||||||
|
mv foreign-c-primitives-gauche.so lib/gauche.so
|
||||||
|
mv foreign-c-primitives-gauche.o lib/gauche.o
|
||||||
|
|
||||||
|
gerbil:
|
||||||
|
@echo "Nothing to build for Gerbil"
|
||||||
|
|
||||||
|
guile:
|
||||||
|
@echo "Nothing to build for Guile"
|
||||||
|
|
||||||
|
kawa:
|
||||||
|
@echo "Nothing to build for Kawa"
|
||||||
|
|
||||||
|
larceny:
|
||||||
|
@echo "Nothing to build for Larceny"
|
||||||
|
|
||||||
|
mosh:
|
||||||
|
@echo "Nothing to build for Mosh"
|
||||||
|
|
||||||
|
racket:
|
||||||
|
@echo "Nothing to build for Racket"
|
||||||
|
|
||||||
|
sagittarius:
|
||||||
|
@echo "Nothing to build for Sagittarius"
|
||||||
|
|
||||||
|
skint:
|
||||||
|
@echo "Nothing to build for Skint"
|
||||||
|
|
||||||
|
stklos:
|
||||||
|
@echo "Nothing to build for Stklos"
|
||||||
|
|
||||||
|
tr7:
|
||||||
|
@echo "Nothing to build for tr7"
|
||||||
|
|
||||||
|
ypsilon:
|
||||||
|
@echo "Nothing to build for Ypsilon"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
find . -name "*.meta" -delete
|
find . -name "*.meta" -delete
|
||||||
find . -name "*.link" -delete
|
find . -name "*.link" -delete
|
||||||
|
|
@ -100,3 +164,4 @@ clean:
|
||||||
find . -name "core.1" -delete
|
find . -name "core.1" -delete
|
||||||
find . -name "*@gambit*" -delete
|
find . -name "*@gambit*" -delete
|
||||||
rm -rf tmp
|
rm -rf tmp
|
||||||
|
rm foreign/c/primitives/chibi/foreign-c.c
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
ARG COMPILE_R7RS=chibi
|
||||||
|
FROM debian:bookworm AS build
|
||||||
|
RUN apt-get update && apt-get install -y wget build-essential make git
|
||||||
|
RUN git clone https://github.com/Retropikzel/chibi-scheme.git --branch=snow-chibi-foreign-depends
|
||||||
|
RUN cd chibi-scheme && make PREFIX=/usr/local-other && make PREFIX=/usr/local-other install
|
||||||
|
|
||||||
|
FROM schemers/${COMPILE_R7RS}
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
build-essential \
|
||||||
|
git \
|
||||||
|
make \
|
||||||
|
libffi8 \
|
||||||
|
libgc1 \
|
||||||
|
libssl3 \
|
||||||
|
libuv1 \
|
||||||
|
build-essential \
|
||||||
|
libffi-dev \
|
||||||
|
libmbedtls-dev
|
||||||
|
COPY --from=build /usr/local-other /usr/local-other
|
||||||
|
RUN rm -rf /usr/local/bin/snow-chibi
|
||||||
|
ENV PATH=${PATH}:/usr/local-other/bin
|
||||||
|
RUN git clone https://gitea.scheme.org/Retropikzel/compile-r7rs.git --depth=1
|
||||||
|
RUN cd compile-r7rs && make && make install
|
||||||
|
|
||||||
|
|
@ -1,13 +1,10 @@
|
||||||
(cond-expand
|
(cond-expand
|
||||||
(windows (define-c-library libc
|
(windows (define-c-library libc '("stdio.h" "string.h") "ucrtbase" '()))
|
||||||
'("stdio.h" "string.h")
|
|
||||||
"ucrtbase"
|
|
||||||
'((additional-versions ("0" "6")))))
|
|
||||||
(else
|
(else
|
||||||
(define c-library "c")
|
;(define c-library "c")
|
||||||
(when (get-environment-variable "BE_HOST_CPU")
|
#;(when (get-environment-variable "BE_HOST_CPU")
|
||||||
(set! c-library "root"))
|
(set! c-library "root"))
|
||||||
(define-c-library libc
|
(define-c-library libc
|
||||||
'("stdio.h" "string.h")
|
'("stdio.h" "string.h")
|
||||||
c-library
|
"c"
|
||||||
'((additional-versions ("" "0" "6" "7"))))))
|
'((additional-versions ("0" "6"))))))
|
||||||
|
|
|
||||||
|
|
@ -2,31 +2,6 @@
|
||||||
(scheme write)
|
(scheme write)
|
||||||
(foreign c))
|
(foreign c))
|
||||||
|
|
||||||
|
(define-c-procedure c-puts libc 'puts 'int '(pointer))
|
||||||
(cond-expand
|
(c-puts "Hello from C!")
|
||||||
(windows (define-c-library c-stdlib
|
|
||||||
'("stdlib.h")
|
|
||||||
"ucrtbase"
|
|
||||||
'()))
|
|
||||||
(else (define-c-library c-stdlib
|
|
||||||
'("stdlib.h")
|
|
||||||
"c"
|
|
||||||
'((additional-versions ("6"))))))
|
|
||||||
|
|
||||||
(define-c-procedure c-system c-stdlib 'system 'int '(pointer))
|
|
||||||
|
|
||||||
(define (anything->string item)
|
|
||||||
(parameterize
|
|
||||||
((current-output-port (open-output-string)))
|
|
||||||
(display item)
|
|
||||||
(get-output-string (current-output-port))))
|
|
||||||
|
|
||||||
(define (system command)
|
|
||||||
(c-system (string->c-utf8
|
|
||||||
(apply string-append
|
|
||||||
(map (lambda (item)
|
|
||||||
(string-append (anything->string item) " "))
|
|
||||||
command)))))
|
|
||||||
|
|
||||||
(system '(ls))
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue