aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile.make
diff options
context:
space:
mode:
authorCyril Cohen2019-01-15 10:43:00 +0100
committerGitHub2019-01-15 10:43:00 +0100
commitb0ef24be9fe47abbcc2c82e668091d4b32283c8b (patch)
tree525e969fd2a51d3f5c387a8447a18bfd8f838407 /Dockerfile.make
parent528d71783b0e34181d720a6456ea0a87a01abe25 (diff)
parent11c1489d8906ef62485b9b9d145f44acc4b9471a (diff)
Merge pull request #266 from erikmd/setup-gitlab-ci
Setup Docker-based configuration for GitLab CI
Diffstat (limited to 'Dockerfile.make')
-rw-r--r--Dockerfile.make29
1 files changed, 29 insertions, 0 deletions
diff --git a/Dockerfile.make b/Dockerfile.make
new file mode 100644
index 0000000..4a3787d
--- /dev/null
+++ b/Dockerfile.make
@@ -0,0 +1,29 @@
+ARG coq_image="coqorg/coq:dev"
+FROM ${coq_image}
+
+WORKDIR /home/coq/mathcomp
+
+COPY . .
+
+ARG compiler="base"
+# other possible value: "edge"
+
+RUN ["/bin/bash", "--login", "-c", "set -x \
+ && declare -A switch_table \
+ && switch_table=( [\"base\"]=\"${COMPILER}\" [\"edge\"]=\"${COMPILER_EDGE}\" ) \
+ && opam_switch=\"${switch_table[${compiler}]}\" \
+ && [ -n \"opam_switch\" ] \
+ && opam switch set ${opam_switch} \
+ && eval $(opam env) \
+ && unset \"switch_table[${compiler}]\" \
+ && for sw in \"${switch_table[@]}\"; do [ -n \"$sw\" ] && opam switch remove -y \"${sw}\"; done \
+ && opam repository add --all-switches --set-default coq-extra-dev https://coq.inria.fr/opam/extra-dev \
+ && opam repository add --all-switches --set-default coq-core-dev https://coq.inria.fr/opam/core-dev \
+ && opam update -y \
+ && opam config list && opam repo list && opam list && coqc --version \
+ && opam clean -a -c -s --logs \
+ && sudo chown -R coq:coq /home/coq/mathcomp \
+ && cd mathcomp \
+ && make Makefile.coq \
+ && make -f Makefile.coq -j ${NJOBS} all \
+ && make -f Makefile.coq install"]