diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d77b56932f..95ab8694ada 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,8 +7,19 @@ name: ci on: [push, pull_request] jobs: - riscv-tests: - name: riscv-tests + build-riscv-tests: + name: build-riscv-tests + runs-on: ubuntu-latest + env: + RISCV: /riscv + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Prepare + run: ci/setup.sh + execute-riscv-tests: + name: execute-riscv-tests runs-on: ubuntu-latest strategy: matrix: @@ -16,11 +27,11 @@ jobs: target: [cv64a6_imafdc_sv39, cv64a6_imafdc_sv39_wb] env: RISCV: /riscv + needs: + build-riscv-tests steps: - uses: actions/checkout@v2 with: submodules: recursive - - name: Prepare - run: ci/setup.sh - - name: run tests + - name: Run Tests run: make run-${{ matrix.testcase}}-verilator target=${{ matrix.target }} diff --git a/Makefile b/Makefile index f464d0b54df..2e562a76eff 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,8 @@ VCOM ?= vcom$(questa_version) VLIB ?= vlib$(questa_version) VMAP ?= vmap$(questa_version) # verilator version -verilator ?= $(PWD)/tmp/verilator-v5.008/verilator/bin/verilator +VERILATOR_INSTALL_DIR ?= $(PWD)/tmp/verilator-v5.008/verilator/ +verilator ?= $(VERILATOR_INSTALL_DIR)/bin/verilator # traget option target-options ?= # additional defines diff --git a/ci/setup.sh b/ci/setup.sh index 47b1a528740..53e50a368e9 100755 --- a/ci/setup.sh +++ b/ci/setup.sh @@ -1,6 +1,7 @@ #!/bin/bash set -e -ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd) +export ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd) +export ROOT_PROJECT=$ROOT export PATH=$RISCV/bin:/bin:$PATH export LIBRARY_PATH=$RISCV/lib @@ -15,13 +16,15 @@ sudo apt install device-tree-compiler ci/make-tmp.sh -ci/install-verilator.sh - sudo mkdir -p $RISCV && sudo chmod 777 $RISCV RISCV64_UNKNOWN_ELF_GCC=riscv64-unknown-elf-gcc-8.3.0-2020.04.0-x86_64-linux-ubuntu14.tar.gz if [ ! -f "$RISCV64_UNKNOWN_ELF_GCC" ]; then wget https://static.dev.sifive.com/dev-tools/$RISCV64_UNKNOWN_ELF_GCC fi tar -x -f $RISCV64_UNKNOWN_ELF_GCC --strip-components=1 -C $RISCV -ci/install-fesvr.sh + +sudo apt install libfl-dev help2man + +export NUM_JOBS=4 +source verif/regress/install-cva6.sh ci/build-riscv-tests.sh