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

avoid re-downloading already properly pinned packages

parent bf761474
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ iris-coq8.6: ...@@ -5,7 +5,7 @@ iris-coq8.6:
- coq - coq
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' - 'time make -j8'
cache: cache:
......
...@@ -17,10 +17,16 @@ opam update ...@@ -17,10 +17,16 @@ opam update
# 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
......
...@@ -11,7 +11,11 @@ while read PACKAGE URL HASH; do ...@@ -11,7 +11,11 @@ while read PACKAGE URL HASH; do
# an MPI URL -- try doing recursive pin processing # an MPI URL -- try doing recursive pin processing
curl -f "$URL/raw/$HASH" 2> /dev/null | "$0" curl -f "$URL/raw/$HASH" 2> /dev/null | "$0"
fi fi
echo "[opam-pins] Applying pin: $PACKAGE -> $URL#$HASH" if opam pin list | fgrep "$PACKAGE.dev.$HASH " > /dev/null; then
opam pin add "$PACKAGE.dev.$HASH" "$URL#$HASH" -k git -y -n 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
fi
echo echo
done done
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