Commit b5fa9b29 authored by Ralf Jung's avatar Ralf Jung

avoid re-downloading already properly pinned packages

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