Docker fixes
This commit is contained in:
parent
c473f5f137
commit
079be1d1a3
|
@ -1,5 +1,6 @@
|
|||
ARG SCHEME=chibi
|
||||
FROM schemers/${SCHEME}:head
|
||||
ARG IMAGE=chibi:head
|
||||
FROM schemers/${IMAGE}
|
||||
RUN apt-get update && apt-get install -y \
|
||||
build-essential \
|
||||
make \
|
||||
|
|
10
Makefile
10
Makefile
|
@ -2,6 +2,10 @@ PREFIX=/usr/local
|
|||
SCHEME=chibi
|
||||
R6RSTMP=tmp/${SCHEME}-r6rs
|
||||
R7RSTMP=tmp/${SCHEME}-r7rs
|
||||
DOCKERIMG=${SCHEME}
|
||||
ifeq "${SCHEME}" "chicken"
|
||||
DOCKERIMG="chicken:5"
|
||||
endif
|
||||
|
||||
all: build
|
||||
|
||||
|
@ -41,7 +45,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.test --build-arg SCHEME=${SCHEME} --tag=compile-r7rs-test-${SCHEME} .
|
||||
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"
|
||||
|
||||
test-r7rs:
|
||||
|
@ -50,7 +54,7 @@ test-r7rs:
|
|||
mkdir -p ${R7RSTMP}/libs
|
||||
mkdir -p ${R7RSTMP}/libs/foo
|
||||
mkdir -p ${R7RSTMP}/libs/hello
|
||||
echo "(import (scheme base) (foo bar) (hello world) (srfi 9001)) (baz) (hello-word) (over-9000)" > ${R7RSTMP}/main.scm
|
||||
echo "(import (scheme base) (foo bar) (hello world) (srfi 9001)) (baz) (hello-world) (over-9000)" > ${R7RSTMP}/main.scm
|
||||
echo "(define baz (lambda () (display \"Test successfull\") (newline)))" > ${R7RSTMP}/libs/foo/bar.scm
|
||||
echo "(define-library (foo bar) (import (scheme base) (scheme write) (hello world)) (export baz) (include \"bar.scm\"))" > ${R7RSTMP}/libs/foo/bar.sld
|
||||
echo "(define hello-world (lambda () (+ 1 1)))" > ${R7RSTMP}/libs/hello/world.scm
|
||||
|
@ -63,7 +67,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.test --build-arg SCHEME=${SCHEME} --tag=compile-r7rs-test-${SCHEME} .
|
||||
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"
|
||||
|
||||
clean:
|
||||
|
|
Loading…
Reference in New Issue