Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Iris
ci
Commits
245a9c7b
Commit
245a9c7b
authored
Sep 18, 2018
by
Ralf Jung
Browse files
test the opam 2 waters
parent
7788488e
Changes
1
Hide whitespace changes
Inline
Side-by-side
prepare-opam.sh
View file @
245a9c7b
...
@@ -5,13 +5,19 @@ export OPAMROOT="$(pwd)/opamroot"
...
@@ -5,13 +5,19 @@ export OPAMROOT="$(pwd)/opamroot"
export
OPAMJOBS
=
"
$((
2
*
$CPU_CORES
))
"
export
OPAMJOBS
=
"
$((
2
*
$CPU_CORES
))
"
export
OPAM_EDITOR
=
"
$(
which
false
)
"
export
OPAM_EDITOR
=
"
$(
which
false
)
"
# Delete OPAM 1.2 root, if that's what we got
if
fgrep
'opam-version: "1.2"'
"
$OPAMROOT
/config"
>
/dev/null
;
then
echo_color
"
$BOLDYELLOW
"
"[prepare-opam] Deleting opam 1.2 root"
rm
-rf
"
$OPAMROOT
"
fi
# Make sure we got a good OPAM.
# Make sure we got a good OPAM.
if
test
-d
"
$OPAMROOT
"
;
then
if
test
-d
"
$OPAMROOT
"
;
then
echo_color
"
$BOLDGREEN
"
"[prepare-opam] Re-using cached opam root"
echo_color
"
$BOLDGREEN
"
"[prepare-opam] Re-using cached opam root"
else
else
echo_color
"
$BOLDYELLOW
"
"[prepare-opam] Creating new opam root"
echo_color
"
$BOLDYELLOW
"
"[prepare-opam] Creating new opam root"
mkdir
"
$OPAMROOT
"
mkdir
"
$OPAMROOT
"
opam init
--no-setup
-y
opam init
--no-setup
--disable-sandboxing
-y
FRESH_OPAM
=
yes
FRESH_OPAM
=
yes
fi
fi
eval
`
opam conf
env
`
eval
`
opam conf
env
`
...
@@ -28,15 +34,15 @@ fi
...
@@ -28,15 +34,15 @@ fi
# Make sure we got the right set of repositories registered
# Make sure we got the right set of repositories registered
if
echo
"
$@
"
| egrep
"(dev|beta)"
>
/dev/null
;
then
if
echo
"
$@
"
| egrep
"(dev|beta)"
>
/dev/null
;
then
# We are compiling against a dev version of something. Get ourselves the dev repositories.
# We are compiling against a dev version of something. Get ourselves the dev repositories.
test
-d
"
$OPAMROOT
/repo/coq-extra-dev"
||
opam repo add coq-extra-dev https://coq.inria.fr/opam/extra-dev
-
p
0
test
-d
"
$OPAMROOT
/repo/coq-extra-dev"
||
opam repo add coq-extra-dev https://coq.inria.fr/opam/extra-dev
-
-rank
0
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
-
-rank
5
else
else
# No dev version, make sure we do not have the dev repositories.
# No dev version, make sure we do not have the dev repositories.
test
-d
"
$OPAMROOT
/repo/coq-extra-dev"
&&
opam repo remove coq-extra-dev
test
-d
"
$OPAMROOT
/repo/coq-extra-dev"
&&
opam repo remove coq-extra-dev
test
-d
"
$OPAMROOT
/repo/coq-core-dev"
&&
opam repo remove coq-core-dev
test
-d
"
$OPAMROOT
/repo/coq-core-dev"
&&
opam repo remove coq-core-dev
fi
fi
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
-
-rank
10
test
-d
"
$OPAMROOT
/repo/iris-dev"
||
opam repo add iris-dev https://gitlab.mpi-sws.org/FP/opam-dev.git
-
p
20
test
-d
"
$OPAMROOT
/repo/iris-dev"
||
opam repo add iris-dev https://gitlab.mpi-sws.org/FP/opam-dev.git
-
-rank
20
echo
echo
# We really want to run all of the following in one opam transaction, but due to opam limitations,
# We really want to run all of the following in one opam transaction, but due to opam limitations,
...
@@ -64,7 +70,7 @@ echo
...
@@ -64,7 +70,7 @@ echo
if
[[
-z
"
$FRESH_OPAM
"
]]
;
then
# skip if this is a fresh opam root
if
[[
-z
"
$FRESH_OPAM
"
]]
;
then
# skip if this is a fresh opam root
# Upgrade cached things
# Upgrade cached things
echo_color
"
$BOLDGREEN
"
"[prepare-opam] Upgrading packages"
echo_color
"
$BOLDGREEN
"
"[prepare-opam] Upgrading packages"
opam upgrade
-y
--fixup
&&
opam upgrade
-y
opam upgrade
-y
echo
echo
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment