Adding tests to Jenkins
This commit is contained in:
parent
df23d7f230
commit
52e17ff06e
15
Dockerfile
15
Dockerfile
|
@ -3,9 +3,22 @@ FROM debian:bookworm AS build
|
||||||
RUN apt-get update && apt-get install -y build-essential wget make cmake libgc-dev zlib1g-dev libffi-dev libssl-dev
|
RUN apt-get update && apt-get install -y build-essential wget make cmake libgc-dev zlib1g-dev libffi-dev libssl-dev
|
||||||
RUN wget https://bitbucket.org/ktakashi/sagittarius-scheme/downloads/sagittarius-0.9.12.tar.gz && tar -xf sagittarius-0.9.12.tar.gz
|
RUN wget https://bitbucket.org/ktakashi/sagittarius-scheme/downloads/sagittarius-0.9.12.tar.gz && tar -xf sagittarius-0.9.12.tar.gz
|
||||||
RUN cd sagittarius-0.9.12 && mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/usr/local-other .. && make && make install
|
RUN cd sagittarius-0.9.12 && mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/usr/local-other .. && make && make install
|
||||||
|
WORKDIR /workdir
|
||||||
|
COPY Makefile .
|
||||||
|
COPY compile-r7rs.scm .
|
||||||
|
COPY snow/ snow/
|
||||||
|
COPY libs/ libs/
|
||||||
|
RUN ls -1
|
||||||
|
RUN make && make install PREFIX=/usr/local-other
|
||||||
|
|
||||||
FROM schemers/${COMPILE_R7RS}
|
FROM schemers/${COMPILE_R7RS}
|
||||||
RUN apt-get update && apt-get install -y make libffi8 libgc1 libssl3 libuv1
|
RUN apt-get update && apt-get install -y \
|
||||||
|
build-essential \
|
||||||
|
make \
|
||||||
|
libffi8 \
|
||||||
|
libgc1 \
|
||||||
|
libssl3 \
|
||||||
|
libuv1
|
||||||
COPY --from=build /usr/local-other/ /usr/local-other/
|
COPY --from=build /usr/local-other/ /usr/local-other/
|
||||||
ENV PATH=${PATH}:/usr/local-other/bin
|
ENV PATH=${PATH}:/usr/local-other/bin
|
||||||
ARG COMPILE_R7RS=chibi
|
ARG COMPILE_R7RS=chibi
|
||||||
|
|
|
@ -1,2 +1,12 @@
|
||||||
FROM debian:bookworm
|
FROM schemers/sagittarius
|
||||||
RUN apt-get update && apt-get install -y make docker
|
RUN apt-get update && apt-get install -y \
|
||||||
|
build-essential wget make cmake libgc-dev zlib1g-dev libffi-dev \
|
||||||
|
libssl-dev docker.io
|
||||||
|
WORKDIR /builddir
|
||||||
|
COPY Makefile .
|
||||||
|
COPY compile-r7rs.scm .
|
||||||
|
COPY snow/ snow/
|
||||||
|
COPY libs/ libs/
|
||||||
|
RUN ls -1
|
||||||
|
RUN make && make install
|
||||||
|
WORKDIR /workdir
|
||||||
|
|
|
@ -1,224 +1,37 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent {
|
||||||
|
dockerfile {
|
||||||
|
filename 'Dockerfile.jenkins'
|
||||||
|
args '--user=root -v /var/run/docker.sock:/var/run/docker.sock'
|
||||||
|
}
|
||||||
|
}
|
||||||
options {
|
options {
|
||||||
disableConcurrentBuilds()
|
disableConcurrentBuilds()
|
||||||
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10'))
|
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10'))
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage("Build") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=sagittarius' } }
|
stage("Get implementation lists") {
|
||||||
steps {
|
steps {
|
||||||
sh 'make'
|
script {
|
||||||
sh 'make install'
|
r6rs_implementations = sh 'sash -L ./snow -L . compile-r7rs.scm --list-r6rs-schemes'
|
||||||
sh 'make test-r6rs'
|
r7rs_implementations = sh 'sash -L ./snow -L . compile-r7rs.scm --list-r7rs-schemes'
|
||||||
sh 'make test-r7rs'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("chez r6rs") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=chezscheme' } }
|
|
||||||
steps {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh 'make && make install'
|
|
||||||
sh 'make test-r6rs'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage("chibi r7rs") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=chibi' } }
|
stages {
|
||||||
steps {
|
stage('Test R6RS implementations') {
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
steps {
|
||||||
sh 'make && make install'
|
script {
|
||||||
sh 'make test-r7rs'
|
r6rs_implementations.each { implementation->
|
||||||
}
|
stage("${implementation} ${test}") {
|
||||||
}
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
}
|
sh "make test-r6rs COMPILE_R7RS=${implementation}"
|
||||||
stage("cyclone r7rs") {
|
}
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=cyclone' } }
|
}
|
||||||
steps {
|
}
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
}
|
||||||
sh 'make && make install'
|
|
||||||
sh 'make test-r7rs'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("foment r7rs") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=foment' } }
|
|
||||||
steps {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh 'make && make install'
|
|
||||||
sh 'make test-r7rs'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("gauche r7rs") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=gauche' } }
|
|
||||||
steps {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh 'make && make install'
|
|
||||||
sh 'make test-r7rs'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("guile r6rs") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=guile' } }
|
|
||||||
steps {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh 'make && make install'
|
|
||||||
sh 'make test-r6rs'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("guile r7rs") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=guile' } }
|
|
||||||
steps {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh 'make && make install'
|
|
||||||
sh 'make test-r7rs'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("ikarus r6rs") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=ikarus' } }
|
|
||||||
steps {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh 'make && make install'
|
|
||||||
sh 'make test-r6rs'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("ironscheme r6rs") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=ironscheme' } }
|
|
||||||
steps {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh 'make && make install'
|
|
||||||
sh 'make test-r6rs'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("kawa r7rs") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=kawa' } }
|
|
||||||
steps {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh 'make && make install'
|
|
||||||
sh 'make test-r7rs'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("larceny r6rs") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=larceny' } }
|
|
||||||
steps {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh 'make && make install'
|
|
||||||
sh 'make test-r6rs'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("larceny r7rs") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=larceny' } }
|
|
||||||
steps {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh 'make && make install'
|
|
||||||
sh 'make test-r7rs'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("loko r6rs") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=loko' } }
|
|
||||||
steps {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh 'make && make install'
|
|
||||||
sh 'make test-r6rs'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("loko r7rs") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=loko' } }
|
|
||||||
steps {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh 'make && make install'
|
|
||||||
sh 'make test-r7rs'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("mit-scheme r7rs") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=mit-scheme' } }
|
|
||||||
steps {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh 'make && make install'
|
|
||||||
sh 'make test-r7rs'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("mosh r6rs") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=mosh' } }
|
|
||||||
steps {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh 'make && make install'
|
|
||||||
sh 'make test-r6rs'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("mosh r7rs") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=mosh' } }
|
|
||||||
steps {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh 'make && make install'
|
|
||||||
sh 'make test-r7rs'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("sagittarius r6rs") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=sagittarius' } }
|
|
||||||
steps {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh 'apt-get update && apt-get install -y make libuv1'
|
|
||||||
sh 'make && make install'
|
|
||||||
sh 'make test-r6rs'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("sagittarius r7rs") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=sagittarius' } }
|
|
||||||
steps {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh 'make && make install'
|
|
||||||
sh 'make test-r7rs'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("skint r7rs") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=skint' } }
|
|
||||||
steps {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh 'make && make install'
|
|
||||||
sh 'make test-r7rs'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("tr7 r7rs") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=tr7' } }
|
|
||||||
steps {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh 'make && make install'
|
|
||||||
sh 'make test-r7rs'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("ypsilon r6rs") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=ypsilon' } }
|
|
||||||
steps {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh 'make && make install'
|
|
||||||
sh 'make test-r6rs'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("ypsilon r7rs") {
|
|
||||||
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=ypsilon' } }
|
|
||||||
steps {
|
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
||||||
sh 'make && make install'
|
|
||||||
sh 'make test-r7rs'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
14
Makefile
14
Makefile
|
@ -3,6 +3,20 @@ PREFIX=/usr/local
|
||||||
build:
|
build:
|
||||||
printf "#!/bin/sh\nsash --disable-cache -r7 -L ${PREFIX}/lib/compile-r7rs/snow ${PREFIX}/lib/compile-r7rs/main.scm \"\$$@\"\n" > compile-r7rs
|
printf "#!/bin/sh\nsash --disable-cache -r7 -L ${PREFIX}/lib/compile-r7rs/snow ${PREFIX}/lib/compile-r7rs/main.scm \"\$$@\"\n" > compile-r7rs
|
||||||
|
|
||||||
|
build-docker-images:
|
||||||
|
for implementation in $(shell sash -L ./snow -L . compile-r7rs.scm --list-schemes); \
|
||||||
|
do \
|
||||||
|
docker build . --build-arg COMPILE_R7RS=$${implementation} --tag=retropikzel1/compile-r7rs:$${implementation}; \
|
||||||
|
done
|
||||||
|
|
||||||
|
#for implementation in $(shell sash -L ./snow -L . compile-r7rs.scm --list-schemes);
|
||||||
|
|
||||||
|
push-docker-images:
|
||||||
|
for implementation in chibi chicken sagittarius; \
|
||||||
|
do \
|
||||||
|
docker push compile-r7rs:$${implementation}; \
|
||||||
|
done
|
||||||
|
|
||||||
snow:
|
snow:
|
||||||
mkdir -p snow
|
mkdir -p snow
|
||||||
cp -r ../foreign-c/foreign snow/
|
cp -r ../foreign-c/foreign snow/
|
||||||
|
|
14
README.md
14
README.md
|
@ -232,7 +232,15 @@ The environment variable COMPILE\_R7RS must be set to the **name** of the
|
||||||
implementation as specified in the support list.
|
implementation as specified in the support list.
|
||||||
**This differs from the SRFI** as the SRFI excepts a path.
|
**This differs from the SRFI** as the SRFI excepts a path.
|
||||||
|
|
||||||
To get the list of supported implementations run:
|
To get the list of supported R6RS implementations run:
|
||||||
|
|
||||||
|
compile-r7rs --list-r6rs-schemes
|
||||||
|
|
||||||
|
To get the list of supported R7RS implementations run:
|
||||||
|
|
||||||
|
compile-r7rs --list-r7rs-schemes
|
||||||
|
|
||||||
|
To get the list of all supported implementations run:
|
||||||
|
|
||||||
compile-r7rs --list-schemes
|
compile-r7rs --list-schemes
|
||||||
|
|
||||||
|
@ -314,6 +322,10 @@ tried to compile them in wrong order you would run:
|
||||||
## Usage with Docker
|
## Usage with Docker
|
||||||
<a name="#usage-with-docker"></a>
|
<a name="#usage-with-docker"></a>
|
||||||
|
|
||||||
|
You can compile the docker images with:
|
||||||
|
|
||||||
|
make build-docker-images
|
||||||
|
|
||||||
Here is a sample Dockerfile to get you started.
|
Here is a sample Dockerfile to get you started.
|
||||||
|
|
||||||
ARG COMPILE_R7RS=chibi
|
ARG COMPILE_R7RS=chibi
|
||||||
|
|
|
@ -9,39 +9,59 @@
|
||||||
(libs library-util)
|
(libs library-util)
|
||||||
(srfi 170))
|
(srfi 170))
|
||||||
|
|
||||||
|
(define r6rs-schemes '(chezscheme
|
||||||
|
guile
|
||||||
|
ikarus
|
||||||
|
ironscheme
|
||||||
|
larceny
|
||||||
|
loko
|
||||||
|
mosh
|
||||||
|
racket
|
||||||
|
sagittarius
|
||||||
|
ypsilon))
|
||||||
|
(define r7rs-schemes '(chibi
|
||||||
|
chicken
|
||||||
|
cyclone
|
||||||
|
gambit
|
||||||
|
foment
|
||||||
|
gauche
|
||||||
|
guile
|
||||||
|
kawa
|
||||||
|
larceny
|
||||||
|
loko
|
||||||
|
mit-scheme
|
||||||
|
mosh
|
||||||
|
racket
|
||||||
|
sagittarius
|
||||||
|
skint
|
||||||
|
stklos
|
||||||
|
tr7
|
||||||
|
ypsilon))
|
||||||
|
|
||||||
|
(define all-schemes (append r6rs-schemes r7rs-schemes))
|
||||||
|
|
||||||
|
(when (member "--list-r6rs-schemes" (command-line))
|
||||||
|
(for-each
|
||||||
|
(lambda (scheme)
|
||||||
|
(display scheme)
|
||||||
|
(newline))
|
||||||
|
r6rs-schemes)
|
||||||
|
(exit 0))
|
||||||
|
|
||||||
|
(when (member "--list-r7rs-schemes" (command-line))
|
||||||
|
(for-each
|
||||||
|
(lambda (scheme)
|
||||||
|
(display scheme)
|
||||||
|
(newline))
|
||||||
|
r7rs-schemes)
|
||||||
|
(exit 0))
|
||||||
|
|
||||||
(when (member "--list-schemes" (command-line))
|
(when (member "--list-schemes" (command-line))
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (scheme)
|
(lambda (scheme)
|
||||||
(display scheme)
|
(display scheme)
|
||||||
(newline))
|
(newline))
|
||||||
'(chezscheme
|
all-schemes)
|
||||||
chibi
|
|
||||||
chicken
|
|
||||||
cyclone
|
|
||||||
gambit
|
|
||||||
foment
|
|
||||||
gauche
|
|
||||||
;gerbil
|
|
||||||
guile
|
|
||||||
;husk
|
|
||||||
ikarus
|
|
||||||
ironscheme
|
|
||||||
kawa
|
|
||||||
larceny
|
|
||||||
loko
|
|
||||||
;meevax
|
|
||||||
mit-scheme
|
|
||||||
mosh
|
|
||||||
racket
|
|
||||||
;picrin
|
|
||||||
;scheme-rs
|
|
||||||
;stak
|
|
||||||
sagittarius
|
|
||||||
skint
|
|
||||||
stklos
|
|
||||||
tr7
|
|
||||||
;vicare
|
|
||||||
ypsilon))
|
|
||||||
(exit 0))
|
(exit 0))
|
||||||
|
|
||||||
(define scheme (if (get-environment-variable "COMPILE_R7RS")
|
(define scheme (if (get-environment-variable "COMPILE_R7RS")
|
||||||
|
|
Loading…
Reference in New Issue