# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0

parameters:
  rvc_test_suites: []

jobs:
  - job: riscv_compliance_tests_${{ join('_', parameters.rvc_test_suites) }}
    displayName: Execute RISC-V compliance tests for ${{ join(' ', parameters.rvc_test_suites) }}
    pool:
      vmImage: ubuntu-16.04
    dependsOn:
      - top_earlgrey_verilator
      - sw_build
    steps:
    - template: install-package-dependencies.yml
    - template: download-artifacts-template.yml
    - bash: |
        set -x
        sudo util/get-toolchain.py \
          --target-dir="${TOOLCHAIN_PATH}" \
          --release-version="${TOOLCHAIN_VERSION}" \
          --update
      displayName: Install toolchain
    - ${{ each test_suite in parameters.rvc_test_suites }}:
      - bash: |
          set -e
          . util/build_consts.sh
          export TARGET_SIM="$BIN_DIR/hw/top_earlgrey/Vtop_earlgrey_verilator"
          export RISCV_DEVICE=rv32imc
          export RISCV_TARGET=opentitan
          export OT_BIN="$BIN_DIR"
          export OT_TARGET=verilator
          export OT_TOOLS="$TOOLCHAIN_PATH/bin"
          cd sw/vendor/riscv_compliance
          make RISCV_ISA=${{ test_suite }}
        displayName: Execute ${{ test_suite }}

# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0

parameters:
  rvc_test_suites: []

jobs:
  - job: riscv_compliance_tests_${{ join('_', parameters.rvc_test_suites) }}
    displayName: Execute RISC-V compliance tests for ${{ join(' ', parameters.rvc_test_suites) }}
    pool:
      vmImage: ubuntu-16.04
    dependsOn:
      - top_earlgrey_verilator
      - sw_build
    steps:
    - template: install-package-dependencies.yml
    - template: download-artifacts-template.yml
    - bash: |
        set -x
        sudo util/get-toolchain.py \
          --target-dir="${TOOLCHAIN_PATH}" \
          --release-version="${TOOLCHAIN_VERSION}" \
          --update
      displayName: Install toolchain
    - ${{ each test_suite in parameters.rvc_test_suites }}:
      - bash: |
          set -e
          . util/build_consts.sh
          export TARGET_SIM="$BIN_DIR/hw/top_earlgrey/Vtop_earlgrey_verilator"
          export RISCV_DEVICE=rv32imc
          export RISCV_TARGET=opentitan
          export OT_BIN="$BIN_DIR"
          export OT_TARGET=sim_verilator
          export OT_TOOLS="$TOOLCHAIN_PATH/bin"
          cd sw/vendor/riscv_compliance
          make RISCV_ISA=${{ test_suite }} VERBOSE=1
        displayName: Execute ${{ test_suite }}

Update CI setup to run RISC-V Compliance
[ci] Update CI setup to run RISC-V Compliance

Only a variable changed.

Signed-off-by: Philipp Wagner <5a4b10454c30419e54a1570be358a516ff84bb63@lowrisc.org>
