Commit bebb9505 authored by Raphaël Rieu-Helft's avatar Raphaël Rieu-Helft

Switch CI to opam 2 (fix #217).

parent 110cc5aa
......@@ -39,9 +39,9 @@ build-4.06.1:
COMPILER: 4.06.1
<<: *build_definition
build-4.07.0:
build-4.07.1:
variables:
COMPILER: 4.07.0
COMPILER: 4.07.1
<<: *build_definition
.bench_template1: &bench_definition_always
......@@ -83,15 +83,15 @@ bench-4.06.1:
COMPILER: 4.06.1
<<: *bench_definition
bench-4.07.0:
bench-4.07.1:
variables:
COMPILER: 4.07.0
COMPILER: 4.07.1
<<: *bench_definition_always
full-4.07.0:
full-4.07.1:
stage: test
variables:
COMPILER: 4.07.0
COMPILER: 4.07.1
DEBIAN_PACKAGES: hevea rubber texlive-latex-extra lmodern texlive-fonts-recommended
OPAM_PACKAGES: coq-flocq.2.6.1 js_of_ocaml-ppx alt-ergo.2.0.0
script:
......
ARG debian_version=stable
FROM ocaml/ocaml:debian-$debian_version
FROM debian:$debian_version
USER root
# install dependencies
RUN apt-get update -yq && apt-get upgrade -yq --with-new-pkgs --auto-remove
RUN apt-get update -yq && apt-get upgrade -yq --with-new-pkgs --auto-remove && apt-get install -yq --no-install-recommends wget libgmp-dev gtk+-2.0 libgtksourceview2.0-dev gnome-themes-standard libcanberra-gtk-module opam xvfb unzip build-essential autoconf automake
RUN apt-get update -yq && apt-get upgrade -yq --with-new-pkgs --auto-remove && apt-get install -yq --no-install-recommends wget libgmp-dev gtk+-2.0 libgtksourceview2.0-dev gnome-themes-standard libcanberra-gtk-module xvfb unzip build-essential autoconf automake ocaml-nox ca-certificates git xauth
ARG debian_packages
RUN apt-get update -yq && apt-get upgrade -yq --with-new-pkgs --auto-remove && apt-get install -yq --no-install-recommends $debian_packages
RUN apt-get clean
RUN wget https://github.com/ocaml/opam/releases/download/2.0.0/opam-2.0.0-x86_64-linux -O /usr/bin/opam && chmod 755 /usr/bin/opam
# install provers
## CVC4 1.5
RUN wget --quiet http://cvc4.cs.stanford.edu/downloads/builds/x86_64-linux-opt/cvc4-1.5-x86_64-linux-opt
......@@ -23,17 +27,18 @@ RUN unzip z3-4.6.0-x64-debian-8.10.zip
RUN cp z3-4.6.0-x64-debian-8.10/bin/z3 /usr/local/bin/z3-4.6.0
# create user
RUN sudo adduser --disabled-password --gecos '' why3
RUN adduser --disabled-password --gecos '' why3
USER why3
ENV HOME /home/why3
WORKDIR /home/why3
ARG compiler=system
RUN opam init -a -y -j1 --compiler=$compiler
RUN opam repository add coq-released https://coq.inria.fr/opam/released
RUN opam install -y depext
ARG compiler=ocaml-system
RUN opam init -a -y -j1 --compiler=$compiler --disable-sandboxing
RUN opam repository add coq-released https://coq.inria.fr/opam/released --all-switches
ARG opam_packages
RUN opam install -y depext
RUN opam depext --dry-run menhir conf-gtksourceview lablgtk ocamlgraph zarith camlzip alt-ergo
RUN opam install -y menhir conf-gtksourceview lablgtk ocamlgraph zarith camlzip alt-ergo
......
......@@ -10,6 +10,12 @@ if test -z "$COMPILER"; then
COMPILER="system"
fi
if test "$COMPILER" = "system"; then
OCAML="ocaml-system"
else
OCAML="ocaml-base-compiler.$COMPILER"
fi
autoconf && (automake --add-missing 2> /dev/null || true)
IMAGE=bench-image-$COMPILER-$DEBIAN_VERSION
......@@ -21,7 +27,7 @@ if test -n "$OPAM_PACKAGES"; then
IMAGE=$IMAGE--$(echo $OPAM_PACKAGES | sed -e 's/ /--/g')
fi
docker build -t $IMAGE --force-rm -f misc/Dockerfile.init --build-arg debian_version="$DEBIAN_VERSION" --build-arg compiler=$COMPILER --build-arg debian_packages="$DEBIAN_PACKAGES" --build-arg opam_packages="$OPAM_PACKAGES" .
docker build -t $IMAGE --force-rm -f misc/Dockerfile.init --build-arg debian_version="$DEBIAN_VERSION" --build-arg compiler=$OCAML --build-arg debian_packages="$DEBIAN_PACKAGES" --build-arg opam_packages="$OPAM_PACKAGES" .
CID=$(docker create --rm -i -w /home/why3/why3 $IMAGE /bin/sh)
docker start $CID
docker cp . $CID:/home/why3/why3
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment