Fix Jenkins tests

This commit is contained in:
retropikzel 2026-07-04 12:56:38 +03:00
parent 298477770f
commit 3e2f06780b
3 changed files with 18 additions and 16 deletions

View File

@ -1,5 +1,5 @@
FROM alpine FROM schemers/chibi:head
RUN apk add make git docker RUN apt-get update && apt-get install -y \
RUN git clone https://codeberg.org/retropikzel/test-r7rs.git --depth=8 --branch=bugfixes gcc ca-certificates libffi-dev docker.io make
RUN cd test-r7rs && ./configure && make && make install ARG timestamp=0
COPY --from=schemers/chibi:alpine-head /usr/local /usr/local RUN snow-chibi install --impls=chibi retropikzel.test-r7rs && echo "$timestamp"

18
Jenkinsfile vendored
View File

@ -3,7 +3,7 @@ pipeline {
dockerfile { dockerfile {
label 'docker-x86_64' label 'docker-x86_64'
filename 'Dockerfile.jenkins' filename 'Dockerfile.jenkins'
args '--user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock' args '-t --user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock'
reuseNode true reuseNode true
} }
} }
@ -13,19 +13,19 @@ pipeline {
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10')) buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10'))
} }
parameters { environment {
string(name: 'R6RS_SCHEMES', defaultValue: 'capyscheme chezscheme guile ikarus ironscheme loko mosh racket sagittarius ypsilon', description: '') R6RS_SCHEMES='capyscheme chezscheme guile ikarus ironscheme loko mosh racket sagittarius ypsilon'
string(name: 'R7RS_SCHEMES', defaultValue: 'capyscheme chibi chicken cyclone foment gauche gambit guile kawa loko meevax mit-scheme mosh racket sagittarius skint stklos tr7 ypsilon', description: '') R7RS_SCHEMES='capyscheme chibi chicken cyclone foment gauche gambit guile kawa loko meevax mit-scheme mosh racket sagittarius skint stklos tr7 ypsilon'
string(name: 'LIBRARIES', defaultValue: 'ctrf mouth string url-encoding leb128', description: '') LIBRARIES='ctrf mouth string url-encoding leb128'
} }
stages { stages {
stage('R6RS tests') { stage('R6RS tests') {
steps { steps {
script { script {
params.LIBRARIES.split().each { LIBRARY -> env.LIBRARIES.split().each { LIBRARY ->
stage("${LIBRARY}") { stage("${LIBRARY}") {
params.R6RS_SCHEMES.split().each { SCHEME -> env.R6RS_SCHEMES.split().each { SCHEME ->
stage("${SCHEME}") { stage("${SCHEME}") {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh "timeout 6000 make SCHEME=${SCHEME} LIBRARY=${LIBRARY} RNRS=r6rs test-docker" sh "timeout 6000 make SCHEME=${SCHEME} LIBRARY=${LIBRARY} RNRS=r6rs test-docker"
@ -40,9 +40,9 @@ pipeline {
stage('R7RS tests') { stage('R7RS tests') {
steps { steps {
script { script {
params.LIBRARIES.split().each { LIBRARY -> env.LIBRARIES.split().each { LIBRARY ->
stage("${LIBRARY}") { stage("${LIBRARY}") {
params.R7RS_SCHEMES.split().each { SCHEME -> env.R7RS_SCHEMES.split().each { SCHEME ->
stage("${SCHEME}") { stage("${SCHEME}") {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh "timeout 6000 make SCHEME=${SCHEME} LIBRARY=${LIBRARY} RNRS=r7rs test-docker" sh "timeout 6000 make SCHEME=${SCHEME} LIBRARY=${LIBRARY} RNRS=r7rs test-docker"

View File

@ -33,10 +33,12 @@ package: retropikzel/${LIBRARY}/LICENSE retropikzel/${LIBRARY}/VERSION retropikz
--description="${DESCRIPTION}" \ --description="${DESCRIPTION}" \
${LIBRARY_FILE} ${LIBRARY_FILE}
${PKG}: package
install: install:
snow-chibi install --impls=${SCHEME} ${PKG} snow-chibi install --impls=${SCHEME} ${PKG}
testfiles: package ${TESTFILE} testfiles: ${PKG} ${TESTFILE}
rm -rf ${tmpdir} rm -rf ${tmpdir}
mkdir -p ${tmpdir} mkdir -p ${tmpdir}
cp ${PKG} ${tmpdir} cp ${PKG} ${tmpdir}
@ -48,7 +50,7 @@ test: testfiles
cd ${tmpdir} && COMPILE_R7RS=${SCHEME} CSC_OPIONS="-L -lcurl" compile-r7rs -o test-program -I . test.${SFX} cd ${tmpdir} && COMPILE_R7RS=${SCHEME} CSC_OPIONS="-L -lcurl" compile-r7rs -o test-program -I . test.${SFX}
cd ${tmpdir} && ./test-program cd ${tmpdir} && ./test-program
test-docker: package testfiles test-docker: testfiles
SNOW_PACKAGES="srfi.64 ${PKG}" \ SNOW_PACKAGES="srfi.64 ${PKG}" \
APT_PACKAGES="libcurl4-openssl-dev" \ APT_PACKAGES="libcurl4-openssl-dev" \
AKKU_PACKAGES="akku-r7rs" \ AKKU_PACKAGES="akku-r7rs" \