diff options
Diffstat (limited to 'ci/action.nim')
-rw-r--r-- | ci/action.nim | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ci/action.nim b/ci/action.nim new file mode 100644 index 000000000..ad0f4df0b --- /dev/null +++ b/ci/action.nim @@ -0,0 +1,26 @@ +import std/[strutils, os, osproc, parseutils, strformat] + + +proc main() = + var msg = "" + const cmd = "./koch boot --mm:orc -d:release" + + let (output, exitCode) = execCmdEx(cmd) + + doAssert exitCode == 0, output + + let start = rfind(output, "Hint: mm") + doAssert parseUntil(output, msg, "; proj", start) > 0, output + + let (commitHash, _) = execCmdEx("""git log --format="%H" -n 1""") + + let welcomeMessage = fmt"""Thanks for your hard work on this PR! +The lines below are statistics of the Nim compiler built from {commitHash} + +{msg} +""" + createDir "ci/nimcache" + writeFile "ci/nimcache/results.txt", welcomeMessage + +when isMainModule: + main() |