Skip to content

Commit

Permalink
[ci] add VCS CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Avimitin committed Jul 29, 2024
1 parent 0d06908 commit 7f03a1f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/vcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: echo "out=$(nix run .#ci-helper generateTestPlan)" > $GITHUB_OUTPUT

build-emulators:
name: "Build Emulators"
name: "Build VCS Emulators"
needs: [gen-test-plan]
runs-on: [self-hosted, linux, nixos, BIGRAM]
strategy:
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
nix run ".#ci-helper" -- generateCiMatrix --runnersAmount "$RUNNERS" >> "$GITHUB_OUTPUT"
run-testcases:
name: "Run testcases"
name: "Run VCS"
needs: [gen-matrix]
strategy:
fail-fast: false
Expand All @@ -85,7 +85,7 @@ jobs:
nix run ".#ci-helper" -- runTests --jobs "${{ matrix.jobs }}" --testType "vcs"
report:
name: "Report CI result"
name: "Report VCS CI result"
# Don't run report when:
# - user cancel ( we don't need report at this case )
# - PR from outside repository ( we don't have permission to push commit into fork repository )
Expand Down
17 changes: 5 additions & 12 deletions script/ci/src/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ object Main:
val Array(config, caseName) = testName.split(",")
println("\n")
Logger.info(
s"${BOLD}[${index + 1}/${allJobs.length}]${RESET} Running test case $caseName with config $config"
s"${BOLD}[${index + 1}/${allJobs.length}]${RESET} Running VCS for test case $caseName with config $config"
)

val testAttr = testType.toLowerCase() match
Expand All @@ -170,25 +170,18 @@ object Main:
os.Path(
nixResolvePath(
testAttr,
if testAttr == "vcs" then Seq("--impure") else Seq()
if testType == "vcs" then Seq("--impure") else Seq()
)
)
catch
case _ =>
Logger.error(s"Emulation for config $config, case $caseName fail")
Logger.error(s"VCS emulation for config $config, case $caseName fail")
println("-" * 50)
println(
os.proc(
"nix",
"log",
s".#t1.$config.cases.$caseName.emu-result"
).call()
.out
)
println(os.proc("nix", "log", testAttr).call().out)
println("-" * 50)
Logger.fatal("Got error from emulation, exiting CI")

Logger.info("Checking RTL event with offline difftest")
Logger.info("Checking RTL event from VCS")
val testSuccess =
os.read(testResultPath / "offline-check-status").trim() == "0"
if !testSuccess then
Expand Down

0 comments on commit 7f03a1f

Please sign in to comment.