diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index e007b8241f..fb7111585f 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -218,17 +218,17 @@ jobs: else echo "No cycle change detect" fi - - uses: geekyeggo/delete-artifact@v4 + - uses: geekyeggo/delete-artifact@v5 with: # test-reports has been used, it can be deleted name: test-reports-* clean-after-cancelled: - name: "Clean test reports [CANCELLED]" + name: "Clean test reports [ON CANCELLED]" if: ${{ cancelled() }} runs-on: [self-hosted, linux, nixos] needs: [run-testcases] steps: - - uses: geekyeggo/delete-artifact@v4 + - uses: geekyeggo/delete-artifact@v5 with: name: test-reports-* diff --git a/nix/t1/mlirbc.nix b/nix/t1/mlirbc.nix index b617df2283..ede896bf0b 100644 --- a/nix/t1/mlirbc.nix +++ b/nix/t1/mlirbc.nix @@ -12,7 +12,7 @@ }: assert lib.assertMsg - (lib.elem target [ "ip" "ipemu" "subsystem" ]) + (lib.elem target [ "ip" "ipemu" "subsystem" "subsystememu" ]) "Unknown elaborate target ${target}"; let diff --git a/nix/t1/rtl.nix b/nix/t1/rtl.nix index 2534d90107..3581c46bf3 100644 --- a/nix/t1/rtl.nix +++ b/nix/t1/rtl.nix @@ -13,7 +13,7 @@ let "--lowering-options=verifLabels,omitVersionComment" "--strip-debug-info" ]; - fixupFilelist = lib.elem mlirbc.elaborateTarget [ "ipemu" ]; + fixupFilelist = lib.elem mlirbc.elaborateTarget [ "ipemu" "subsystememu" ]; in stdenvNoCC.mkDerivation { name = "t1-${mlirbc.elaborateConfig}-${mlirbc.elaborateTarget}-rtl"; diff --git a/script/default.nix b/script/default.nix index 9aa9da3581..389d968f4e 100644 --- a/script/default.nix +++ b/script/default.nix @@ -5,6 +5,7 @@ , metals , mill +, graalvm-ce }: let @@ -48,6 +49,7 @@ let nativeBuildInputs = [ mill + graalvm-ce makeWrapper passthru.millDeps.setupHook diff --git a/script/src/Main.scala b/script/src/Main.scala index 1daf89e07a..49b1820c45 100644 --- a/script/src/Main.scala +++ b/script/src/Main.scala @@ -248,6 +248,8 @@ object Main: s"Can't use $dumpCycle as ratio, use 0 as waveform dump start point" ) 0 + else if ratio == 0.0 then + 0 else val cycleRecordFilePath = os.pwd / ".github" / "cases" / config / "default.json" @@ -340,69 +342,9 @@ object Main: Logger.info(s"Emulator log save to ${emulatorLogPath}") if (trace.value) then - Logger.info(s"Trace file save to ${outputPath} / trace.fst") + Logger.info(s"Trace file save to ${outputPath}/wave.fst") end ipemu - @main def subsystememu( - @arg( - name = "case", - short = 'c', - doc = "name alias for loading test case" - ) testCase: String, - @arg( - name = "config", - short = 'c', - doc = "configuration name" - ) config: String, - @arg( - name = "trace", - short = 't', - doc = "use emulator with trace support" - ) trace: Flag, - @arg( - name = "trace-file", - doc = "Output path of the trace file" - ) traceFile: Option[String], - @arg( - doc = "Force using x86_64 as cross compiling host platform" - ) forceX86: Boolean = false, - @arg( - name = "out-dir", - doc = "path to save wave file and perf result file" - ) outDir: Option[String], - @arg( - name = "base-out-dir", - doc = "save result files in {base_out_dir}/{config}/{case}/{run_config}" - ) baseOutDir: Option[String], - @arg( - name = "emulator-path", - doc = "path to emulator" - ) emulatorPath: Option[String] - ): Unit = - val caseElfPath = resolveTestElfPath(config, testCase, forceX86) - val outputPath = - prepareOutputDir(outDir, baseOutDir, config, "subsystem", testCase) - val emulator = if (!emulatorPath.isEmpty) then - val emuPath = os.Path(emulatorPath.get, os.pwd) - if (!os.exists(emuPath)) then - sys.error(s"No emulator found at path: ${emulatorPath.get}") - emuPath - else resolveEmulatorPath(config, "subsystem", trace.value) - - val emuArgs = - Seq(s"+init_file=${caseElfPath}") ++ optionals( - trace.value, - Seq(s"+trace_file=${ - if (traceFile.isDefined) then os.Path(traceFile.get, os.pwd) - else outputPath / "trace.fst" - }") - ) - os.proc(emuArgs).call() - - if (trace.value) then - Logger.info(s"Trace file save to ${outputPath} / trace.fst") - end subsystememu - @main def listConfig(): Unit = os.proc( Seq(