From 3373a16b4fd1823faae51e48ddd9a0aaa8b829e8 Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Tue, 15 Jan 2019 04:48:44 -0800 Subject: [PATCH] [CI] now enables runs NIM_COMPILE_TO_CPP=true without allow_failures --- .travis.yml | 5 +++-- koch.nim | 9 +++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 32a40bcaf0aa5..ea5d54eadc1cd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,8 +14,9 @@ matrix: - os: osx env: NIM_COMPILE_TO_CPP=true - allow_failures: - - env: NIM_COMPILE_TO_CPP=true +# To allow failures for a failing configuration, use something like: +# allow_failures: +# - env: NIM_COMPILE_TO_CPP=true # - os: osx addons: diff --git a/koch.nim b/koch.nim index 8309f23ef4833..f70cf21425a15 100644 --- a/koch.nim +++ b/koch.nim @@ -281,7 +281,8 @@ proc boot(args: string) = let smartNimcache = (if "release" in args: "nimcache/r_" else: "nimcache/d_") & hostOs & "_" & hostCpu - copyExe(findStartNim(), 0.thVersion) + let nimStart = findStartNim() + copyExe(nimStart, 0.thVersion) for i in 0..2: let defaultCommand = if useCpp: "cpp" else: "c" let bootOptions = if args.len == 0 or args.startsWith("-"): defaultCommand else: "" @@ -292,7 +293,11 @@ proc boot(args: string) = # Note(D20190115T162028:here): the configs are skipped for bootstrap # (1st iteration) to prevent newer flags from breaking bootstrap phase. # fixes #10030. - extraOption.add " -d:nimBoostrapCsources0_19_0" + let ret = execCmdEx(nimStart & " --version") + doAssert ret.exitCode == 0 + let version = ret.output.splitLines[0] + if version.startsWith "Nim Compiler Version 0.19.0": + extraOption.add " -d:nimBoostrapCsources0_19_0" # remove this when csources get updated exec i.thVersion & " $# $# $# --nimcache:$# compiler" / "nim.nim" % [bootOptions, extraOption, args, smartNimcache]