-
Notifications
You must be signed in to change notification settings - Fork 3
/
Earthfile
40 lines (38 loc) · 1.22 KB
/
Earthfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
VERSION 0.8
build:
FROM alpine
RUN apk add --no-cache gcc musl-dev flex
WORKDIR /whitespace
COPY whitespace .
RUN cp wsc.sh wsc && \
\
gcc -O3 -g -static -o blockquote blockquote.c && \
( echo 'char * header =' && \
./blockquote -f ws_engine.h && \
echo ';' ) > ws_engine_txt.h && \
gcc -O3 -g -static -o ws2c ws2c.c && \
\
flex -t wsa.l > wsa.c && \
gcc -O3 -g -static -o wsa wsa.c && \
\
gcc -o gencode-deadfish-in-ws gencode-deadfish-in-ws.c && \
gcc -o gen-99bottles gen-99bottles.c && \
gcc -o gen-prime gen-prime.c && \
gcc -o gen-wsinterws gen-wsinterws.c && \
./gencode-deadfish-in-ws > deadfish.ws && \
./gen-99bottles > 99bottles.ws && \
./gen-prime > prime.ws && \
./gen-wsinterws > wsinterws.ws
SAVE ARTIFACT wsc /bin/
SAVE ARTIFACT ws2c /bin/
SAVE ARTIFACT wsa /bin/
SAVE ARTIFACT tests /programs
SAVE ARTIFACT gen*.c /programs/
SAVE ARTIFACT io.h /programs/
SAVE ARTIFACT memory.h /programs/
SAVE ARTIFACT *.ws /programs/
docker:
FROM scratch
COPY +build/ /
ENTRYPOINT ["/bin/ws2c"]
SAVE IMAGE wspace-corpus/c/rdebath