aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Kliuchnikov <eustas@google.com>2017-03-23 13:35:53 +0100
committerGitHub <noreply@github.com>2017-03-23 13:35:53 +0100
commit22421ebe3022eecd213f5d11bf1893aaf4c867c1 (patch)
treedecc0ccafaf676a2895f3e8ae73718450d790d66
parentee5c71905794247a0f711c78824dc5c4ecdbf7da (diff)
downloadbrotli-22421ebe3022eecd213f5d11bf1893aaf4c867c1.zip
brotli-22421ebe3022eecd213f5d11bf1893aaf4c867c1.tar.gz
brotli-22421ebe3022eecd213f5d11bf1893aaf4c867c1.tar.bz2
Bazel build on linux/osx (#526)
-rwxr-xr-x.travis.sh19
-rw-r--r--.travis.yml16
2 files changed, 35 insertions, 0 deletions
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: