diff --git a/Dockerfile.test b/Dockerfile.test index 5676f43..27b0427 100644 --- a/Dockerfile.test +++ b/Dockerfile.test @@ -13,8 +13,5 @@ RUN chicken-install r7rs ENV PATH=${PATH}:/usr/local-other/bin ARG SCHEME=chibi ENV COMPILE_R7RS=${SCHEME} -RUN git clone https://github.com/ashinn/chibi-scheme.git --depth=1 -RUN cd chibi-scheme && make -j 16 && make -j 16 install -RUN mkdir -p ${HOME}/.snow && echo "()" > ${HOME}/.snow/config.scm -RUN snow-chibi install --always-yes --impls=chibi,chicken "(foreign c)" -RUN snow-chibi install --always-yes --impls=chibi,chicken "(srfi 170)" +COPY --from=local-build-compile-r7rs /opt/compile-r7rs /opt/compile-r7rs +ENV PATH=/opt/compile-r7rs:${PATH} diff --git a/Jenkinsfile b/Jenkinsfile index 3b56e0a..56f8115 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,6 +15,12 @@ pipeline { } stages { + stage('Build') { + steps { + sh "podman build -f Dockerfile --tag=local-build-compile-r7rs ." + } + } + stage('Test R6RS implementations') { steps { script { diff --git a/Makefile b/Makefile index d89f905..8fff371 100644 --- a/Makefile +++ b/Makefile @@ -52,6 +52,7 @@ test-r6rs: @grep "Test successfull" ${R6RSTMP}/compile-r7rs-test-result.txt || (echo "Test failed, output: " && cat ${R6RSTMP}/compile-r7rs-test-result.txt && exit 1) test-r6rs-docker: + docker build -f Dockerfile --tag=local-compile-r7rs . docker build -f Dockerfile.test --build-arg IMAGE=${DOCKERIMG} --build-arg SCHEME=${SCHEME} --tag=compile-r7rs-test-${SCHEME} . docker run -v "${PWD}":/workdir -w /workdir -t compile-r7rs-test-${SCHEME} sh -c "make && make install && make SCHEME=${SCHEME} test-r6rs" @@ -74,6 +75,7 @@ test-r7rs: @grep "Test successfull" ${R7RSTMP}/compile-r7rs-test-result.txt || (echo "Test failed, output: " && cat ${R7RSTMP}/compile-r7rs-test-result.txt && exit 1) test-r7rs-docker: + docker build -f Dockerfile --tag=local-compile-r7rs . docker build -f Dockerfile.test --build-arg IMAGE=${DOCKERIMG} --build-arg SCHEME=${SCHEME} --tag=compile-r7rs-test-${SCHEME} . docker run -v "${PWD}":/workdir -w /workdir -t compile-r7rs-test-${SCHEME} sh -c "make && make install && make SCHEME=${SCHEME} test-r7rs"