Skip to content

Commit

Permalink
gha: export opam confirm level to unsafe in the preamble
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbou committed Jul 27, 2021
1 parent 859453c commit 60d3a55
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/scripts/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ unset-dev-version () {
touch src/client/no-git-version
}

export OPAMYES=1
export OCAMLRUNPARAM=b

( # Run subshell in bootstrap root env to build
Expand Down
8 changes: 5 additions & 3 deletions .github/scripts/preamble.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ OPAMBSROOT=`eval echo $OPAMBSROOT`

OPAMBSSWITCH=opam-build

export OPAMCONFIRMLEVEL=unsafe-yes

case $GITHUB_EVENT_NAME in
pull_request)
BRANCH=$GITHUB_HEAD_REF
Expand All @@ -38,21 +40,21 @@ init-bootstrap () {
set -e
export OPAMROOT=$OPAMBSROOT
# The system compiler will be picked up
opam init --yes --no-setup git+https://github.com/ocaml/opam-repository#$OPAM_REPO_SHA
opam init --no-setup git+https://github.com/ocaml/opam-repository#$OPAM_REPO_SHA
eval $(opam env)
# opam update
CURRENT_SWITCH=$(opam var switch)
if [[ $CURRENT_SWITCH != "default" ]] ; then
opam switch default
eval $(opam env)
opam switch remove $CURRENT_SWITCH --yes
opam switch remove $CURRENT_SWITCH
fi

opam switch create $OPAMBSSWITCH ocaml-system
eval $(opam env)
# extlib is installed, since UChar.cmi causes problems with the search
# order. See also the removal of uChar and uTF8 in src_ext/jbuild-extlib-src
opam install . --deps-only --yes
opam install . --deps-only

rm -f "$OPAMBSROOT"/log/*
fi
Expand Down
1 change: 0 additions & 1 deletion .github/scripts/solvers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

. .github/scripts/preamble.sh

export OPAMCONFIRMLEVEL=unsafe-yes
export OCAMLRUNPARAM=b

# All environment variable are overwritten in job description
Expand Down

0 comments on commit 60d3a55

Please sign in to comment.