Skip to content

Commit

Permalink
[ci] Re-add software test job
Browse files Browse the repository at this point in the history
This is now a separate job that others don't have to depend on.

Signed-off-by: James Wainwright <[email protected]>
  • Loading branch information
jwnrt committed Nov 10, 2023
1 parent 97ed16f commit 58e3f4e
Showing 1 changed file with 41 additions and 12 deletions.
53 changes: 41 additions & 12 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 58e3f4e

Please sign in to comment.