Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: remove deprecated bazel --batch option #4166

Merged
merged 1 commit into from
Aug 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ echo "building using ${NUM_CPUS} CPUs"
function bazel_release_binary_build() {
echo "Building..."
cd "${ENVOY_CI_DIR}"
bazel --batch build ${BAZEL_BUILD_OPTIONS} -c opt //source/exe:envoy-static
bazel build ${BAZEL_BUILD_OPTIONS} -c opt //source/exe:envoy-static
# Copy the envoy-static binary somewhere that we can access outside of the
# container.
cp -f \
Expand All @@ -35,7 +35,7 @@ function bazel_release_binary_build() {
function bazel_debug_binary_build() {
echo "Building..."
cd "${ENVOY_CI_DIR}"
bazel --batch build ${BAZEL_BUILD_OPTIONS} -c dbg //source/exe:envoy-static
bazel build ${BAZEL_BUILD_OPTIONS} -c dbg //source/exe:envoy-static
# Copy the envoy-static binary somewhere that we can access outside of the
# container.
cp -f \
Expand All @@ -61,14 +61,14 @@ if [[ "$1" == "bazel.release" ]]; then
echo "Testing $* ..."
# Run only specified tests. Argument can be a single test
# (e.g. '//test/common/common:assert_test') or a test group (e.g. '//test/common/...')
bazel --batch test ${BAZEL_TEST_OPTIONS} -c opt $*
bazel test ${BAZEL_TEST_OPTIONS} -c opt $*
else
echo "Testing..."
# We have various test binaries in the test directory such as tools, benchmarks, etc. We
# run a build pass to make sure they compile.
bazel --batch build ${BAZEL_BUILD_OPTIONS} -c opt //include/... //source/... //test/...
bazel build ${BAZEL_BUILD_OPTIONS} -c opt //include/... //source/... //test/...
# Now run all of the tests which should already be compiled.
bazel --batch test ${BAZEL_TEST_OPTIONS} -c opt //test/...
bazel test ${BAZEL_TEST_OPTIONS} -c opt //test/...
fi
exit 0
elif [[ "$1" == "bazel.release.server_only" ]]; then
Expand All @@ -81,7 +81,7 @@ elif [[ "$1" == "bazel.debug" ]]; then
echo "bazel debug build with tests..."
bazel_debug_binary_build
echo "Testing..."
bazel --batch test ${BAZEL_TEST_OPTIONS} -c dbg //test/...
bazel test ${BAZEL_TEST_OPTIONS} -c dbg //test/...
exit 0
elif [[ "$1" == "bazel.debug.server_only" ]]; then
setup_gcc_toolchain
Expand All @@ -93,15 +93,15 @@ elif [[ "$1" == "bazel.asan" ]]; then
echo "bazel ASAN/UBSAN debug build with tests..."
cd "${ENVOY_FILTER_EXAMPLE_SRCDIR}"
echo "Building and testing..."
bazel --batch test ${BAZEL_TEST_OPTIONS} -c dbg --config=clang-asan @envoy//test/... \
bazel test ${BAZEL_TEST_OPTIONS} -c dbg --config=clang-asan @envoy//test/... \
//:echo2_integration_test //:envoy_binary_test
exit 0
elif [[ "$1" == "bazel.tsan" ]]; then
setup_clang_toolchain
echo "bazel TSAN debug build with tests..."
cd "${ENVOY_FILTER_EXAMPLE_SRCDIR}"
echo "Building and testing..."
bazel --batch test ${BAZEL_TEST_OPTIONS} -c dbg --config=clang-tsan @envoy//test/... \
bazel test ${BAZEL_TEST_OPTIONS} -c dbg --config=clang-tsan @envoy//test/... \
//:echo2_integration_test //:envoy_binary_test
exit 0
elif [[ "$1" == "bazel.dev" ]]; then
Expand All @@ -110,14 +110,14 @@ elif [[ "$1" == "bazel.dev" ]]; then
echo "bazel fastbuild build with tests..."
cd "${ENVOY_CI_DIR}"
echo "Building..."
bazel --batch build ${BAZEL_BUILD_OPTIONS} -c fastbuild //source/exe:envoy-static
bazel build ${BAZEL_BUILD_OPTIONS} -c fastbuild //source/exe:envoy-static
# Copy the envoy-static binary somewhere that we can access outside of the
# container for developers.
cp -f \
"${ENVOY_CI_DIR}"/bazel-bin/source/exe/envoy-static \
"${ENVOY_DELIVERY_DIR}"/envoy-fastbuild
echo "Building and testing..."
bazel --batch test ${BAZEL_TEST_OPTIONS} -c fastbuild //test/...
bazel test ${BAZEL_TEST_OPTIONS} -c fastbuild //test/...
exit 0
elif [[ "$1" == "bazel.ipv6_tests" ]]; then
# This is around until Circle supports IPv6. We try to run a limited set of IPv6 tests as fast
Expand All @@ -136,15 +136,15 @@ elif [[ "$1" == "bazel.ipv6_tests" ]]; then
setup_clang_toolchain
echo "Testing..."
cd "${ENVOY_CI_DIR}"
bazel --batch test ${BAZEL_TEST_OPTIONS} -c fastbuild //test/integration/... //test/common/network/...
bazel test ${BAZEL_TEST_OPTIONS} -c fastbuild //test/integration/... //test/common/network/...
exit 0
elif [[ "$1" == "bazel.api" ]]; then
setup_clang_toolchain
cd "${ENVOY_CI_DIR}"
echo "Building API..."
bazel --batch build ${BAZEL_BUILD_OPTIONS} -c fastbuild @envoy_api//envoy/...
bazel build ${BAZEL_BUILD_OPTIONS} -c fastbuild @envoy_api//envoy/...
echo "Testing API..."
bazel --batch test ${BAZEL_TEST_OPTIONS} -c fastbuild @envoy_api//test/... @envoy_api//tools/... \
bazel test ${BAZEL_TEST_OPTIONS} -c fastbuild @envoy_api//test/... @envoy_api//tools/... \
@envoy_api//tools:capture2pcap_test
exit 0
elif [[ "$1" == "bazel.coverage" ]]; then
Expand All @@ -154,7 +154,7 @@ elif [[ "$1" == "bazel.coverage" ]]; then
# gcovr is a pain to run with `bazel run`, so package it up into a
# relocatable and hermetic-ish .par file.
cd "${ENVOY_SRCDIR}"
bazel --batch build @com_github_gcovr_gcovr//:gcovr.par
bazel build @com_github_gcovr_gcovr//:gcovr.par
export GCOVR="${ENVOY_SRCDIR}/bazel-bin/external/com_github_gcovr_gcovr/gcovr.par"

export GCOVR_DIR="${ENVOY_BUILD_DIR}/bazel-envoy"
Expand All @@ -181,7 +181,7 @@ elif [[ "$1" == "bazel.coverity" ]]; then
echo "bazel Coverity Scan build"
echo "Building..."
cd "${ENVOY_CI_DIR}"
/build/cov-analysis/bin/cov-build --dir "${ENVOY_BUILD_DIR}"/cov-int bazel --batch build --action_env=LD_PRELOAD ${BAZEL_BUILD_OPTIONS} \
/build/cov-analysis/bin/cov-build --dir "${ENVOY_BUILD_DIR}"/cov-int bazel build --action_env=LD_PRELOAD ${BAZEL_BUILD_OPTIONS} \
-c opt //source/exe:envoy-static
# tar up the coverity results
tar czvf "${ENVOY_BUILD_DIR}"/envoy-coverity-output.tgz -C "${ENVOY_BUILD_DIR}" cov-int
Expand Down
2 changes: 1 addition & 1 deletion docs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fi

source "${BUILD_DIR}"/venv/bin/activate

bazel --batch build ${BAZEL_BUILD_OPTIONS} @envoy_api//docs:protos --aspects \
bazel build ${BAZEL_BUILD_OPTIONS} @envoy_api//docs:protos --aspects \
tools/protodoc/protodoc.bzl%proto_doc_aspect --output_groups=rst --action_env=CPROFILE_ENABLED --spawn_strategy=standalone

# These are the protos we want to put in docs, this list will grow.
Expand Down