Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ci
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Iris
ci
Commits
ad547a4c
Commit
ad547a4c
authored
6 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
test the opam 2 waters
parent
7788488e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
prepare-opam.sh
+12
-6
12 additions, 6 deletions
prepare-opam.sh
with
12 additions
and
6 deletions
prepare-opam.sh
+
12
−
6
View file @
ad547a4c
...
...
@@ -5,13 +5,19 @@ export OPAMROOT="$(pwd)/opamroot"
export
OPAMJOBS
=
"
$((
2
*
$CPU_CORES
))
"
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.
if
test
-d
"
$OPAMROOT
"
;
then
echo_color
"
$BOLDGREEN
"
"[prepare-opam] Re-using cached opam root"
else
echo_color
"
$BOLDYELLOW
"
"[prepare-opam] Creating new opam root"
mkdir
"
$OPAMROOT
"
opam init
--no-setup
-y
opam init
--no-setup
--disable-sandboxing
-y
FRESH_OPAM
=
yes
fi
eval
`
opam conf
env
`
...
...
@@ -28,15 +34,15 @@ fi
# Make sure we got the right set of repositories registered
if
echo
"
$@
"
| egrep
"(dev|beta)"
>
/dev/null
;
then
# 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-core-dev"
||
opam repo add coq-core-dev https://coq.inria.fr/opam/core-dev
-
p
5
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
-
-rank
5
else
# 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-core-dev"
&&
opam repo remove coq-core-dev
fi
test
-d
"
$OPAMROOT
/repo/coq-released"
||
opam repo add coq-released https://coq.inria.fr/opam/released
-
p
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/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
-
-rank
20
echo
# We really want to run all of the following in one opam transaction, but due to opam limitations,
...
...
@@ -64,7 +70,7 @@ echo
if
[[
-z
"
$FRESH_OPAM
"
]]
;
then
# skip if this is a fresh opam root
# Upgrade cached things
echo_color
"
$BOLDGREEN
"
"[prepare-opam] Upgrading packages"
opam upgrade
-y
--fixup
&&
opam upgrade
-y
opam upgrade
-y
echo
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment