From f6dc71534eaed438f9cfc44cbade9327f2c0c4dc Mon Sep 17 00:00:00 2001 From: Gary Guo Date: Fri, 22 Nov 2024 16:06:23 +0000 Subject: [PATCH] [ci] remove Azure Pipelines We have been using GitHub Actions for some time now, both for public CI and private CI, and it seems to be functioning well. Signed-off-by: Gary Guo --- azure-pipelines.yml | 129 ----------------------- ci/azp-private.yml | 31 ------ ci/ibex-rtl-ci-steps.yml | 90 ---------------- ci/run-cosim-test.sh | 2 +- ci/vars.yml | 16 --- ci/vars_to_logging_cmd.py | 43 -------- doc/03_reference/verification_stages.rst | 2 +- 7 files changed, 2 insertions(+), 311 deletions(-) delete mode 100644 azure-pipelines.yml delete mode 100644 ci/azp-private.yml delete mode 100644 ci/ibex-rtl-ci-steps.yml delete mode 100644 ci/vars.yml delete mode 100755 ci/vars_to_logging_cmd.py diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 5f57fc110e..0000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,129 +0,0 @@ -# Copyright lowRISC contributors. -# Licensed under the Apache License, Version 2.0, see LICENSE for details. -# SPDX-License-Identifier: Apache-2.0 - -# Azure Pipelines CI build configuration -# Documentation at https://aka.ms/yaml - -variables: -- template: ci/vars.yml - -trigger: - batch: true - branches: - include: - - '*' - tags: - include: - - '*' -pr: - branches: - include: - - '*' - -# Note: All tests run as part of one job to avoid copying intermediate build -# artifacts around (e.g. Verilator and toolchain builds). Once more builds/tests -# are added, we need to re-evaluate this decision to parallelize jobs and -# improve end-to-end CI times. - -jobs: -- job: lint_dv - displayName: Run quality checks (Lint and DV) - pool: - vmImage: "ubuntu-20.04" - steps: - - bash: | - ci/install-build-deps.sh - displayName: Install build dependencies - - - bash: | - echo $PATH - python3 --version - echo -n "fusesoc " - fusesoc --version - verilator --version - riscv32-unknown-elf-gcc --version - verible-verilog-lint --version - displayName: Display environment - - # Verible format is experimental so only run on default config for now, - # will eventually become part of the per-config CI - - bash: | - fusesoc --cores-root . run --no-export --target=format --tool=veribleformat lowrisc:ibex:ibex_top_tracing - if [ $? != 0 ]; then - echo -n "##vso[task.logissue type=error]" - echo "Verilog format with Verible failed. Run 'fusesoc --cores-root . run --no-export --target=format --tool=veribleformat lowrisc:ibex:ibex_top_tracing' to check and fix all errors." - echo "This flow is currently experimental and failures can be ignored." - fi - # Show diff of what verilog_format would have changed, and then revert. - git diff - git reset --hard HEAD - continueOnError: true - displayName: Format all source code with Verible format (experimental) - - - bash: | - fork_origin=$(git merge-base --fork-point origin/master) - changed_files=$(git diff --name-only $fork_origin | grep -v '^vendor' | grep -E '\.(cpp|cc|c|h)$') - test -z "$changed_files" || git diff -U0 $fork_origin $changed_files | clang-format-diff -p1 | tee clang-format-output - if [ -s clang-format-output ]; then - echo -n "##vso[task.logissue type=error]" - echo "C/C++ lint failed. Use 'git clang-format' with appropriate options to reformat the changed code." - exit 1 - fi - # This check is not idempotent, but checks changes to a base branch. - # Run it only on pull requests. - condition: eq(variables['Build.Reason'], 'PullRequest') - displayName: 'Use clang-format to check C/C++ coding style' - - - bash: | - # Build and run CSR testbench, chosen Ibex configuration does not effect - # this so doesn't need to be part of per-config CI - fusesoc --cores-root=. run --target=sim --tool=verilator lowrisc:ibex:tb_cs_registers - displayName: Build and run CSR testbench with Verilator - - - bash: | - cd build - git clone https://github.com/riscv/riscv-compliance.git - cd riscv-compliance - git checkout "$RISCV_COMPLIANCE_GIT_VERSION" - displayName: Get RISC-V Compliance test suite - - - bash: | - # Build CoreMark without performance counter dump for co-simulation testing - make -C ./examples/sw/benchmarks/coremark SUPPRESS_PCOUNT_DUMP=1 - make -C ./examples/sw/simple_system/pmp_smoke_test - make -C ./examples/sw/simple_system/dit_test - make -C ./examples/sw/simple_system/dummy_instr_test - displayName: Build tests for verilator co-simulation - - # Run Ibex RTL CI per supported configuration - - template : ci/ibex-rtl-ci-steps.yml - parameters: - ibex_configs: - # Note: Try to keep the list of configurations in sync with the one used - # in Private CI. - - small - - opentitan - - maxperf - - maxperf-pmp-bmbalanced - - maxperf-pmp-bmfull - - experimental-branch-predictor - - # Run lint on simple system - - bash: | - fusesoc --cores-root . run --target=lint --tool=verilator lowrisc:ibex:ibex_simple_system - if [ $? != 0 ]; then - echo -n "##vso[task.logissue type=error]" - echo "Verilog lint with Verilator failed. Run 'fusesoc --cores-root . run --target=lint --tool=verilator lowrisc:ibex:ibex_simple_system' to check and fix all errors." - exit 1 - fi - displayName: Run Verilator lint on simple system - - - bash: | - fusesoc --cores-root . run --target=lint --tool=veriblelint lowrisc:ibex:ibex_simple_system - if [ $? != 0 ]; then - echo -n "##vso[task.logissue type=error]" - echo "Verilog lint with Verible failed. Run 'fusesoc --cores-root . run --target=lint --tool=veriblelint lowrisc:ibex:ibex_simple_system' to check and fix all errors." - exit 1 - fi - displayName: Run Verible lint on simple system diff --git a/ci/azp-private.yml b/ci/azp-private.yml deleted file mode 100644 index 04df3f4bd1..0000000000 --- a/ci/azp-private.yml +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright lowRISC contributors. -# Licensed under the Apache License, Version 2.0, see LICENSE for details. -# SPDX-License-Identifier: Apache-2.0 -# -# Private CI trigger. Used to run tooling that can't currently be shared -# publicly. - -trigger: - batch: true - branches: - include: - - '*' - tags: - include: - - "*" -pr: - branches: - include: - - '*' - -# The runner used for private CI enforces the use of the template below. All -# build steps need to be placed into the template. -resources: - repositories: - - repository: lowrisc-private-ci - type: github - endpoint: lowRISC - name: lowrisc/lowrisc-private-ci - -extends: - template: jobs-ibex.yml@lowrisc-private-ci diff --git a/ci/ibex-rtl-ci-steps.yml b/ci/ibex-rtl-ci-steps.yml deleted file mode 100644 index 55d0a2e004..0000000000 --- a/ci/ibex-rtl-ci-steps.yml +++ /dev/null @@ -1,90 +0,0 @@ -parameters: - ibex_configs: [] - -steps: - - ${{ each config in parameters.ibex_configs }}: - # ibex_config.py will exit with error code 1 on any error which will cause - # the CI to fail if there's an issue with the configuration file or an - # incorrect configuration name being used - - bash: | - set -e - IBEX_CONFIG_OPTS=`./util/ibex_config.py ${{ config }} fusesoc_opts` - echo $IBEX_CONFIG_OPTS - echo "##vso[task.setvariable variable=ibex_config_opts]" $IBEX_CONFIG_OPTS - displayName: Test and display fusesoc config for ${{ config }} - - - bash: | - fusesoc --cores-root . run --target=lint --tool=verilator lowrisc:ibex:ibex_top_tracing $IBEX_CONFIG_OPTS - if [ $? != 0 ]; then - echo -n "##vso[task.logissue type=error]" - echo "Verilog lint failed. Run 'fusesoc --cores-root . run --target=lint --tool=verilator lowrisc:ibex:ibex_top_tracing $IBEX_CONFIG_OPTS' to check and fix all errors." - exit 1 - fi - displayName: Lint Verilog source files with Verilator for ${{ config }} - - - bash: | - fusesoc --cores-root . run --target=lint --tool=veriblelint lowrisc:ibex:ibex_top_tracing $IBEX_CONFIG_OPTS - if [ $? != 0 ]; then - echo -n "##vso[task.logissue type=error]" - echo "Verilog lint failed. Run 'fusesoc --cores-root . run --target=lint --tool=veriblelint lowrisc:ibex:ibex_top_tracing $IBEX_CONFIG_OPTS' to check and fix all errors." - exit 1 - fi - displayName: Lint Verilog source files with Verible Verilog Lint for ${{ config }} - - - bash: | - # Build simulation model of Ibex - fusesoc --cores-root=. run --target=sim --setup --build lowrisc:ibex:ibex_riscv_compliance $IBEX_CONFIG_OPTS - if [ $? != 0 ]; then - echo -n "##vso[task.logissue type=error]" - echo "Unable to build Verilator model of Ibex for compliance testing." - exit 1 - fi - - # Run compliance test suite - export TARGET_SIM=$PWD/build/lowrisc_ibex_ibex_riscv_compliance_0.1/sim-verilator/Vibex_riscv_compliance - export RISCV_PREFIX=riscv32-unknown-elf- - export RISCV_TARGET=ibex - export RISCV_DEVICE=rv32imc - fail=0 - for isa in rv32i rv32im rv32imc rv32Zicsr rv32Zifencei; do - make -C build/riscv-compliance RISCV_ISA=$isa 2>&1 | tee run.log - if [ ${PIPESTATUS[0]} != 0 ]; then - echo -n "##vso[task.logissue type=error]" - echo "The RISC-V compliance test suite failed for $isa" - - # There's no easy way to get the test results in machine-readable - # form to properly exclude known-failing tests. Going with an - # approximate solution for now. - if [ $isa == rv32i ] && grep -q 'FAIL: 4/48' run.log; then - echo -n "##vso[task.logissue type=error]" - echo "Expected failure for rv32i, see lowrisc/ibex#100 more more information." - else - fail=1 - fi - fi - done - exit $fail - displayName: Run RISC-V Compliance test for Ibex RV32IMC for ${{ config }} - - - bash: | - set -e - source ci/setup-cosim.sh - # Build simple system with co-simulation - fusesoc --cores-root=. run --target=sim --setup --build lowrisc:ibex:ibex_simple_system_cosim $IBEX_CONFIG_OPTS - - # Run directed tests against simple system co-simulation - ./ci/run-cosim-test.sh --skip-pass-check CoreMark examples/sw/benchmarks/coremark/coremark.elf - - if ./util/ibex_config.py ${{ config }} query_fields PMPEnable | grep -q 'PMPEnable=1'; then - ./ci/run-cosim-test.sh --skip-pass-check pmp_smoke examples/sw/simple_system/pmp_smoke_test/pmp_smoke_test.elf - else - echo "PMP not supported on ${{ config }}, skipping pmp_smoke_test" - fi - - if ./util/ibex_config.py ${{ config }} query_fields SecureIbex | grep -q 'SecureIbex=1'; then - ./ci/run-cosim-test.sh dit_test examples/sw/simple_system/dit_test/dit_test.elf - ./ci/run-cosim-test.sh dummy_instr_test examples/sw/simple_system/dummy_instr_test/dummy_instr_test.elf - else - echo "Security features not supported on ${{ config }}, skipping security feature tests" - fi - displayName: Run Verilator co-sim tests for for ${{ config }} diff --git a/ci/run-cosim-test.sh b/ci/run-cosim-test.sh index 83e8b1d2ec..c7a32970a4 100755 --- a/ci/run-cosim-test.sh +++ b/ci/run-cosim-test.sh @@ -4,7 +4,7 @@ # SPDX-License-Identifier: Apache-2.0 # # Run an elf against simple system co-simulation and check the UART output for -# reported pass/fail reporting as appropriate for use in Azure pipelines +# reported pass/fail reporting as appropriate for use in GitHub Actions SKIP_PASS_CHECK=0 diff --git a/ci/vars.yml b/ci/vars.yml deleted file mode 100644 index a91d9e0874..0000000000 --- a/ci/vars.yml +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright lowRISC contributors. -# Licensed under the Apache License, Version 2.0, see LICENSE for details. -# SPDX-License-Identifier: Apache-2.0 - -# Pipeline variables, used by the public and private CI pipelines -# Quote values to ensure they are parsed as string (version numbers might -# end up as float otherwise). -variables: - VERILATOR_VERSION: "v4.210" - IBEX_COSIM_VERSION: "39612f9" - RISCV_TOOLCHAIN_TAR_VERSION: "20220210-1" - RISCV_TOOLCHAIN_TAR_VARIANT: "lowrisc-toolchain-gcc-rv32imcb" - RISCV_COMPLIANCE_GIT_VERSION: "844c6660ef3f0d9b96957991109dfd80cc4938e2" - VERIBLE_VERSION: "v0.0-2135-gb534c1fe" - # lowRISC-internal version numbers of Ibex-specific Spike builds. - SPIKE_IBEX_VERSION: "20220817-git-eccdcb15c3e51b4f7906c7b42fb824f24a4338a2" diff --git a/ci/vars_to_logging_cmd.py b/ci/vars_to_logging_cmd.py deleted file mode 100755 index c719a0cb74..0000000000 --- a/ci/vars_to_logging_cmd.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python3 -# Copyright lowRISC contributors. -# Licensed under the Apache License, Version 2.0, see LICENSE for details. -# SPDX-License-Identifier: Apache-2.0 - -# Read an Azure Pipelines-compatible variables file, and convert it into -# logging commands that Azure Pipelines understands, effectively setting the -# variables at runtime. -# -# This script can be used as a workaround if variables cannot be included in the -# Pipeline definition directly. -# -# See https://docs.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands -# for more information on logging commands. - -import sys -import yaml - -def vars_to_logging_cmd(vars_file): - data = {} - print(vars_file) - with open(vars_file, 'r', encoding="utf-8") as fp: - data = yaml.load(fp, Loader=yaml.SafeLoader) - - if not (isinstance(data, dict) and 'variables' in data): - print("YAML file wasn't a dictionary with a 'variables' key. Got: {}" - .format(data)) - - print("Setting variables from {}".format(vars_file)) - for key, value in data['variables'].items(): - # Note: These lines won't show up in the Azure Pipelines output unless - # "System Diagnostics" are enabled (go to the Azure Pipelines web UI, - # click on "Run pipeline" to manually run a pipeline, and check "Enable - # system diagnostics".) - print("##vso[task.setvariable variable={}]{}".format(key, value)) - - return 0 - -if __name__ == "__main__": - if len(sys.argv) < 2: - print("Usage: {} VARS_FILE".format(sys.argv[0])) - sys.exit(1) - sys.exit(vars_to_logging_cmd(sys.argv[1])) diff --git a/doc/03_reference/verification_stages.rst b/doc/03_reference/verification_stages.rst index 76d36a4cd1..74f4c3e303 100644 --- a/doc/03_reference/verification_stages.rst +++ b/doc/03_reference/verification_stages.rst @@ -84,7 +84,7 @@ V2 Checklist +---------------+-------------------------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Tests | SIM_FW_SIMULATED | N/A | No ROM or firmware present. | +---------------+-------------------------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Regression | SIM_NIGHTLY_REGRESSION_V2 | Complete | Regression run in Azure pipeline only accessible to OpenTitan members. | +| Regression | SIM_NIGHTLY_REGRESSION_V2 | Complete | Regression run in GitHub Actions only accessible to OpenTitan members. | | | | | Publicly viewable reports on the `OpenTitan regression dashboard `_ are planned for V3. | +---------------+-------------------------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Coverage | SIM_CODE_COVERAGE_V2 | Complete | Coverage results available in nightly regression run. |