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

Adding all our CI jobs to AZP. #827

Merged
merged 12 commits into from
Apr 14, 2022
98 changes: 95 additions & 3 deletions .azure-pipelines/pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,111 @@ trigger:
stages:
- stage: check
dependsOn: []
pool: "x64-large"
jobs:
- job: bazel
- job: build_and_format
displayName: "do_ci.sh"
dependsOn: []
strategy:
maxParallel: 1
maxParallel: 2
matrix:
build:
CI_TARGET: "build"
format:
CI_TARGET: "check_format"
timeoutInMinutes: 120
steps:
- template: bazel.yml
parameters:
ciTarget: $(CI_TARGET)

- stage: test
dependsOn: ["check"]
pool: "x64-large"
jobs:
- job: test_and_benchmark
displayName: "do_ci.sh"
strategy:
# Both test and benchmark need dedicated resources for stability.
maxParallel: 1
matrix:
test:
CI_TARGET: "test"
benchmark:
CI_TARGET: "benchmark_with_own_binaries"
timeoutInMinutes: 120
steps:
- template: bazel.yml
parameters:
ciTarget: $(CI_TARGET)

- stage: clang_tidy
dependsOn: ["check"]
pool: "x64-large"
jobs:
- job: clang_tidy
displayName: "do_ci.sh"
strategy:
maxParallel: 1
matrix:
clang_tidy:
CI_TARGET: "clang_tidy"
timeoutInMinutes: 120
steps:
- template: bazel.yml
parameters:
ciTarget: $(CI_TARGET)

- stage: test_gcc
dependsOn: ["check"]
pool: "x64-large"
jobs:
- job: test_gcc
displayName: "do_ci.sh"
strategy:
maxParallel: 1
matrix:
test_gcc:
CI_TARGET: "test_gcc"
timeoutInMinutes: 120
steps:
- template: bazel.yml
parameters:
ciTarget: $(CI_TARGET)

- stage: sanitizers
dependsOn: ["test"]
pool: "x64-large"
jobs:
- job: sanitizers
displayName: "do_ci.sh"
strategy:
maxParallel: 2
matrix:
asan:
CI_TARGET: "asan"
tsan:
CI_TARGET: "tsan"
timeoutInMinutes: 120
steps:
- template: bazel.yml
parameters:
ciTarget: $(CI_TARGET)

- stage: coverage
dependsOn: ["test"]
pool: "x64-large"
jobs:
- job: coverage
displayName: "do_ci.sh"
strategy:
maxParallel: 2
matrix:
coverage:
CI_TARGET: "coverage"
coverage_integration:
CI_TARGET: "coverage_integration"
timeoutInMinutes: 120
pool: "x64-large"
steps:
- template: bazel.yml
parameters:
Expand Down
10 changes: 7 additions & 3 deletions ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ function do_test() {
function do_clang_tidy() {
# clang-tidy will warn on standard library issues with libc++
BAZEL_BUILD_OPTIONS=("--config=clang" "${BAZEL_BUILD_OPTIONS[@]}")
BAZEL_BUILD_OPTIONS="${BAZEL_BUILD_OPTIONS[*]}" NUM_CPUS=4 ci/run_clang_tidy.sh
if [ -n "$CIRCLECI" ]; then
BAZEL_BUILD_OPTIONS="${BAZEL_BUILD_OPTIONS[*]}" NUM_CPUS=4 ci/run_clang_tidy.sh
else
BAZEL_BUILD_OPTIONS="${BAZEL_BUILD_OPTIONS[*]}" ci/run_clang_tidy.sh
fi
}

function do_unit_test_coverage() {
Expand All @@ -89,8 +93,8 @@ function do_unit_test_coverage() {

function do_integration_test_coverage() {
export TEST_TARGETS="//test:python_test"
#TODO(#564): Revert this to 78.6
export COVERAGE_THRESHOLD=75.0
# TODO(#830): Raise the integration test coverage.
export COVERAGE_THRESHOLD=74.2
echo "bazel coverage build with tests ${TEST_TARGETS}"
test/run_nighthawk_bazel_coverage.sh ${TEST_TARGETS}
exit 0
Expand Down
1 change: 1 addition & 0 deletions ci/run_clang_tidy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ function filter_excludes() {
}

function run_clang_tidy() {
echo "Running clang_tidy with NUM_CPUS: ${NUM_CPUS:-0}."
python3 "${LLVM_PREFIX}/share/clang/run-clang-tidy.py" \
-clang-tidy-binary="${CLANG_TIDY}" \
-clang-apply-replacements-binary="${CLANG_APPLY_REPLACEMENTS}" \
Expand Down
1 change: 1 addition & 0 deletions test/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ envoy_cc_test(
# libraries as dependencies.
envoy_cc_test(
name = "python_test",
size = "enormous",
srcs = ["python_test.cc"],
data = ["//test/integration:integration_test"],
repository = "@envoy",
Expand Down