diff options
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | koch.nim | 8 | ||||
-rw-r--r-- | tools/kochdocs.nim | 9 |
3 files changed, 13 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml index 293ad6bb2..0e55d3aff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,7 +45,9 @@ before_script: - set +e # prevents breaking after_failure script: + - echo "travis_fold:start:nim_c_koch" - nim c koch + - echo "travis_fold:end:nim_c_koch" - ./koch runCI before_deploy: diff --git a/koch.nim b/koch.nim index d21c5240e..89ee28d5a 100644 --- a/koch.nim +++ b/koch.nim @@ -163,7 +163,7 @@ proc bundleNimsuggest() = nimCompile("nimsuggest/nimsuggest.nim", options = "-d:release") proc buildVccTool() = - nimCompile("tools/vccexe/vccexe.nim") + nimCompileFold("Compile Vcc", "tools/vccexe/vccexe.nim") proc bundleWinTools() = # TODO: consider building under `bin` instead of `.` @@ -208,10 +208,10 @@ proc buildTool(toolname, args: string) = proc buildTools() = bundleNimsuggest() - nimCompile("tools/nimgrep.nim", options = "-d:release") + nimCompileFold("Compile nimgrep", "tools/nimgrep.nim", options = "-d:release") when defined(windows): buildVccTool() - nimCompile("nimpretty/nimpretty.nim", options = "-d:release") - nimCompile("tools/nimfind.nim", options = "-d:release") + nimCompileFold("Compile nimpretty", "nimpretty/nimpretty.nim", options = "-d:release") + nimCompileFold("Compile nimfind", "tools/nimfind.nim", options = "-d:release") proc nsis(latest: bool; args: string) = bundleNimbleExe(latest) diff --git a/tools/kochdocs.nim b/tools/kochdocs.nim index 7919deec6..c0e7ce66b 100644 --- a/tools/kochdocs.nim +++ b/tools/kochdocs.nim @@ -42,10 +42,10 @@ proc execFold*(desc, cmd: string, errorcode: int = QuitFailure, additionalPath = ## Execute shell command. Add log folding on Travis CI. # https://github.com/travis-ci/travis-ci/issues/2285#issuecomment-42724719 if existsEnv("TRAVIS"): - echo "travis_fold:start:" & desc.replace(" ", "") + echo "travis_fold:start:" & desc.replace(" ", "_") exec(cmd, errorcode, additionalPath) if existsEnv("TRAVIS"): - echo "travis_fold:end:" & desc.replace(" ", "") + echo "travis_fold:end:" & desc.replace(" ", "_") proc execCleanPath*(cmd: string, additionalPath = ""; errorcode: int = QuitFailure) = @@ -69,6 +69,11 @@ proc nimCompile*(input: string, outputDir = "bin", mode = "c", options = "") = let cmd = findNim() & " " & mode & " -o:" & output & " " & options & " " & input exec cmd +proc nimCompileFold*(desc, input: string, outputDir = "bin", mode = "c", options = "") = + let output = outputDir / input.splitFile.name.exe + let cmd = findNim() & " " & mode & " -o:" & output & " " & options & " " & input + execFold(desc, cmd) + const pdf = """ doc/manual.rst |