Skip to content

Commit

Permalink
Use a fixed opam-repository commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dra27 committed Jul 13, 2020
1 parent 48f6dc6 commit ac3474d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .travis-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ set -x
init-bootstrap () {
export OPAMROOT=$OPAMBSROOT
# The system compiler will be picked up
opam init --yes --no-setup
opam init --yes --no-setup git+https://github.com/ocaml/opam-repository#$OPAM_REPO_SHA
eval $(opam env)
opam update
CURRENT_SWITCH=$(opam config var switch)
Expand Down Expand Up @@ -352,7 +352,7 @@ if [ "$TRAVIS_BUILD_STAGE_NAME" = "Upgrade" ]; then
export OPAMROOT=/tmp/opamroot
rm -rf $OPAMROOT
if [[ ! -d $CACHE/root ]]; then
$CACHE/bin/opam init
$CACHE/bin/opam init git+https://github.com/ocaml/opam-repository#$OPAM_REPO_SHA
cp -r /tmp/opamroot/ $CACHE/root
else
cp -r $CACHE/root /tmp/opamroot
Expand Down Expand Up @@ -383,7 +383,7 @@ fi
# The SHA is fixed so that upstream changes shouldn't affect CI. The SHA needs
# to be moved forwards when a new version of OCaml is added to ensure that the
# ocaml-system package is available at the correct version.
opam init --bare default git+https://github.com/ocaml/opam-repository#8c45759d4
opam init --bare default git+https://github.com/ocaml/opam-repository#$OPAM_REPO_SHA
opam switch create default ocaml-system
eval $(opam env)
opam install lwt
Expand Down
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ cache:
script:
- bash -exu .travis-ci.sh build

matrix:
env:
global:
# This should be identical to the value in appveyor.yml
- OPAM_REPO_SHA=8c45759d4

jobs:
include:
- os: linux
env: OCAML_VERSION=4.02.3
Expand Down
2 changes: 2 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ environment:
CYG_CACHE: C:/cygwin/var/cache/setup
CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
DEP_MODE: lib-ext
# This should be identical to the value in .travis.yml
OPAM_REPO_SHA: 8c45759d4
matrix:
- CYG_ROOT: cygwin
CYG_ARCH: x86
Expand Down
2 changes: 1 addition & 1 deletion appveyor_test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

opam init -y -a --compiler=ocaml.4.09.1
opam init -y -a --compiler=ocaml.4.09.1 git+https://github.com/ocaml/opam-repository#$OPAM_REPO_SHA
eval $(opam config env)
opam install -y -v ocamlfind

0 comments on commit ac3474d

Please sign in to comment.