[READ ONLY MIRROR] Envoy REST/proto API definitions and documentation. (grpc依赖)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
994 B

#!/bin/bash
# Run a CI build/test target, e.g. docs, asan.
set -e
# xlarge resource_class.
# See note: https://circleci.com/docs/2.0/configuration-reference/#resource_class for why we
# hard code this (basically due to how docker works).
export NUM_CPUS=8
. "$(dirname "$0")"/build_setup.sh
echo "building using ${NUM_CPUS} CPUs"
if [[ "$1" == "bazel.test" ]]; then
echo "bazel building and testing..."
bazel --batch build ${BAZEL_BUILD_OPTIONS} //envoy/...
bazel --batch test ${BAZEL_TEST_OPTIONS} //test/... //tools/...
exit 0
elif [[ "$1" == "bazel.docs" ]]; then
echo "generating docs..."
./docs/build.sh
elif [[ "$1" == "fix_format" ]]; then
echo "fix_format..."
cd "${ENVOY_SRCDIR}"
./tools/check_format.py fix
exit 0
elif [[ "$1" == "check_format" ]]; then
echo "check_format..."
cd "${ENVOY_SRCDIR}"
./tools/check_format.py check
exit 0
else
echo "Invalid do_ci.sh target. The valid targets are bazel.{docs,test} and {check,fix}_format."
exit 1
fi