Commit 2f28694b authored by Ralf Jung's avatar Ralf Jung

update to new CI machine

parent 0a1c826e
image: ralfjung/opam-ci:latest
variables:
CPU_CORES: "9"
iris_atomic-coq8.5.3:
tags:
- coq
- fp-timing
script:
# prepare
- . build/opam-ci.sh 'coq 8.5.3' 'coq-mathcomp-ssreflect 1.6.1'
- . build/opam-ci.sh coq 8.5.3 coq-mathcomp-ssreflect 1.6.1
# build
- 'time make -j8'
- 'time make -j$CPU_CORES'
cache:
key: "coq8.5.3"
paths:
- opamroot/
only:
- master
- ci
- /^ci/
iris_atomic-coq8.6:
tags:
- coq
- fp-timing
script:
# prepare
- . build/opam-ci.sh 'coq 8.6' 'coq-mathcomp-ssreflect 1.6.1'
- . build/opam-ci.sh coq 8.6 coq-mathcomp-ssreflect 1.6.1
# build
- 'time make -j8'
- 'time make -j$CPU_CORES'
cache:
key: "coq8.6"
paths:
- opamroot/
only:
- master
- ci
- timing
- /^ci/
......@@ -3,14 +3,6 @@ ifeq ($(Y), 1)
YFLAG=-y
endif
# Determine Coq version
COQ_VERSION=$(shell coqc --version | egrep -o 'version 8.[0-9]' | egrep -o '8.[0-9]')
COQ_MAKEFILE_FLAGS ?=
ifeq ($(COQ_VERSION), 8.6)
COQ_MAKEFILE_FLAGS += -arg -w -arg -notation-overridden,-redundant-canonical-projection,-several-object-files
endif
# Forward most targets to Coq makefile (with some trick to make this phony)
%: Makefile.coq phony
+@make -f Makefile.coq $@
......@@ -25,16 +17,16 @@ clean: Makefile.coq
# Create Coq Makefile. POSIX awk can't do in-place editing, but coq_makefile wants the real filename, so we do some file gymnastics.
Makefile.coq: _CoqProject Makefile awk.Makefile
coq_makefile $(COQ_MAKEFILE_FLAGS) -f _CoqProject -o Makefile.coq
coq_makefile -f _CoqProject -o Makefile.coq
mv Makefile.coq Makefile.coq.tmp && awk -f awk.Makefile Makefile.coq.tmp > Makefile.coq && rm Makefile.coq.tmp
# Install build-dependencies
build-dep:
build/opam-pins.sh < opam.pins
opam upgrade $(YFLAG) # it is not nice that we upgrade *all* packages here, but I found no nice way to upgrade only those that we pinned
opam pin add coq-iris-atomic "$$(pwd)#HEAD" -k git -n -y
opam install coq-iris-atomic --deps-only $(YFLAG)
opam pin remove coq-iris-atomic
opam pin add opam-builddep-temp "$$(pwd)#HEAD" -k git -n -y
opam install opam-builddep-temp --deps-only $(YFLAG)
opam pin remove opam-builddep-temp
# Some files that do *not* need to be forwarded to Makefile.coq
Makefile: ;
......
-Q theories iris_atomic
-arg -w -arg -notation-overridden,-redundant-canonical-projection,-several-object-files
theories/atomic.v
theories/sync.v
theories/atomic_incr.v
......
......@@ -4,24 +4,34 @@ set -e
# Prepare OPAM configuration
export OPAMROOT="$(pwd)/opamroot"
export OPAMJOBS=16
export OPAMJOBS="$((2*$CPU_CORES))"
export OPAM_EDITOR="$(which false)"
# Make sure we got a good OPAM
test -d "$OPAMROOT" || (mkdir "$OPAMROOT" && opam init --no-setup -y)
eval `opam conf env`
if test $(find "$OPAMROOT/repo/package-index" -mtime +0); then
# last update was more than a day ago
opam update
else
echo "[opam-ci] Not updating opam."
fi
test -d "$OPAMROOT/repo/coq-extra-dev" || opam repo add coq-extra-dev https://coq.inria.fr/opam/extra-dev -p 5
test -d "$OPAMROOT/repo/coq-core-dev" || opam repo add coq-core-dev https://coq.inria.fr/opam/core-dev -p 5
test -d "$OPAMROOT/repo/coq-released" || opam repo add coq-released https://coq.inria.fr/opam/released -p 10
opam update
opam install ocamlfind -y # Remove this once the Coq crew fixed their package...
# Install fixed versions of some dependencies
echo
for PIN in "${@}"
do
echo "Applying pin: $PIN"
opam pin add $PIN -k version -y
while (( "$#" )); do # while there are arguments left
PACKAGE="$1" ; shift
VERSION="$1" ; shift
# Check if the pin is already set
if opam pin list | fgrep "$PACKAGE.$VERSION " > /dev/null; then
echo "[opam-ci] $PACKAGE already pinned to $VERSION"
else
echo "[opam-ci] Pinning $PACKAGE to $VERSION"
opam pin add "$PACKAGE" "$VERSION" -k version -y
fi
done
# Install build-dependencies
......
......@@ -4,14 +4,23 @@ set -e
## Usage:
## ./opam-pins.sh < opam.pins
if ! which curl >/dev/null; then
echo "opam-pins needs curl. Please install curl and try again."
exit 1
fi
# Process stdin
while read PACKAGE URL HASH; do
if echo "$URL" | egrep '^https://gitlab\.mpi-sws\.org' > /dev/null; then
echo "[opam-pins] Recursing into $URL"
# an MPI URL -- try doing recursive pin processing
curl -f "$URL/raw/$HASH" 2> /dev/null | "$0"
curl -f "$URL/raw/$HASH/opam.pins" 2>/dev/null | "$0"
fi
if opam pin list | fgrep "$PACKAGE.dev.$HASH " > /dev/null; then
echo "[opam-pins] $PACKAGE already at commit $HASH"
else
echo "[opam-pins] Applying pin: $PACKAGE -> $URL#$HASH"
opam pin add "$PACKAGE.dev.$HASH" "$URL#$HASH" -k git -y -n
echo
fi
echo "[opam-pins] Applying pin: $PACKAGE -> $URL#$HASH"
opam pin add "$PACKAGE.dev.$HASH" "$URL#$HASH" -k git -y -n
echo
done
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