From 58e3f4eb26c49575fb27e65580d08b11c7733d63 Mon Sep 17 00:00:00 2001 From: James Wainwright Date: Thu, 2 Nov 2023 16:39:25 +0000 Subject: [PATCH] [ci] Re-add software test job This is now a separate job that others don't have to depend on. Signed-off-by: James Wainwright --- azure-pipelines.yml | 53 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 12 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8bb0815f311fbc..0698ada639da4a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -215,31 +215,27 @@ jobs: # * It excludes targets that depend on bitstream_splice rules, since the # environment does not have access to Vivado. export GCP_BAZEL_CACHE_KEY=$(bazelCacheGcpKeyPath) - TARGET_PATTERN_FILE=$(mktemp) - echo //... > "${TARGET_PATTERN_FILE}" - echo -//quality/... >> "${TARGET_PATTERN_FILE}" - echo -//sw/otbn/crypto/... >> "${TARGET_PATTERN_FILE}" - echo -//third_party/riscv-compliance/... >> "${TARGET_PATTERN_FILE}" - echo -//hw:all >> "${TARGET_PATTERN_FILE}" + echo //... > target_pattern.txt + echo -//quality/... >> target_pattern.txt + echo -//sw/otbn/crypto/... >> target_pattern.txt + echo -//third_party/riscv-compliance/... >> target_pattern.txt + echo -//hw:all >> target_pattern.txt ./bazelisk.sh cquery \ --noinclude_aspects \ --output=starlark \ --starlark:expr='"-{}".format(target.label)' \ --define DISABLE_VERILATOR_BUILD=true \ -- "rdeps(//..., kind(bitstream_splice, //...))" \ - >> "${TARGET_PATTERN_FILE}" + >> target_pattern.txt # Build all 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 `TARGET_PATTERN_FILE` as an Azure variable. - echo "##vso[task.setVariable variable=targetPatternFile]${TARGET_PATTERN_FILE}" + --target_pattern_file=target_pattern.txt displayName: Build SW - - publish: '$(targetPatternFile)' + - publish: target_pattern.txt artifact: target_pattern_file - bash: | set -x -e @@ -258,6 +254,39 @@ jobs: includePatterns: - "/sw/***" +- job: sw_test + displayName: Earl Grey SW Test + timeoutInMinutes: 120 + dependsOn: sw_build + pool: ci-public + variables: + - name: bazelCacheGcpKeyPath + value: '' + steps: + - template: ci/checkout-template.yml + - template: ci/install-package-dependencies.yml + - task: DownloadSecureFile@1 + condition: eq(variables['Build.SourceBranchName'], 'master') + name: bazelCacheGcpKey + inputs: + secureFile: "bazel_cache_gcp_key.json" + # Set the remote cache GCP key path + - bash: echo "##vso[task.setvariable variable=bazelCacheGcpKeyPath]$(bazelCacheGcpKey.secureFilePath)" + condition: eq(variables['Build.SourceBranchName'], 'master') + displayName: GCP key path + - download: current + artifact: target_pattern_file + - bash: | + TARGET_PATTERN_FILE="$(Pipeline.Workspace)/target_pattern_file/target_pattern.txt" + 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 + - template: ci/publish-bazel-test-results.yml + - job: chip_englishbreakfast_verilator displayName: Verilated English Breakfast (Build) # Build Verilator simulation of the English Breakfast toplevel design