Skip to content

Commit 4f29714

Browse files
committed
crystal..idris: Fix Earthfiles
1 parent 8f58db3 commit 4f29714

File tree

25 files changed

+256
-17
lines changed

25 files changed

+256
-17
lines changed

Earthfile

+24
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,34 @@ VERSION 0.8
33
IMPORT ./c
44
IMPORT ./clojure
55
IMPORT ./coq
6+
IMPORT ./crystal
7+
IMPORT ./csharp
8+
IMPORT ./erlang
9+
IMPORT ./go
10+
IMPORT ./haskell
11+
IMPORT ./idris
612

713
build:
814
FROM scratch
915
BUILD c+build
1016
BUILD clojure+build
1117
BUILD coq+build
18+
BUILD crystal+build
19+
BUILD csharp+build
20+
BUILD erlang+build
21+
BUILD go+build
22+
BUILD haskell+build
23+
BUILD idris+build
1224
WORKDIR /corpus
1325
COPY c+build/corpus/c c
1426
COPY clojure+build/corpus/clojure clojure
1527
COPY coq+build/corpus/coq coq
28+
COPY crystal+build/corpus/crystal crystal
29+
COPY csharp+build/corpus/csharp csharp
30+
COPY erlang+build/corpus/erlang erlang
31+
COPY go+build/corpus/go go
32+
COPY haskell+build/corpus/haskell haskell
33+
COPY idris+build/corpus/idris idris
1634
SAVE ARTIFACT /corpus /corpus
1735

1836
docker:
@@ -26,3 +44,9 @@ docker-all:
2644
BUILD c+docker-all
2745
BUILD clojure+docker-all
2846
BUILD coq+docker-all
47+
BUILD crystal+docker-all
48+
BUILD csharp+docker-all
49+
BUILD erlang+docker-all
50+
BUILD go+docker-all
51+
BUILD haskell+docker-all
52+
BUILD idris+docker-all

crystal/Earthfile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
VERSION 0.8
2+
3+
IMPORT ./collidedscope-spiceweight AS crystal-collidedscope-spiceweight
4+
5+
build:
6+
FROM scratch
7+
BUILD crystal-collidedscope-spiceweight+build
8+
WORKDIR /corpus/crystal
9+
COPY crystal-collidedscope-spiceweight+build/ collidedscope-spiceweight/
10+
SAVE ARTIFACT /corpus /corpus
11+
12+
docker:
13+
FROM alpine
14+
WORKDIR /corpus/crystal
15+
COPY +build/ /
16+
SAVE IMAGE wspace-corpus/crystal
17+
18+
docker-all:
19+
BUILD +docker
20+
BUILD crystal-collidedscope-spiceweight+docker

crystal/collidedscope-spiceweight/Earthfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ build:
55
RUN apk add --no-cache make crystal
66
WORKDIR /spiceweight
77
COPY spiceweight .
8-
RUN make
8+
RUN crystal build --release --static -o spwt spiceweight.cr
99
SAVE ARTIFACT spwt /bin/
10+
SAVE ARTIFACT spec/fixtures /programs
1011

1112
docker:
1213
FROM scratch

csharp/Earthfile

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
VERSION 0.8
2+
3+
IMPORT ./denislabrecque AS csharp-denislabrecque
4+
IMPORT ./littlebughunter-assembler AS csharp-littlebughunter-assembler
5+
IMPORT ./meeees AS csharp-meeees
6+
IMPORT ./nicolasff-spacesharp AS csharp-nicolasff-spacesharp
7+
IMPORT ./north15-projectone AS csharp-north15-projectone
8+
IMPORT ./reflash AS csharp-reflash
9+
IMPORT ./rolisoft-esoteric AS csharp-rolisoft-esoteric
10+
IMPORT ./ryzngard-dotnot AS csharp-ryzngard-dotnot
11+
12+
build:
13+
FROM scratch
14+
BUILD csharp-denislabrecque+build
15+
BUILD csharp-littlebughunter-assembler+build
16+
BUILD csharp-meeees+build
17+
BUILD csharp-nicolasff-spacesharp+build
18+
BUILD csharp-north15-projectone+build
19+
# BUILD csharp-reflash+build
20+
BUILD csharp-rolisoft-esoteric+build
21+
# BUILD csharp-ryzngard-dotnot+build
22+
WORKDIR /corpus/csharp
23+
COPY csharp-denislabrecque+build/ denislabrecque/
24+
COPY csharp-littlebughunter-assembler+build/ littlebughunter-assembler/
25+
COPY csharp-meeees+build/ meeees/
26+
COPY csharp-nicolasff-spacesharp+build/ nicolasff-spacesharp/
27+
COPY csharp-north15-projectone+build/ north15-projectone/
28+
# COPY csharp-reflash+build/ reflash/
29+
COPY csharp-rolisoft-esoteric+build/ rolisoft-esoteric/
30+
# COPY csharp-ryzngard-dotnot+build/ ryzngard-dotnot/
31+
SAVE ARTIFACT /corpus /corpus
32+
33+
docker:
34+
FROM alpine
35+
WORKDIR /corpus/csharp
36+
COPY +build/ /
37+
SAVE IMAGE wspace-corpus/csharp
38+
39+
docker-all:
40+
BUILD +docker
41+
BUILD csharp-denislabrecque+docker
42+
BUILD csharp-littlebughunter-assembler+docker
43+
BUILD csharp-meeees+docker
44+
BUILD csharp-nicolasff-spacesharp+docker
45+
BUILD csharp-north15-projectone+docker
46+
# BUILD csharp-reflash+docker
47+
BUILD csharp-rolisoft-esoteric+docker
48+
# BUILD csharp-ryzngard-dotnot+docker

