Compare commits

..

No commits in common. "52e17ff06e7aa1b60ccf7d147e990bbbdea8b3af" and "64dc7b200f16fe21ab4094bb88dec77403e2dc67" have entirely different histories.

9 changed files with 249 additions and 132 deletions

View File

@ -3,22 +3,9 @@ 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 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
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}
RUN apt-get update && apt-get install -y \
build-essential \
make \
libffi8 \
libgc1 \
libssl3 \
libuv1
RUN apt-get update && apt-get install -y make libffi8 libgc1 libssl3 libuv1
COPY --from=build /usr/local-other/ /usr/local-other/
ENV PATH=${PATH}:/usr/local-other/bin
ARG COMPILE_R7RS=chibi

View File

@ -1,12 +1,2 @@
FROM schemers/sagittarius
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
FROM debian:bookworm
RUN apt-get update && apt-get install -y make docker

237
Jenkinsfile vendored
View File

@ -1,37 +1,224 @@
pipeline {
agent {
dockerfile {
filename 'Dockerfile.jenkins'
args '--user=root -v /var/run/docker.sock:/var/run/docker.sock'
}
}
agent any
options {
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10'))
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10'))
}
stages {
stage("Get implementation lists") {
stage("Build") {
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=sagittarius' } }
steps {
script {
r6rs_implementations = sh 'sash -L ./snow -L . compile-r7rs.scm --list-r6rs-schemes'
r7rs_implementations = sh 'sash -L ./snow -L . compile-r7rs.scm --list-r7rs-schemes'
sh 'make'
sh 'make install'
sh 'make test-r6rs'
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'
}
}
}
stages {
stage('Test R6RS implementations') {
steps {
script {
r6rs_implementations.each { implementation->
stage("${implementation} ${test}") {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh "make test-r6rs COMPILE_R7RS=${implementation}"
}
}
}
}
stage("chibi r7rs") {
agent { dockerfile { filename 'Dockerfile'; args '--user=root'; additionalBuildArgs '--build-arg COMPILE_R7RS=chibi' } }
steps {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh 'make && make install'
sh 'make test-r7rs'
}
}
}
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'
}
}
}

View File

@ -3,20 +3,6 @@ PREFIX=/usr/local
build:
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:
mkdir -p snow
cp -r ../foreign-c/foreign snow/

View File

@ -232,15 +232,7 @@ The environment variable COMPILE\_R7RS must be set to the **name** of the
implementation as specified in the support list.
**This differs from the SRFI** as the SRFI excepts a path.
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:
To get the list of supported implementations run:
compile-r7rs --list-schemes
@ -322,10 +314,6 @@ tried to compile them in wrong order you would run:
## Usage with Docker
<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.
ARG COMPILE_R7RS=chibi

View File

@ -9,59 +9,39 @@
(libs library-util)
(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))
(for-each
(lambda (scheme)
(display scheme)
(newline))
all-schemes)
'(chezscheme
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))
(define scheme (if (get-environment-variable "COMPILE_R7RS")

Binary file not shown.

View File

@ -3,7 +3,7 @@
(import (scheme base)
(scheme file)
(scheme process-context)
(foreign c))
(retropikzel pffi))
(export string-replace
string-ends-with?
string-starts-with?

View File

@ -4,8 +4,7 @@
(import (scheme base)
(scheme write)
(scheme file)
(foreign c)
(scheme process-context))
(retropikzel r7rs-pffi))
(export ;posix-error?
;posix-error-name
;posix-error-message
@ -36,7 +35,7 @@
file-info:atime
file-info:mtime
file-info:ctime
;file-info-directory?
file-info-directory?
;file-info-fifo?
;file-info-symlink?
;file-info-regular?
@ -48,7 +47,7 @@
;open-directory
;read-directory
;close-directory
real-path
;real-path
;file-space
;temp-file-prefix
;create-temp-file
@ -83,4 +82,4 @@
;delete-environment-variable!
;terminal?
)
(include "170.scm"))
(include "170.scm"))