diff --git a/.travis.sh b/.travis.sh index 408b6fd..c4d46be 100755 --- a/.travis.sh +++ b/.travis.sh @@ -1,6 +1,19 @@ #!/bin/bash case "$1" in + "before_install") + case "${TRAVIS_OS_NAME}" in + "linux") + case "${BUILD_SYSTEM}" in + "bazel") + wget https://github.com/bazelbuild/bazel/releases/download/0.4.5/bazel_0.4.5-linux-x86_64.deb + echo "b494d0a413e4703b6cd5312403bea4d92246d6425b3be68c9bfbeb8cc4db8a55 bazel_0.4.5-linux-x86_64.deb" | sha256sum -c --strict + sudo dpkg -i bazel_0.4.5-linux-x86_64.deb + ;; + esac + ;; + esac + ;; "install") case "${TRAVIS_OS_NAME}" in "osx") @@ -19,6 +32,9 @@ case "$1" in get_python_environment $INSTALL_TYPE $PYTHON_VERSION venv pip install --upgrade wheel ;; + "bazel") + brew install bazel + ;; esac ;; "linux") @@ -52,6 +68,9 @@ case "$1" in cd java/org/brotli mvn install && cd integration && mvn verify ;; + "bazel") + bazel test ...:all + ;; esac ;; "after_success") diff --git a/.travis.yml b/.travis.yml index 4f61c26..f87946d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -227,6 +227,21 @@ matrix: env: BUILD_SYSTEM=maven language: java + - os: linux + dist: trusty + sudo: required + env: BUILD_SYSTEM=bazel + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - wget + - pkg-config + + - os: osx + env: BUILD_SYSTEM=bazel + before_install: ### ## If we use the matrix to set CC/CXX Travis, overwrites the values, @@ -235,6 +250,7 @@ before_install: ### - if [ -n "${C_COMPILER}" ]; then export CC="${C_COMPILER}"; fi - if [ -n "${CXX_COMPILER}" ]; then export CXX="${CXX_COMPILER}"; fi +- ./.travis.sh before_install install: - ./.travis.sh install script: