| 1 |
# Update CACHEKEY in the .gitlab-ci.yml when modifying this file. |
| 2 |
|
| 3 |
FROM ubuntu:24.04 |
| 4 |
LABEL maintainer="[email protected]" |
| 5 |
|
| 6 |
ENV DEBIAN_FRONTEND="noninteractive" |
| 7 |
|
| 8 |
# We need libgmp-dev:i386 for zarith; maybe we could also install GTK |
| 9 |
RUN dpkg --add-architecture i386 |
| 10 |
|
| 11 |
RUN apt-get update -qq && apt-get install --no-install-recommends -y -qq \ |
| 12 |
# Dependencies of the image, the test-suite and external projects |
| 13 |
m4 automake autoconf time wget rsync git gcc-multilib build-essential unzip jq \ |
| 14 |
# Dependencies of ZArith |
| 15 |
perl libgmp-dev libgmp-dev:i386 \ |
| 16 |
# Dependencies of devtools |
| 17 |
zlib1g-dev \ |
| 18 |
# Dependencies of lablgtk (for CoqIDE) |
| 19 |
libgtksourceview-3.0-dev adwaita-icon-theme-full \ |
| 20 |
# Dependencies of stdlib and sphinx doc |
| 21 |
texlive-latex-extra texlive-fonts-recommended texlive-xetex latexmk \ |
| 22 |
python3-pip python3-setuptools python3-pexpect python3-bs4 fonts-freefont-otf \ |
| 23 |
# pipeline-stats |
| 24 |
python3-gitlab python3-tabulate \ |
| 25 |
# Dependency of stdlib-doc |
| 26 |
graphviz \ |
| 27 |
# Dependencies of source-doc and coq-makefile |
| 28 |
texlive-latex-extra texlive-science tipa \ |
| 29 |
# Dependencies of HB (test suite) |
| 30 |
wdiff \ |
| 31 |
# Required to get the wget step to succeed |
| 32 |
ca-certificates \ |
| 33 |
# Required for fiat-crypto and Coqtail |
| 34 |
python-is-python3 \ |
| 35 |
&& rm -rf /var/lib/apt/lists /usr/share/doc |
| 36 |
|
| 37 |
# More dependencies of the sphinx doc |
| 38 |
RUN pip3 install --break-system-packages docutils==0.21.2 sphinx==8.2.3 sphinx_rtd_theme==3.0.2 \ |
| 39 |
antlr4-python3-runtime==4.7.1 sphinxcontrib-bibtex==2.6.3 \ |
| 40 |
&& rm -rf ~/.cache/pip |
| 41 |
|
| 42 |
# We need to install OPAM 2.0 manually for now. |
| 43 |
RUN wget https://github.com/ocaml/opam/releases/download/2.1.5/opam-2.1.5-x86_64-linux -O /usr/bin/opam && chmod 755 /usr/bin/opam |
| 44 |
|
| 45 |
# Basic OPAM setup |
| 46 |
ENV NJOBS="2" \ |
| 47 |
OPAMJOBS="2" \ |
| 48 |
OPAMROOT=/root/.opamcache \ |
| 49 |
OPAMROOTISOK="true" \ |
| 50 |
OPAMYES="true" |
| 51 |
|
| 52 |
RUN mkdir -p ~/.config/dune && printf '(lang dune 2.1)\n(jobs %s)\n' $NJOBS > ~/.config/dune/config |
| 53 |
|
| 54 |
# Edge opam is the set of edge packages required by Coq |
| 55 |
ENV COMPILER="4.14.2" \ |
| 56 |
BASE_OPAM="zarith.1.13 ounit2.2.2.6 camlzip.1.13" \ |
| 57 |
CI_OPAM="ocamlgraph.2.0.0 cppo.1.6.9" \ |
| 58 |
BASE_OPAM_EDGE="dune.3.14.0 dune-build-info.3.14.0 dune-release.2.0.0 ocamlfind.1.9.6 odoc.2.3.1" \ |
| 59 |
CI_OPAM_EDGE="elpi.3.0.1 ppx_import.1.10.0 cmdliner.1.1.1 sexplib.v0.15.1 ppx_sexp_conv.v0.15.1 ppx_hash.v0.15.0 ppx_compare.v0.15.0 ppx_deriving_yojson.3.7.0 yojson.2.1.0 uri.4.2.0 ppx_yojson_conv.v0.15.1 ppx_inline_test.v0.15.1 ppx_assert.v0.15.0 ppx_optcomp.v0.15.0 lsp.1.16.2 sel.0.8.0" \ |
| 60 |
COQIDE_OPAM_EDGE="lablgtk3-sourceview3.3.1.3" |
| 61 |
|
| 62 |
# EDGE+flambda switch, we install CI_OPAM as to be able to use |
| 63 |
# `ci-template-flambda` with everything. |
| 64 |
RUN opam init -a --disable-sandboxing --bare && eval $(opam env) && \ |
| 65 |
opam switch create "${COMPILER}+flambda" \ |
| 66 |
--repositories default,ocaml-beta=git+https://github.com/ocaml/ocaml-beta-repository.git,coq-core-dev=https://coq.inria.fr/opam/core-dev \ |
| 67 |
--packages="ocaml-variants.${COMPILER}+options,ocaml-option-flambda" && eval $(opam env) && \ |
| 68 |
opam repo add archive git+https://github.com/ocaml/opam-repository-archive && \ |
| 69 |
opam update && \ |
| 70 |
opam install $BASE_OPAM $BASE_OPAM_EDGE $COQIDE_OPAM_EDGE $CI_OPAM $CI_OPAM_EDGE && \ |
| 71 |
opam clean -a -c |
| 72 |
|
| 73 |
# set the locale for the benefit of Python |
| 74 |
ENV LANG C.UTF-8 |