diff --git a/.github/workflows/test-openocd.yml b/.github/workflows/test-openocd.yml index 70685da5aa9..fa64af13ae8 100644 --- a/.github/workflows/test-openocd.yml +++ b/.github/workflows/test-openocd.yml @@ -44,6 +44,7 @@ jobs: submodules: recursive - name: install SiteSpawner package + shell: bash run: | python3 -m venv .venv .venv/bin/python3 -m pip install tools/SiteSpawner @@ -52,6 +53,7 @@ jobs: python3 -m pip install tools/SiteSpawner - name: Build verilated simulation + shell: bash run: | export PATH=/opt/verilator/bin:/opt/openocd/bin:$PATH export RV_ROOT=$(pwd) @@ -64,6 +66,7 @@ jobs: -f ${RV_ROOT}/testbench/openocd_scripts/jtag_cg.tcl - name: Prepare coverage data + shell: bash run: | export PATH=/opt/verilator/bin:$PATH export RV_ROOT=$(pwd) diff --git a/.github/workflows/test-regression.yml b/.github/workflows/test-regression.yml index 895e18b958f..0264c2d0bd5 100644 --- a/.github/workflows/test-regression.yml +++ b/.github/workflows/test-regression.yml @@ -60,6 +60,7 @@ jobs: submodules: recursive - name: install SiteSpawner package + shell: bash run: | python3 -m venv .venv .venv/bin/python3 -m pip install tools/SiteSpawner @@ -68,6 +69,7 @@ jobs: python3 -m pip install tools/SiteSpawner - name: Setup environment + shell: bash run: | echo "/opt/verilator/bin" >> $GITHUB_PATH RV_ROOT=`pwd` @@ -78,13 +80,16 @@ jobs: echo "TEST_PATH=$TEST_PATH" >> $GITHUB_ENV - name: Run tests + shell: bash run: | export PATH=/opt/verilator/bin:$PATH export RV_ROOT=`pwd` .github/scripts/run_regression_test.sh $TEST_PATH ${{ matrix.bus }} ${{ matrix.test}} ${{ matrix.coverage }} ${{ matrix.priv }} - name: Prepare coverage data + shell: bash run: | + source .venv/bin/activate sis -d convert --dat-dir ${TEST_PATH}/ mkdir -p results mv ${TEST_PATH}/coverage.info \ diff --git a/.github/workflows/test-riscof.yml b/.github/workflows/test-riscof.yml index f27ecc00433..9d262df12a1 100644 --- a/.github/workflows/test-riscof.yml +++ b/.github/workflows/test-riscof.yml @@ -68,6 +68,7 @@ jobs: submodules: recursive - name: install SiteSpawner package + shell: bash run: | python3 -m venv .venv .venv/bin/python3 -m pip install tools/SiteSpawner @@ -80,6 +81,7 @@ jobs: pip3 install git+https://github.com/riscv/riscof@a25e315 - name: Clone tests + shell: bash run: | mkdir -p riscof pushd riscof @@ -90,6 +92,7 @@ jobs: popd - name: Configure RISCOF + shell: bash run: | pushd riscof # Copy RISCOF configuration @@ -101,6 +104,7 @@ jobs: popd - name: Build VeeR model + shell: bash run: | export PATH=/opt/verilator/bin:$PATH export RV_ROOT=`pwd` @@ -114,6 +118,7 @@ jobs: popd - name: Run tests, collect coverage + shell: bash run: | export PATH=/opt/verilator/bin:/opt/spike/bin:$PATH pushd riscof @@ -123,6 +128,7 @@ jobs: popd - name: Prepare coverage data + shell: bash run: | export PATH=/opt/verilator/bin:$PATH sis -d convert --dat-dir riscof/coverage/ @@ -130,8 +136,9 @@ jobs: riscof/coverage/coverage_riscof_${{matrix.priv}}_${{ matrix.coverage }}.info - name: Prepare report + shell: bash run: | - PYTEST_STYLE_SRC_DIR=${{ github.workspace }}/.github/scripts/pytest/ + PYTEST_STYLE_SRC_DIR=$(pwd)/.github/scripts/pytest/ PYTEST_CSS=${PYTEST_STYLE_SRC_DIR}/css/styles.css pushd riscof/riscof_work bash ${PYTEST_STYLE_SRC_DIR}/style_pytest_report.sh ${PYTEST_STYLE_SRC_DIR} . report.html diff --git a/.github/workflows/test-riscv-dv.yml b/.github/workflows/test-riscv-dv.yml index 873332d5e52..50afaee3d2e 100644 --- a/.github/workflows/test-riscv-dv.yml +++ b/.github/workflows/test-riscv-dv.yml @@ -71,6 +71,7 @@ jobs: - name: Generate code (pyflow) if: steps.cache-code.outputs.cache-hit != 'true' && matrix.version == 'pyflow' + shell: bash run: | export RV_ROOT=`realpath .` pushd tools/riscv-dv @@ -141,6 +142,7 @@ jobs: # As of July 9th, 2024 `ubuntu:latest` comes with riscv64-unknown-elf-gcc # 10.0.2. We need a newer version for bitmanip extension support. - name: Install cross-compiler + shell: bash run: | echo "deb http://archive.ubuntu.com/ubuntu/ noble main universe" | sudo tee -a /etc/apt/sources.list > /dev/null sudo apt -qqy update && sudo apt -qqy --no-install-recommends install \ @@ -168,6 +170,7 @@ jobs: submodules: recursive - name: install SiteSpawner package + shell: bash run: | python3 -m venv .venv .venv/bin/python3 -m pip install tools/SiteSpawner @@ -204,6 +207,7 @@ jobs: fail-on-cache-miss: true - name: Run test + shell: bash run: | export PATH=/opt/verilator/bin:$PATH export RV_ROOT=`realpath .` diff --git a/.github/workflows/test-uarch.yml b/.github/workflows/test-uarch.yml index ac8d82b567c..a6844d6036e 100644 --- a/.github/workflows/test-uarch.yml +++ b/.github/workflows/test-uarch.yml @@ -15,6 +15,7 @@ jobs: submodules: recursive - name: Setup environment + shell: bash run: | RV_ROOT=`pwd` echo "RV_ROOT=$RV_ROOT" >> $GITHUB_ENV @@ -24,9 +25,13 @@ jobs: TEST_PATH=$RV_ROOT/verification/block echo "TEST_PATH=$TEST_PATH" >> $GITHUB_ENV - pip3 install nox + python3 -m venv .venv + source .venv/bin/activate + python3 -m pip install nox - name: Lint + shell: bash run: | + source .venv/bin/activate pushd ${TEST_PATH} nox -s test_lint popd @@ -63,15 +68,16 @@ jobs: submodules: recursive - name: install SiteSpawner package + shell: bash run: | python3 -m venv .venv - .venv/bin/python3 -m pip install tools/SiteSpawner source .venv/bin/activate - echo "PATH=$PATH" >> $GITHUB_ENV python3 -m pip install tools/SiteSpawner + python3 -m pip install meson nox - name: Setup Cache Metadata id: cache_metadata + shell: bash run: | date=$(date +"%Y_%m_%d") time=$(date +"%Y%m%d_%H%M%S_%N") @@ -110,6 +116,7 @@ jobs: sudo cpanm Bit::Vector - name: Setup environment + shell: bash run: | echo "/opt/verilator/bin" >> $GITHUB_PATH RV_ROOT=`pwd` @@ -128,17 +135,19 @@ jobs: # Fix random generator seed echo "RANDOM_SEED=1377424946" >> $GITHUB_ENV - pip3 install meson nox - - name: Run ${{ matrix.test }} + shell: bash run: | + source .venv/bin/activate pushd ${TEST_PATH} nox -s ${TEST_NAME}_verify popd - name: Prepare coverage data + shell: bash run: | export PATH=/opt/verilator/bin:$PATH + source .venv/bin/activate sis -d convert --dat-dir ${TEST_PATH}/${TEST_NAME}/ mkdir -p results mv ${TEST_PATH}/${TEST_NAME}/*.info results/ diff --git a/.github/workflows/test-verification.yml b/.github/workflows/test-verification.yml index e90bb6a80c0..e13d95d364b 100644 --- a/.github/workflows/test-verification.yml +++ b/.github/workflows/test-verification.yml @@ -22,15 +22,15 @@ jobs: submodules: recursive - name: install SiteSpawner package + shell: bash run: | python3 -m venv .venv - .venv/bin/python3 -m pip install tools/SiteSpawner source .venv/bin/activate - echo "PATH=$PATH" >> $GITHUB_ENV python3 -m pip install tools/SiteSpawner - name: Setup Cache Metadata id: cache_metadata + shell: bash run: | date=$(date +"%Y_%m_%d") time=$(date +"%Y%m%d_%H%M%S_%N") @@ -69,6 +69,7 @@ jobs: sudo cpanm Bit::Vector - name: Setup environment + shell: bash run: | echo "/opt/verilator/bin" >> $GITHUB_PATH RV_ROOT=`pwd` @@ -78,11 +79,14 @@ jobs: TEST_PATH=$RV_ROOT/verification/top/${{ matrix.test }} echo "TEST_PATH=$TEST_PATH" >> $GITHUB_ENV + - name: Run ${{ matrix.test }} + shell: bash run: | + source .venv/bin/activate pip3 install meson pip3 install -r $RV_ROOT/verification/top/requirements.txt - PYTEST_STYLE_SRC_DIR=${{ github.workspace }}/.github/scripts/pytest/ + PYTEST_STYLE_SRC_DIR=$RV_ROOT/.github/scripts/pytest/ PYTEST_CSS=${PYTEST_STYLE_SRC_DIR}/css/styles.css HTML_FILE=${{ matrix.test }}_${{ matrix.COVERAGE }}.html pushd ${TEST_PATH} @@ -91,18 +95,22 @@ jobs: popd - name: Prepare pytest-html data + shell: bash run: | - pushd ${{ github.workspace }} + source .venv/bin/activate + pushd $RV_ROOT WEBPAGE_DIR=webpage_${{ matrix.test }}_${{ matrix.COVERAGE }} mkdir -p $WEBPAGE_DIR mv ${TEST_PATH}/${{ matrix.test }}_${{ matrix.COVERAGE }}.html $WEBPAGE_DIR mv ${TEST_PATH}/assets $WEBPAGE_DIR - JS_SCRIPT_DIR=${{ github.workspace }}/.github/scripts/pytest/script + JS_SCRIPT_DIR=$RV_ROOT/.github/scripts/pytest/script mv $JS_SCRIPT_DIR $WEBPAGE_DIR popd - name: Prepare coverage data + shell: bash run: | + source .venv/bin/activate export PATH=/opt/verilator/bin:$PATH sis -d convert --dat-dir ${TEST_PATH} mkdir -p results