Skip to content

Commit

Permalink
docker: smaller base image for cparser-builder
Browse files Browse the repository at this point in the history
The cparser-builder job is failing on GitHub, because the l4v base image
has become too large to work on GitHub runners. Use the much smaller
sel4 base image instead -- this means we have to manually install the
mlton compiler.

Also fix make invocation for the standalone parser -- this was masked
before by the fact that the l4v image comes with the parser pre-built.

Signed-off-by: Gerwin Klein <[email protected]>
  • Loading branch information
lsf37 committed May 15, 2024
1 parent 683e7f3 commit 35d57c6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions docker/cparser-builder.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,19 @@
ARG WORKSPACE=/workspace
ARG CP_DEST=/c-parser/standalone-parser

FROM trustworthysystems/l4v:latest AS builder
FROM trustworthysystems/sel4:latest AS builder

COPY scripts/checkout-manifest.sh /usr/bin/
RUN chmod a+rx /usr/bin/checkout-manifest.sh

ARG SCRATCH=/scrach
ARG MLTON=mlton-20210117-1.amd64-linux-glibc2.31
WORKDIR ${SCRATCH}
RUN apt update && apt install -y libgmp-dev
RUN wget https://sourceforge.net/projects/mlton/files/mlton/20210117/${MLTON}.tgz
RUN tar xvfz ${MLTON}.tgz
ENV PATH=${SCRATCH}/${MLTON}/bin:$PATH

ARG WORKSPACE
RUN mkdir -p ${WORKSPACE}
WORKDIR ${WORKSPACE}
Expand All @@ -25,7 +33,7 @@ RUN checkout-manifest.sh

ARG CPARSER_DIR=${WORKSPACE}/l4v/tools/c-parser
WORKDIR ${CPARSER_DIR}
RUN make standalone-cparser
RUN make cparser_tools

ARG CP_DEST
RUN mkdir -p ${CP_DEST}
Expand Down

0 comments on commit 35d57c6

Please sign in to comment.