do_ci.sh 658 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. # Run a CI build/test target, e.g. docs, asan.
  3. set -e
  4. # xlarge resource_class.
  5. # See note: https://circleci.com/docs/2.0/configuration-reference/#resource_class for why we
  6. # hard code this (basically due to how docker works).
  7. export NUM_CPUS=8
  8. . "$(dirname "$0")"/build_setup.sh
  9. echo "building using ${NUM_CPUS} CPUs"
  10. if [[ "$1" == "bazel.test" ]]; then
  11. echo "bazel building and testing..."
  12. bazel --batch build ${BAZEL_BUILD_OPTIONS} //envoy/...
  13. bazel --batch test ${BAZEL_TEST_OPTIONS} //test/... //tools/...
  14. exit 0
  15. else
  16. echo "Invalid do_ci.sh target. The valid targets are bazel.{docs,test} and {check,fix}_format."
  17. exit 1
  18. fi