From 632356e0db66e995d55da37156384ada8510b383 Mon Sep 17 00:00:00 2001 From: James Wainwright Date: Fri, 1 Sep 2023 10:45:32 +0100 Subject: [PATCH] [ci] Split SW build and test Signed-off-by: James Wainwright --- azure-pipelines.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ebef6a84593e0e..bdd0bbe50fb421 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -210,8 +210,8 @@ jobs: # Check the entire build graph for conflicts in loading or analysis # phases. For context, see issue #18726. ci/bazelisk.sh build --nobuild //... - # This command builds all software and runs all unit tests that run on the - # host, with a few exceptions: + + # This command selects the unit tests to be executed: # * It excludes //quality because that's the purview of `slow_lints`. # * It excludes the tests from //third_party/riscv-compliance because # they're already covered by `execute_fpga_tests_cw310`. @@ -234,18 +234,29 @@ jobs: --define DISABLE_VERILATOR_BUILD=true \ -- "rdeps(//..., kind(bitstream_splice, //...))" \ >> "${TARGET_PATTERN_FILE}" + + # Build unit tests and their dependencies. ci/bazelisk.sh build \ --build_tests_only=false \ --define DISABLE_VERILATOR_BUILD=true \ --test_tag_filters=-broken,-cw310,-verilator,-dv \ --target_pattern_file="${TARGET_PATTERN_FILE}" + + # Export the "TARGET_PATTERN_FILE" variable to be used in tests. + echo "##vso[task.setvariable variable=targetPatternFile]${TARGET_PATTERN_FILE}" + displayName: Build SW + - bash: | + set -x -e + export GCP_BAZEL_CACHE_KEY=$(bazelCacheGcpKeyPath) + export TARGET_PATTERN_FILE=$(targetPatternFile) + ci/bazelisk.sh test \ --build_tests_only=false \ --test_output=errors \ --define DISABLE_VERILATOR_BUILD=true \ --test_tag_filters=-broken,-cw310,-verilator,-dv \ --target_pattern_file="${TARGET_PATTERN_FILE}" - displayName: Build & test SW + displayName: Test SW - bash: | set -x -e . util/build_consts.sh