From c74c681dba2d51da3951933b1a3cb90221403e13 Mon Sep 17 00:00:00 2001 From: Wojciech Sipak Date: Thu, 10 Oct 2024 16:42:25 +0200 Subject: [PATCH] use venv --- .github/workflows/test-uarch.yml | 13 +++++++++---- .github/workflows/test-verification.yml | 5 +++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-uarch.yml b/.github/workflows/test-uarch.yml index 518aff704d5..c8955f4fd28 100644 --- a/.github/workflows/test-uarch.yml +++ b/.github/workflows/test-uarch.yml @@ -25,10 +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 @@ -68,9 +71,7 @@ jobs: 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 @@ -133,11 +134,14 @@ jobs: # Fix random generator seed echo "RANDOM_SEED=1377424946" >> $GITHUB_ENV - pip3 install meson nox + python3 -m venv .venv + source .venv/bin/activate + python3 -m pip install meson nox - name: Run ${{ matrix.test }} shell: bash run: | + source .venv/bin/activate pushd ${TEST_PATH} nox -s ${TEST_NAME}_verify popd @@ -146,6 +150,7 @@ jobs: 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 81415590ab9..91cdbcc9aed 100644 --- a/.github/workflows/test-verification.yml +++ b/.github/workflows/test-verification.yml @@ -25,9 +25,7 @@ jobs: 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 @@ -84,6 +82,7 @@ jobs: - 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/ @@ -97,6 +96,7 @@ jobs: - name: Prepare pytest-html data shell: bash run: | + source .venv/bin/activate pushd ${{ github.workspace }} WEBPAGE_DIR=webpage_${{ matrix.test }}_${{ matrix.COVERAGE }} mkdir -p $WEBPAGE_DIR @@ -109,6 +109,7 @@ jobs: - 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