Improving testing

This commit is contained in:
retropikzel 2025-11-28 11:31:44 +02:00
parent 926bfed895
commit 9850f8e632
3 changed files with 8 additions and 11 deletions

2
.gitignore vendored
View File

@ -3,4 +3,6 @@
*.swo
*.tgz
.*
Akku.lock
Akku.manifest

View File

@ -2,7 +2,7 @@ ARG SCHEME=chibi
ARG IMAGE=${SCHEME}:head
FROM debian:trixie AS build
RUN apt-get update && apt-get install -y \
git ca-certificates make gcc libffi-dev libffi-dev wget xz-utils
git ca-certificates make gcc libffi-dev libffi-dev wget xz-utils libcurl4
RUN mkdir ${HOME}/.snow && echo "()" > ${HOME}/.snow/config.scm
WORKDIR /build
RUN wget https://gitlab.com/-/project/6808260/uploads/094ce726ce3c6cf8c14560f1e31aaea0/akku-1.1.0.amd64-linux.tar.xz \
@ -10,19 +10,16 @@ RUN wget https://gitlab.com/-/project/6808260/uploads/094ce726ce3c6cf8c14560f1e3
&& mv akku-1.1.0.amd64-linux akku
RUN git clone https://github.com/ashinn/chibi-scheme.git --depth=1
RUN git clone https://codeberg.org/retropikzel/compile-scheme.git --depth=1
RUN git clone https://codeberg.org/foreign-c/foreign-c.git --depth=1
WORKDIR /build/chibi-scheme
RUN make
RUN make install
WORKDIR /build/compile-scheme
RUN make build-gauche
WORKDIR /build
RUN akku install chez-srfi akku-r7rs "(foreign c)"
ARG SCHEME=chibi
ARG IMAGE=${SCHEME}:head
FROM schemers/${IMAGE}
RUN apt-get update && apt-get install -y make gcc libffi-dev libcurl4 gauche
RUN apt-get update && apt-get install -y make libffi-dev libcurl4 gauche
RUN mkdir ${HOME}/.snow && echo "()" > ${HOME}/.snow/config.scm
COPY --from=build /build /build
ARG SCHEME=chibi
@ -37,10 +34,9 @@ RUN bash install.sh
ENV PATH=/root/.local/bin:${PATH}
RUN akku update
WORKDIR /
RUN snow-chibi install --impls=${SCHEME} --always-yes "(srfi 64)"
RUN snow-chibi install --impls=${SCHEME} --always-yes "(foreign c)"
RUN timeout 60 snow-chibi install --impls=${SCHEME} --always-yes "(srfi 64)"
RUN timeout 60 snow-chibi install --impls=${SCHEME} --always-yes "(foreign c)"
WORKDIR /workdir
COPY Makefile .
COPY retropikzel retropikzel/
COPY /build/.akku .akku

View File

@ -30,11 +30,10 @@ uninstall:
-snow-chibi remove --impls=${SCHEME} ${PKG}
.akku:
akku install chez-srfi akku-r7rs "(foreign c)"
akku install chez-srfi akku-r7rs
tmpdir: .akku
mkdir -p ${TMPDIR}
cp -r .akku ${TMPDIR}/
cp ${TESTFILE} ${TMPDIR}/
mkdir -p ${TMPDIR}/retropikzel
cp -r retropikzel/${LIBRARY} ${TMPDIR}/retropikzel/
@ -54,6 +53,7 @@ test-r6rs: tmpdir
cd ${TMPDIR} && echo "(import (rnrs) (retropikzel ${LIBRARY}) (srfi :64))" > test-r6rs.sps
cd ${TMPDIR} && cat retropikzel/${LIBRARY}/test.scm >> test-r6rs.sps
cd ${TMPDIR} && akku install
cp -r .akku/* ${TMPDIR}/.akku/
cd ${TMPDIR} && COMPILE_R7RS=${SCHEME} compile-scheme -I .akku/lib -o test-r6rs test-r6rs.sps
cd ${TMPDIR} && ./test-r6rs
@ -61,6 +61,5 @@ test-r6rs-docker:
docker build --build-arg IMAGE=${DOCKERIMG} --build-arg SCHEME=${SCHEME} --tag=foreign-c-library-test-${SCHEME} .
docker run -t foreign-c-library-test-${SCHEME} sh -c "make SCHEME=${SCHEME} test-r6rs"
clean:
git clean -X -f