From 98550715c875361d5775f94025d5deb7551c0bb7 Mon Sep 17 00:00:00 2001 From: unlsycn Date: Wed, 6 Nov 2024 08:35:51 +0000 Subject: [PATCH] [ci] add --impure flag to verilator CI Signed-off-by: unlsycn --- .github/workflows/verilator.yml | 6 +++--- script/ci/src/Main.scala | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/verilator.yml b/.github/workflows/verilator.yml index 19089533c..fdfc4e44e 100644 --- a/.github/workflows/verilator.yml +++ b/.github/workflows/verilator.yml @@ -33,11 +33,11 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} - name: "Build verilator emulator" run: | - nix build '.#t1.${{ matrix.config }}.${{ env.EMU_TOP }}.verilator-emu' -L --no-link --cores 64 + nix build '.#t1.${{ matrix.config }}.${{ env.EMU_TOP }}.verilator-emu' --impure -L --no-link --cores 64 - name: "Build all testcases" run: | # Build testcases with vlen 1024 and vlen 4096 - nix build ".#t1.${{ matrix.config }}.${{ env.EMU_TOP }}.cases._all" --max-jobs auto -L --no-link --cores 64 + nix build ".#t1.${{ matrix.config }}.${{ env.EMU_TOP }}.cases._all" --impure --max-jobs auto -L --no-link --cores 64 # In the future, we may choose Verdi for trace, and left verilator trace only for performance evaluation build-verilator-trace-emulators: @@ -52,7 +52,7 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} - name: "Build verilator emulator with trace" - run: nix build '.#t1.${{ matrix.config }}.${{ env.EMU_TOP }}.verilator-emu-trace' -L --no-link --cores 64 + run: nix build '.#t1.${{ matrix.config }}.${{ env.EMU_TOP }}.verilator-emu-trace' --impure -L --no-link --cores 64 gen-matrix: name: "Prepare for running testcases" diff --git a/script/ci/src/Main.scala b/script/ci/src/Main.scala index 6e1047022..5eb3f58f0 100644 --- a/script/ci/src/Main.scala +++ b/script/ci/src/Main.scala @@ -172,7 +172,7 @@ object Main: os.Path( nixResolvePath( testAttr, - if emuLib == "vcs" then Seq("--impure") else Seq() + Seq("--impure") ) ) catch @@ -180,7 +180,7 @@ object Main: Logger.error( s"Online driver for config $config, case $caseName fail, please check manually on local machine" ) - Logger.error(s"nix build $testAttr" ++ (if emuLib == "vcs" then " --impure" else "")) + Logger.error(s"nix build $testAttr --impure") Logger.fatal("Online Drive run fail, exiting CI") Logger.info("Checking RTL event from event log") @@ -249,8 +249,7 @@ object Main: val emuResultPath = os.Path( nixResolvePath( s".#t1.$config.${top}.run._${emuLib}EmuResult", - if emuLib.toLowerCase() == "vcs" then Seq("--impure") - else Seq() + Seq("--impure") ) )