mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-03 18:34:43 +00:00
Improve Travis CI folding (#10473)
This commit is contained in:
committed by
Andreas Rumpf
parent
cf323104fc
commit
aa0a9dd78c
@@ -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:
|
||||
|
||||
8
koch.nim
8
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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user