Summary: With this change Travis will build infer on Linux + OSX using the opam file, in Java mode only to save us from having to compile clang. This doesn't try to run the tests yet because 1) building infer takes almost all the alloted time so OSX times out if we ask it to do more; 2) there's some error in Travis when the tests are run so more work is needed. I had to change the opam file a bit to reflect some dependency constraints since the opam build ignores the opam.locked file (which is good because it will allow us to detect when such incompatibilities arise). Reviewed By: katiejots Differential Revision: D13971408 fbshipit-source-id: d51caa66fmaster
parent
c5890238f0
commit
6af46027bf
@ -1,19 +1,9 @@
|
||||
sudo: required
|
||||
language: c
|
||||
sudo: required
|
||||
install: wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-opam.sh
|
||||
script: bash -ex .travis-opam.sh
|
||||
env:
|
||||
- OCAML_VERSION=4.07 TESTS=false
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
services: docker
|
||||
before_install:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y aspcud; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew unlink python; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install opam; fi
|
||||
install:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then opam init --reinit --no-setup --disable-sandboxing; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then travis_wait 60 opam install --yes .; fi
|
||||
script:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./.travis/local_install_tests.sh; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./.travis/docker_tests.sh; fi
|
||||
- git diff --exit-code
|
||||
- linux
|
||||
- osx
|
||||
|
@ -1,29 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2016-present, Facebook, Inc.
|
||||
#
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
set -x
|
||||
|
||||
# assumes we are in .travis/
|
||||
cd "${SCRIPT_DIR}/../docker"
|
||||
|
||||
docker build -t infer .
|
||||
|
||||
echo 'Running `infer -- javac /infer/examples/Hello.java`'
|
||||
docker run -t infer \
|
||||
/bin/bash -c \
|
||||
'infer -- javac /infer/examples/Hello.java | grep -q "NULL_DEREFERENCE: *1"'
|
||||
echo
|
||||
|
||||
echo 'Running `infer -- clang -c /infer/examples/hello.c`'
|
||||
docker run -t infer \
|
||||
/bin/bash -c \
|
||||
'infer -- clang -c /infer/examples/hello.c | grep -q "NULL_DEREFERENCE: *1"'
|
||||
echo
|
@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2016-present, Facebook, Inc.
|
||||
#
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
# go to the root of the repo -- assumes we are in .travis/
|
||||
cd "${SCRIPT_DIR}/.."
|
||||
|
||||
echo 'Running `infer -- javac examples/Hello.java`'
|
||||
infer -- javac examples/Hello.java | grep -q 'NULL_DEREFERENCE: *1'
|
||||
echo
|
Loading…
Reference in new issue