diff options
author | genotrance <dev@genotrance.com> | 2019-02-02 06:26:32 -0600 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-02-02 13:26:32 +0100 |
commit | 07553034de5bd9ffa89df303bf789664f9cb8ed8 (patch) | |
tree | e66ae0948594fedeef4894e912c31a051ed234aa | |
parent | ad4e3fd28c03a8429a3b4bc0068af77018e81724 (diff) | |
download | Nim-07553034de5bd9ffa89df303bf789664f9cb8ed8.tar.gz |
Enable Travis folding in winrelease (#10528)
-rw-r--r-- | koch.nim | 16 | ||||
-rw-r--r-- | tools/kochdocs.nim | 15 |
2 files changed, 20 insertions, 11 deletions
diff --git a/koch.nim b/koch.nim index 89ee28d5a..6b799449e 100644 --- a/koch.nim +++ b/koch.nim @@ -373,9 +373,10 @@ proc winReleaseArch(arch: string) = withMingw r"..\mingw" & arch & r"\bin": # Rebuilding koch is necessary because it uses its pointer size to # determine which mingw link to put in the NSIS installer. - nimexec "c --cpu:$# koch" % cpu - kochExec "boot -d:release --cpu:$#" % cpu - kochExec "--latest zip -d:release" + inFold "winrelease koch": + nimexec "c --cpu:$# koch" % cpu + kochExecFold("winrelease boot", "boot -d:release --cpu:$#" % cpu) + kochExecFold("winrelease zip", "--latest zip -d:release") overwriteFile r"build\nim-$#.zip" % VersionAsString, r"web\upload\download\nim-$#_x$#.zip" % [VersionAsString, arch] @@ -384,13 +385,16 @@ proc winRelease*() = # anymore! # Build -docs file: when true: - buildDocs(gaCode) + inFold "winrelease buildDocs": + buildDocs(gaCode) withDir "web/upload/" & VersionAsString: - exec "7z a -tzip docs-$#.zip *.html" % VersionAsString + inFold "winrelease zipdocs": + exec "7z a -tzip docs-$#.zip *.html" % VersionAsString overwriteFile "web/upload/$1/docs-$1.zip" % VersionAsString, "web/upload/download/docs-$1.zip" % VersionAsString when true: - csource("-d:release") + inFold "winrelease csource": + csource("-d:release") when sizeof(pointer) == 4: winReleaseArch "32" when sizeof(pointer) == 8: diff --git a/tools/kochdocs.nim b/tools/kochdocs.nim index c0e7ce66b..e13ad3501 100644 --- a/tools/kochdocs.nim +++ b/tools/kochdocs.nim @@ -25,7 +25,6 @@ proc findNim*(): string = # assume there is a symlink to the exe or something: return nim - proc exec*(cmd: string, errorcode: int = QuitFailure, additionalPath = "") = let prevPath = getEnv("PATH") if additionalPath.len > 0: @@ -38,15 +37,21 @@ proc exec*(cmd: string, errorcode: int = QuitFailure, additionalPath = "") = if execShellCmd(cmd) != 0: quit("FAILURE", errorcode) putEnv("PATH", prevPath) -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 +template inFold*(desc, body) = if existsEnv("TRAVIS"): echo "travis_fold:start:" & desc.replace(" ", "_") - exec(cmd, errorcode, additionalPath) + + body + if existsEnv("TRAVIS"): echo "travis_fold:end:" & desc.replace(" ", "_") +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 + inFold(desc): + exec(cmd, errorcode, additionalPath) + proc execCleanPath*(cmd: string, additionalPath = ""; errorcode: int = QuitFailure) = # simulate a poor man's virtual environment |