Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
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
Simcha van Collem
Iris
Commits
10830bed
Commit
10830bed
authored
7 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
fix opam
parent
1e3772f0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+1
-1
1 addition, 1 deletion
Makefile
build/opam-ci.sh
+23
-17
23 additions, 17 deletions
build/opam-ci.sh
with
24 additions
and
18 deletions
Makefile
+
1
−
1
View file @
10830bed
...
@@ -34,7 +34,7 @@ build-dep: build-dep/opam phony
...
@@ -34,7 +34,7 @@ build-dep: build-dep/opam phony
# Add the pin and
(
re
)
install
build-dep package.
# Add the pin and
(
re
)
install
build-dep package.
@
# Reinstallation is needed in case the pin already exists, but the builddep package changed.
@
# Reinstallation is needed in case the pin already exists, but the builddep package changed.
@
BUILD_DEP_PACKAGE
=
"
$$(
egrep "
^name:
" build-dep/opam | sed 's/^name: *"
\(
.
*
\)
" */
\1
/'
)
"
;
\
@
BUILD_DEP_PACKAGE
=
"
$$(
egrep "
^name:
" build-dep/opam | sed 's/^name: *"
\(
.
*
\)
" */
\1
/'
)
"
;
\
opam pin add
"
$$
BUILD_DEP_PACKAGE"
"
$$(
pwd
)
/build-dep"
-k
path
$(
OPAMFLAGS
)
&&
\
opam pin add
"
$$
BUILD_DEP_PACKAGE"
.dev
"
$$(
pwd
)
/build-dep"
-k
path
$(
OPAMFLAGS
)
&&
\
opam reinstall
"
$$
BUILD_DEP_PACKAGE"
opam reinstall
"
$$
BUILD_DEP_PACKAGE"
# Some files that do *not* need to be forwarded to Makefile.coq
# Some files that do *not* need to be forwarded to Makefile.coq
...
...
This diff is collapsed.
Click to expand it.
build/opam-ci.sh
+
23
−
17
View file @
10830bed
#!/bin/bash
#!/bin/bash
set
-e
set
-e
## This script installs the build dependencies for CI builds.
## This script installs the build dependencies for CI builds.
function
run_and_print
()
{
echo
"
$ $@
"
"
$@
"
}
# Prepare OPAM configuration
# Prepare OPAM configuration
export
OPAMROOT
=
"
$(
pwd
)
/opamroot"
export
OPAMROOT
=
"
$(
pwd
)
/opamroot"
export
OPAMJOBS
=
"
$((
2
*
$CPU_CORES
))
"
export
OPAMJOBS
=
"
$((
2
*
$CPU_CORES
))
"
export
OPAM_EDITOR
=
"
$(
which
false
)
"
export
OPAM_EDITOR
=
"
$(
which
false
)
"
# Make sure we got a good OPAM
# Make sure we got a good OPAM
.
test
-d
"
$OPAMROOT
"
||
(
mkdir
"
$OPAMROOT
"
&&
opam init
--no-setup
-y
)
test
-d
"
$OPAMROOT
"
||
(
mkdir
"
$OPAMROOT
"
&&
run_and_print
opam init
--no-setup
-y
)
eval
`
opam conf
env
`
eval
`
opam conf
env
`
# Delete old pins from opam.pins times.
run_and_print opam pin remove coq-stdpp
-n
run_and_print opam pin remove coq-iris
-n
# Make sure the pin for the builddep package is not stale.
run_and_print make build-dep/opam
# Get us all the latest repositories
if
test
$(
find
"
$OPAMROOT
/repo/package-index"
-mtime
+0
)
;
then
if
test
$(
find
"
$OPAMROOT
/repo/package-index"
-mtime
+0
)
;
then
# last update was more than a day ago
# last update was more than a day ago
opam update
run_and_print
opam update
else
else
# only update iris-dev
# only update iris-dev
test
-d
"
$OPAMROOT
/repo/iris-dev"
&&
opam update iris-dev
if
test
-d
"
$OPAMROOT
/repo/iris-dev"
;
then
run_and_print
opam update iris-dev
;
fi
fi
fi
test
-d
"
$OPAMROOT
/repo/coq-extra-dev"
&&
opam repo remove coq-extra-dev
test
-d
"
$OPAMROOT
/repo/coq-extra-dev"
&&
run_and_print opam repo remove coq-extra-dev
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"
||
run_and_print 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"
||
run_and_print 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/iris-dev"
||
run_and_print opam repo add iris-dev https://gitlab.mpi-sws.org/FP/opam-dev.git
-p
20
echo
# Make sure we have no undesired pins left from opam.pins times
opam pin remove coq-stdpp
-n
opam pin remove coq-iris
-n
# 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,
# that is not currently possible.
# that is not currently possible.
...
@@ -40,16 +48,14 @@ while (( "$#" )); do # while there are arguments left
...
@@ -40,16 +48,14 @@ while (( "$#" )); do # while there are arguments left
echo
"[opam-ci]
$PACKAGE
already pinned to
$VERSION
"
echo
"[opam-ci]
$PACKAGE
already pinned to
$VERSION
"
else
else
echo
"[opam-ci] Pinning
$PACKAGE
to
$VERSION
"
echo
"[opam-ci] Pinning
$PACKAGE
to
$VERSION
"
opam pin add
"
$PACKAGE
"
"
$VERSION
"
-k
version
-y
run_and_print
opam pin add
"
$PACKAGE
"
"
$VERSION
"
-k
version
-y
fi
fi
done
done
# Make sure the pin for the builddep package is not stale.
make build-dep/opam
# Upgrade cached things.
# Upgrade cached things.
echo
echo
"[opam-ci] Upgrading opam"
echo
"[opam-ci] Upgrading opam"
opam upgrade
-y
run_and_print
opam upgrade
-y
# Install build-dependencies.
# Install build-dependencies.
echo
echo
...
...
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