ci: test bazel builds on travis (#18240)

This commit is contained in:
Chuck Jazdzewski 2017-07-20 09:40:40 -07:00 committed by Miško Hevery
parent c6cf678a07
commit eaa843b55f
5 changed files with 26 additions and 0 deletions

View File

@ -53,6 +53,7 @@ env:
- CI_MODE=docs_test
- CI_MODE=aio
- CI_MODE=aio_e2e
- CI_MODE=bazel
matrix:
fast_finish: true

View File

@ -14,6 +14,9 @@ if [[ ${TRAVIS_TEST_RESULT=0} == 1 ]]; then
exit 1;
fi
if [[ ${CI_MODE:-} == "bazel" ]]; then
exit 0;
fi
travisFoldStart "tsc tools"
$(npm bin)/tsc -p tools

View File

@ -59,6 +59,20 @@ if [[ ${TRAVIS} && (${CI_MODE} == "aio" || ${CI_MODE} == "aio_e2e" || ${CI_MODE}
travisFoldEnd "yarn-install.aio"
fi
# Install bazel
if [[ ${TRAVIS} && ${CI_MODE} == "bazel" ]]; then
travisFoldStart "bazel-install"
(
mkdir tmp
cd tmp
curl --location --compressed https://github.com/bazelbuild/bazel/releases/download/0.5.2/bazel-0.5.2-installer-linux-x86_64.sh > bazel-0.5.2-installer-linux-x86_64.sh
chmod +x bazel-0.5.2-installer-linux-x86_64.sh
./bazel-0.5.2-installer-linux-x86_64.sh --user
cd ..
rm -rf tmp
)
travisFoldEnd "bazel-install"
fi
# Install Chromium
if [[ ${CI_MODE} == "js" || ${CI_MODE} == "e2e" || ${CI_MODE} == "e2e_2" || ${CI_MODE} == "aio" || ${CI_MODE} == "aio_e2e" ]]; then

5
scripts/ci/test-bazel.sh Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -u -e -o pipefail
bazel build ...

View File

@ -46,4 +46,7 @@ case ${CI_MODE} in
aio_e2e)
${thisDir}/test-aio-e2e.sh
;;
bazel)
${thisDir}/test-bazel.sh
;;
esac