diff --git a/.travis.yml b/.travis.yml index dfe79a83b..c8fad64b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/build-infer.sh b/build-infer.sh index 987798da9..7b3576ad1 100755 --- a/build-infer.sh +++ b/build-infer.sh @@ -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