blob: dee9618c4044af86e179cfba643e5ce912ee5a8d [file] [log] [blame]
# trusty beta image has jdk8, gcc4.8.4
dist: trusty
sudo: required
# xcode8 has jdk8
osx_image: xcode8.3
# Not technically required but suppresses 'Ruby' in Job status message.
language: java
os:
- linux
- osx
env:
# TODO(bazelbuild/continuous-integration#95): re-enable HEAD builds with stable URL
# - V=HEAD
- V=0.8.0
before_install:
- |
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
OS=darwin
else
sysctl kernel.unprivileged_userns_clone=1
OS=linux
fi
if [[ "${V}" == "HEAD" ]]; then
# Determine last successful build number. This may change while we are
# downloading, so it's important to determine ahead of time, in case
# we need to resume the download.
CI_BASE="http://ci.bazel.io/view/Bazel%20bootstrap%20and%20maintenance/job/Bazel/PLATFORM_NAME=${OS}-x86_64/"
CI_INDEX_URL="${CI_BASE}/lastSuccessfulBuild/"
wget -q -O build-index.html "${CI_INDEX_URL}"
CI_BUILD=$(grep '<title>' build-index.html | sed -e 's/^.*#\([0-9]*\).*$/\1/')
# Determine the artifact name. This is normally, bazel--installer.sh,
# but it may be, for example, bazel-0.5rc2-installer.sh before a release.
CI_ARTIFACT=$(grep -o 'bazel-[^\"-]*-installer.sh' build-index.html | head -n 1)
URL="${CI_BASE}/${CI_BUILD}/artifact/output/ci/${CI_ARTIFACT}"
rm build-index.html
else
URL="https://github.com/bazelbuild/bazel/releases/download/${V}/bazel-${V}-installer-${OS}-x86_64.sh"
fi
wget -O install.sh "${URL}"
chmod +x install.sh
./install.sh --user
rm -f install.sh
script:
- |
bazel \
--output_base=$HOME/.cache/bazel \
--batch \
--host_jvm_args=-Xmx500m \
--host_jvm_args=-Xms500m \
test \
--config=ci \
--experimental_repository_cache="$HOME/.bazel_repository_cache" \
--local_resources=400,1,1.0 \
--test_tag_filters=-dev \
//...
notifications:
email: false