From 0a2dc0c21ef1175a643405d1c2ced4f2af60d9c8 Mon Sep 17 00:00:00 2001 From: Ganesh Viswanathan Date: Fri, 19 Jun 2020 13:32:01 -0500 Subject: Retries, conan VS MD/14 --- nimterop/build.nim | 8 ++++---- nimterop/conan.nim | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/nimterop/build.nim b/nimterop/build.nim index b391f7a..edbe439 100644 --- a/nimterop/build.nim +++ b/nimterop/build.nim @@ -129,7 +129,7 @@ proc execAction*(cmd: string, retry = 0, die = true, cache = false, # On failure, retry or die as requested if result.ret != 0: if retry > 0: - sleep(500) + sleep(1000) result = execAction(cmd, retry = retry - 1, die, cache, cacheKey) elif die: doAssert false, "Command failed: " & $result.ret & "\ncmd: " & ccmd & @@ -368,7 +368,7 @@ proc downloadUrl*(url, outdir: string, quiet = false) = cmd = "powershell [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; wget $# -OutFile $#" else: doAssert false, "No download tool available - curl, wget" - discard execAction(cmd % [url.quoteShell, (outdir/file).sanitizePath], retry = 1) + discard execAction(cmd % [url.quoteShell, (outdir/file).sanitizePath], retry = 3) if ext == ".zip": extractZip(file, outdir, quiet) @@ -436,12 +436,12 @@ proc gitPull*(url: string, outdir = "", plist = "", checkout = "", quiet = false if checkout.len != 0: if not quiet: echo "# Checking out " & checkout - discard execAction(&"cd {outdirQ} && git fetch", retry = 1) + discard execAction(&"cd {outdirQ} && git fetch", retry = 3) discard execAction(&"cd {outdirQ} && git checkout {checkout}") else: if not quiet: echo "# Pulling repository" - discard execAction(&"cd {outdirQ} && git pull --depth=1 origin master", retry = 1) + discard execAction(&"cd {outdirQ} && git pull --depth=1 origin master", retry = 3) proc gitTags*(outdir: string): seq[string] = ## Get all the git tags in the specified directory diff --git a/nimterop/conan.nim b/nimterop/conan.nim index 41648a3..3430752 100644 --- a/nimterop/conan.nim +++ b/nimterop/conan.nim @@ -208,6 +208,10 @@ proc getConanBuilds*(pkg: ConanPackage, filter = "") = query &= &"&{filter}" if "compiler=" notin filter and os != "windows": query &= &"&compiler={compiler}&compiler.version=" & vfilter + if "compiler.runtime=" notin filter and os == "windows": + query &= &"&compiler.runtime=MD" + if "compiler.version=" notin filter and os == "windows": + query &= &"&compiler.version=14" query.replace("&", "%20and%20") else: "" -- cgit v1.2.3