Improve Travis CI folding (#10473)

This commit is contained in:
Federico Ceratto 2019-01-28 16:33:35 +00:00 • committed by Andreas Rumpf
commit aa0a9dd78c
3 changed files with 13 additions and 6 deletions

View file

@ -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