forked from BNFC/bnfc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
67 lines (57 loc) · 1.69 KB
/
Dockerfile
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
FROM ubuntu:17.10
RUN apt-get update && \
apt-get -y install --no-install-recommends \
locales=2.26-0ubuntu2 \
haskell-platform=2014.2.0.0.debian4 \
flex=2.6.1-1.3 \
bison=2:3.0.4.dfsg-1build1 \
openjdk-8-jdk=8u151-b12-0ubuntu0.17.10.2 \
jflex=1.6.1-2 \
build-essential=12.4ubuntu1 \
ocaml=4.04.0-2ubuntu4 \
doctest=0.11.3-1 \
python-pygments=2.2.0+dfsg-1 \
python-setuptools=36.2.7-2 \
virtualenv=15.1.0+ds-1 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN locale-gen en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV PATH /root/.cabal/bin:$PATH
RUN cabal update
RUN mkdir -p /bnfc/source && \
mkdir -p /bnfc/testing
# install dependencies
WORKDIR /bnfc/source
COPY source/LICENSE LICENSE
COPY source/Setup.lhs Setup.lhs
COPY source/BNFC.cabal BNFC.cabal
RUN cabal install --only-dependencies --enable-tests
WORKDIR /bnfc/testing
COPY testing/LICENSE LICENSE
COPY testing/Setup.hs Setup.hs
COPY testing/bnfc-system-tests.cabal bnfc-system-tests.cabal
RUN cabal install --only-dependencies \
&& cabal install hlint
# install bnfc
WORKDIR /bnfc/source
COPY source/src src
COPY source/test test
COPY source/runtime runtime
RUN cabal configure --enable-tests && \
cabal build && \
cabal test && \
cabal install
# setup system tests
COPY examples /bnfc/examples
WORKDIR /bnfc/testing
COPY testing/data data
ENV CLASSPATH /bnfc/testing/data/javatools.jar:$CLASSPATH
ENV CLASSPATH /bnfc/testing/data/java-cup-11b-runtime.jar:$CLASSPATH
COPY testing/regression-tests regression-tests
COPY testing/src src
COPY testing/Main.hs Main.hs
# run system tests
CMD cabal configure --enable-tests && \
cabal build && \
cabal run