csharp/littlebughunter-assembler/Earthfile

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ build:
66
COPY WhitespaceAssembler .
77
RUN msbuild -p:Configuration=Release
88
SAVE ARTIFACT bin/Release/WhitespaceAssembler.exe /bin/
9+
SAVE ARTIFACT examples /programs
910

1011
docker:
1112
FROM mono:slim

csharp/meeees/Earthfile

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ build:
66
COPY Whitespace .
77
RUN msbuild -p:Configuration=Release
88
SAVE ARTIFACT bin/Release/Whitespace.exe /bin/
9+
SAVE ARTIFACT tests /programs
910

1011
docker:
1112
FROM mono:slim

csharp/nicolasff-spacesharp/Earthfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ build:
1111
RUN make MCS=mcs
1212
SAVE ARTIFACT wsc.exe /bin/
1313
SAVE ARTIFACT libwsp.dll /bin/
14-
SAVE ARTIFACT tests/ws/*.ws /programs/
14+
SAVE ARTIFACT tests/ws /programs
1515

1616
docker:
17+
# Requires full mono, not mono:slim, for the mono compiler
1718
FROM mono
1819
WORKDIR /spacesharp
1920
COPY +build/ .

csharp/reflash/Earthfile

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ build:
66
COPY WhiteSpaceInterpreter .
77
WORKDIR /WhiteSpaceInterpreter/WhiteSpaceInterpretator
88
RUN msbuild -p:Configuration=Release
9+
# TODO: Build fails: Mono does not implement WPF APIs
910
SAVE ARTIFACT WhiteSpaceInterpretator/bin/Release/WhiteSpaceInterpretator.exe /bin/
1011

1112
docker:

csharp/ryzngard-dotnot/Earthfile

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ build:
66
COPY DotNot .
77
RUN nuget restore
88
WORKDIR /DotNot/src/Whitespace.TestProject
9+
# TODO: Build fails: CSharpGeneratorDriver does not contain a constructor
10+
# that takes 3 arguments
911
RUN msbuild -p:Configuration=Release
10-
11-
docker:
12-
SAVE IMAGE wspace-corpus/csharp/ryzngard-dotnot

erlang/Earthfile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
VERSION 0.8
2+
3+
IMPORT ./derek121-mrwhite AS erlang-derek121-mrwhite
4+
5+
build:
6+
FROM scratch
7+
BUILD erlang-derek121-mrwhite+docker
8+
WORKDIR /corpus/erlang
9+
COPY erlang-derek121-mrwhite+build/ derek121-mrwhite/
10+
SAVE ARTIFACT /corpus /corpus
11+
12+
docker:
13+
FROM alpine
14+
WORKDIR /corpus/erlang
15+
COPY +build/ /
16+
SAVE IMAGE wspace-corpus/erlang
17+
18+
docker-all:
19+
BUILD +docker
20+
BUILD erlang-derek121-mrwhite+docker

erlang/derek121-mrwhite/Earthfile

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
VERSION 0.8
22

3-
docker:
3+
build:
44
FROM erlang
55
WORKDIR /mrwhite
6-
COPY mrwhite run.sh ./
6+
COPY mrwhite .
77
COPY mrwhite.erl src/
88
RUN erl -noshell \
99
-s leex file priv/from_text_lexer \
@@ -14,5 +14,14 @@ docker:
1414
mv priv/*.erl src/
1515
RUN rebar3 compile
1616
RUN rebar3 eunit
17-
ENTRYPOINT ["./run.sh"]
17+
COPY run.sh .
18+
SAVE ARTIFACT _build/default/lib/mrwhite/ebin /bin
19+
SAVE ARTIFACT run.sh /bin/
20+
SAVE ARTIFACT priv/sample /programs
21+
22+
docker:
23+
FROM erlang
24+
WORKDIR /mrwhite
25+
COPY +build/ .
26+
ENTRYPOINT ["bin/run.sh"]
1827
SAVE IMAGE wspace-corpus/erlang/derek121-mrwhite

erlang/derek121-mrwhite/run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh -e
22

3-
exec erl -pa _build/default/lib/mrwhite/ebin -noshell \
3+
exec erl -pa . -noshell \
44
-s mrwhite main "$@" \
55
-s erlang halt

go/Earthfile

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
VERSION 0.8
2+
3+
IMPORT ./135yshr-wspacego AS go-135yshr-wspacego
4+
IMPORT ./kinu AS go-kinu
5+
IMPORT ./makiuchid-whitenote AS go-makiuchid-whitenote
6+
# IMPORT ./petercxy-gogmh AS go-petercxy-gogmh
7+
IMPORT ./pocke-gows AS go-pocke-gows
8+
IMPORT ./qeedquan AS go-qeedquan
9+
IMPORT ./samuelpratt AS go-samuelpratt
10+
IMPORT ./simomu AS go-simomu
11+
IMPORT ./technohippy AS go-technohippy
12+
IMPORT ./tempxla-go-wspace AS go-tempxla-go-wspace
13+
IMPORT ./thaliaarchi-nebula AS go-thaliaarchi-nebula
14+
IMPORT ./zorchenhimer AS go-zorchenhimer
15+
16+
build:
17+
FROM scratch
18+
BUILD go-135yshr-wspacego+build
19+
BUILD go-kinu+build
20+
BUILD go-makiuchid-whitenote+build
21+
# BUILD go-petercxy-gogmh+build
22+
BUILD go-pocke-gows+build
23+
BUILD go-qeedquan+build
24+
BUILD go-samuelpratt+build
25+
BUILD go-simomu+build
26+
BUILD go-technohippy+build
27+
BUILD go-tempxla-go-wspace+build
28+
# BUILD go-thaliaarchi-nebula+build
29+
BUILD go-zorchenhimer+build
30+
WORKDIR /corpus/go
31+
COPY go-135yshr-wspacego+build/ 135yshr-wspacego/
32+
COPY go-kinu+build/ kinu/
33+
COPY go-makiuchid-whitenote+build/ makiuchid-whitenote/
34+
# COPY go-petercxy-gogmh+build/ petercxy-gogmh/
35+
COPY go-pocke-gows+build/ pocke-gows/
36+
COPY go-qeedquan+build/ qeedquan/
37+
COPY go-samuelpratt+build/ samuelpratt/
38+
COPY go-simomu+build/ simomu/
39+
COPY go-technohippy+build/ technohippy/
40+
COPY go-tempxla-go-wspace+build/ tempxla-go-wspace/
41+
# COPY go-thaliaarchi-nebula+build/ thaliaarchi-nebula/
42+
COPY go-zorchenhimer+build/ zorchenhimer/
43+
SAVE ARTIFACT /corpus /corpus
44+
45+
docker:
46+
FROM alpine
47+
WORKDIR /corpus/go
48+
COPY +build/ /
49+
SAVE IMAGE wspace-corpus/go
50+
51+
docker-all:
52+
BUILD +docker
53+
BUILD go-135yshr-wspacego+docker
54+
BUILD go-kinu+docker
55+
BUILD go-makiuchid-whitenote+docker
56+
# BUILD go-petercxy-gogmh+docker
57+
BUILD go-pocke-gows+docker
58+
BUILD go-qeedquan+docker
59+
BUILD go-samuelpratt+docker
60+
BUILD go-simomu+docker
61+
BUILD go-technohippy+docker
62+
BUILD go-tempxla-go-wspace+docker
63+
# BUILD go-thaliaarchi-nebula+docker
64+
BUILD go-zorchenhimer+docker

go/kinu/Earthfile

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ build:
77
RUN go mod init github.com/kinu/whitespace && \
88
CGO_ENABLED=0 go build
99
SAVE ARTIFACT whitespace /bin/
10+
SAVE ARTIFACT data /programs
1011

1112
docker:
1213
FROM scratch

go/makiuchid-whitenote/Earthfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build:
77
WORKDIR /whitenote/wspace/cmd/wspace
88
RUN go test && \
99
CGO_ENABLED=0 go build
10-
SAVE ARTIFACT wspace/cmd/wspace/wspace /bin/
10+
SAVE ARTIFACT wspace /bin/
1111

1212
docker:
1313
FROM scratch

go/qeedquan/Earthfile

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ build:
77
RUN go mod init github.com/wspace/qeedquan-go && \
88
CGO_ENABLED=0 go build -o whitespace
99
SAVE ARTIFACT whitespace /bin/
10+
SAVE ARTIFACT *.ws /programs/
1011

1112
docker:
1213
FROM scratch

go/samuelpratt/Earthfile

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ build:
66
COPY whitespace-go .
77
RUN CGO_ENABLED=0 go build
88
SAVE ARTIFACT whitespace-go /bin/
9+
SAVE ARTIFACT examples /programs
910

1011
docker:
1112
FROM scratch

go/simomu/Earthfile

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ build:
77
RUN go test ./... && \
88
CGO_ENABLED=0 go build -o releases/ws cmd/ws.go
99
SAVE ARTIFACT releases/ws /bin/
10+
SAVE ARTIFACT samples /programs
1011

1112
docker:
1213
FROM scratch

go/technohippy/Earthfile

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ build:
66
COPY go-whitespace .
77
RUN CGO_ENABLED=0 go build -o go-whitespace ./src
88
SAVE ARTIFACT go-whitespace /bin/
9+
SAVE ARTIFACT samples /programs
910

1011
docker:
1112
FROM scratch

go/tempxla-go-wspace/Earthfile

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ build:
99
# Tests fail
1010
# RUN go test ./...
1111
SAVE ARTIFACT bin/go-wspace /bin/
12+
SAVE ARTIFACT examples /programs
1213

1314
docker:
1415
FROM scratch

go/thaliaarchi-nebula/Earthfile

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ build:
1010
go test ./... && \
1111
go build
1212
SAVE ARTIFACT nebula /bin/
13+
SAVE ARTIFACT programs /programs
1314

1415
docker:
1516
FROM scratch

haskell/Earthfile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
VERSION 0.8
2+
3+
IMPORT ./edwinb-wspace-0.3 AS haskell-edwinb-wspace-0.3
4+
5+
build:
6+
FROM scratch
7+
# BUILD haskell-edwinb-wspace-0.3+build
8+
WORKDIR /corpus/haskell
9+
# COPY haskell-edwinb-wspace-0.3+build/ edwinb-wspace-0.3/
10+
SAVE ARTIFACT /corpus /corpus
11+
12+
docker:
13+
FROM alpine
14+
WORKDIR /corpus/haskell
15+
COPY +build/ /
16+
SAVE IMAGE wspace-corpus/haskell
17+
18+
docker-all:
19+
BUILD +docker
20+
BUILD haskell-edwinb-wspace-0.3+docker

haskell/edwinb-wspace-0.3/Earthfile

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
VERSION 0.8
22

33
docker:
4-
FROM i386/ubuntu
5-
ADD https://web.archive.org/web/20150717214201id_/http://compsoc.dur.ac.uk:80/whitespace/downloads/wspace .
6-
ADD https://web.archive.org/web/20160512184850id_/http://compsoc.dur.ac.uk/whitespace/downloads/wspace-0.3.tgz .
7-
RUN chmod +x wspace
8-
RUN tar xf wspace-0.3.tgz
4+
FROM --platform linux/amd64 i386/ubuntu
5+
RUN apt-get update && \
6+
DEBIAN_FRONTEND=noninteractive apt-get install -y curl && \
7+
rm -rf /var/lib/apt/lists/*
8+
RUN curl -sSfO https://web.archive.org/web/20150717214201id_/http://compsoc.dur.ac.uk:80/whitespace/downloads/wspace && \
9+
curl -sSfO https://web.archive.org/web/20160512184850id_/http://compsoc.dur.ac.uk/whitespace/downloads/wspace-0.3.tgz && \
10+
chmod +x wspace && \
11+
tar xf wspace-0.3.tgz
912
WORKDIR /WSpace/examples
1013
ENTRYPOINT ["/wspace"]
1114
SAVE IMAGE wspace-corpus/haskell/edwinb-wspace-0.3

0 commit comments

Comments
 (0)