From e18fc698ed4fba3fc0e33e8116d3739d2161e618 Mon Sep 17 00:00:00 2001 From: Clyybber Date: Sat, 24 Oct 2020 17:02:42 +0200 Subject: [PATCH] Try to fix CI failures (#15701) * Use cligens release version * Rework important_packages main loop * Fix * Fix * Create pkgs dir * Don't use nimble develop since it doesn't work for binary only packages, and always install head * Use git to get the latest release/tag instead * Tackle the root cause * Reduce diff * Cleanup --- testament/categories.nim | 75 ++++++------- testament/important_packages.nim | 175 +++++++++++++++---------------- 2 files changed, 120 insertions(+), 130 deletions(-) diff --git a/testament/categories.nim b/testament/categories.nim index 760c3c5bea..07d35f6fb0 100644 --- a/testament/categories.nim +++ b/testament/categories.nim @@ -452,15 +452,15 @@ type ppOne ppTwo -iterator listPackages(part: PkgPart): tuple[name, url, cmd: string, hasDeps: bool, useHead: bool] = +iterator listPackages(part: PkgPart): tuple[name, cmd, url: string, useHead: bool] = let packageList = parseFile(packageIndex) let importantList = case part of ppOne: important_packages.packages1 of ppTwo: important_packages.packages2 - for n, cmd, hasDeps, url, useHead in importantList.items: + for n, cmd, url, useHead in importantList.items: if url.len != 0: - yield (n, url, cmd, hasDeps, useHead) + yield (n, cmd, url, useHead) else: var found = false for package in packageList.items: @@ -468,7 +468,7 @@ iterator listPackages(part: PkgPart): tuple[name, url, cmd: string, hasDeps: boo if name == n: found = true let pUrl = package["url"].str - yield (name, pUrl, cmd, hasDeps, useHead) + yield (name, cmd, pUrl, useHead) break if not found: raise newException(ValueError, "Cannot find package '$#'." % n) @@ -479,16 +479,6 @@ proc makeSupTest(test, options: string, cat: Category): TTest = result.options = options result.startTime = epochTime() -proc actionRetry(maxRetry: int, backoffDuration: float, action: proc: bool): bool = - ## retry `action` up to `maxRetry` times with exponential backoff and initial - ## duraton of `backoffDuration` seconds - var t = backoffDuration - for i in 0..