ci: test bazel builds on travis (#18240)
This commit is contained in:
parent
c6cf678a07
commit
eaa843b55f
|
@ -53,6 +53,7 @@ env:
|
|||
- CI_MODE=docs_test
|
||||
- CI_MODE=aio
|
||||
- CI_MODE=aio_e2e
|
||||
- CI_MODE=bazel
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -u -e -o pipefail
|
||||
|
||||
bazel build ...
|
|
@ -46,4 +46,7 @@ case ${CI_MODE} in
|
|||
aio_e2e)
|
||||
${thisDir}/test-aio-e2e.sh
|
||||
;;
|
||||
bazel)
|
||||
${thisDir}/test-bazel.sh
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in New Issue