Skip to content
Snippets Groups Projects
Commit 5a475f3a authored by Ralf Jung's avatar Ralf Jung
Browse files

opam-ci: avoid re-downloading already properly pinned packages

parent bfe08683
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -3,7 +3,7 @@ image: ralfjung/opam-ci:latest ...@@ -3,7 +3,7 @@ image: ralfjung/opam-ci:latest
lrust-coq8.6: lrust-coq8.6:
script: script:
# prepare # 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 # build
- 'time make -j8 TIMED=y 2>&1 | tee build-log.txt' - 'time make -j8 TIMED=y 2>&1 | tee build-log.txt'
- 'if fgrep Axiom build-log.txt >/dev/null; then exit 1; fi' - 'if fgrep Axiom build-log.txt >/dev/null; then exit 1; fi'
......
...@@ -14,14 +14,19 @@ test -d "$OPAMROOT/repo/coq-extra-dev" || opam repo add coq-extra-dev https://co ...@@ -14,14 +14,19 @@ test -d "$OPAMROOT/repo/coq-extra-dev" || opam repo add coq-extra-dev https://co
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-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 test -d "$OPAMROOT/repo/coq-released" || opam repo add coq-released https://coq.inria.fr/opam/released -p 10
opam update opam update
opam install ocamlfind -y # Remove this once the Coq crew fixed their package...
# Install fixed versions of some dependencies # Install fixed versions of some dependencies
echo echo
for PIN in "${@}" while (( "$#" )); do # while there are arguments left
do PACKAGE="$1" ; shift
echo "Applying pin: $PIN" VERSION="$1" ; shift
opam pin add $PIN -k version -y # 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 done
# Install build-dependencies # Install build-dependencies
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment