[travis] do not rebuild OCaml

Summary:
Let's try this one more time.

- change build-infer.sh so that it also tries to init opam even if a switch is
  specified. This shouldn't matter according to my testing and that means that
  it's easier to have `./build-infer.sh --opam-switch 4.04.0` work out of the box
  without needing to initialise the `4.04.0` opam switch ourselves beforehand.
- use that in .travis.yml

Reviewed By: jeremydubreil

Differential Revision: D5301320

fbshipit-source-id: 12f91ae
master
Jules Villard 8 years ago committed by Facebook Github Bot
parent 806585db26
commit 11ae193356

@ -11,7 +11,7 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install opam; fi
install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then travis_wait 60 ./build-infer.sh --yes java; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then travis_wait 60 ./build-infer.sh --yes java --opam-switch 4.04.0 --only-setup-opam; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then eval `opam config env`; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then opam pin add -y --no-action -k git infer .; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then opam install -y infer; fi

@ -168,12 +168,7 @@ install_opam_deps() {
echo "initializing opam... " >&2
check_installed opam
if [ "$INFER_OPAM_SWITCH" = "$INFER_OPAM_SWITCH_DEFAULT" ]; then
# set up the custom infer switch
setup_opam
else
opam switch set -j $NCPU $INFER_OPAM_SWITCH
fi
setup_opam
eval $(SHELL=bash opam config env --switch=$INFER_OPAM_SWITCH)
echo >&2
echo "installing infer dependencies; this can take up to 30 minutes... " >&2

Loading…
Cancel
Save