mirror of
https://github.com/daylinmorgan/oizys.git
synced 2025-02-23 03:45:50 -06:00
fix report results
This commit is contained in:
parent
f8d6e4db97
commit
bdd67bd00b
2 changed files with 7 additions and 8 deletions
|
@ -344,10 +344,10 @@ func outputsPaths(drv: NixDerivation): seq[string] =
|
||||||
for _, output in drv.outputs:
|
for _, output in drv.outputs:
|
||||||
result.add output.path
|
result.add output.path
|
||||||
|
|
||||||
proc reportResults(results: seq[(NixDerivation, BuildResult)]) =
|
proc reportResults(results: seq[(string, NixDerivation, BuildResult)]) =
|
||||||
let rows = collect(
|
let rows = collect(
|
||||||
for (drv, res) in results:
|
for (path, drv, res) in results:
|
||||||
let (name, hash) = splitDrv(drv.name)
|
let (name, hash) = splitDrv(path)
|
||||||
fmt"| {name} | `{hash}` | " & (
|
fmt"| {name} | `{hash}` | " & (
|
||||||
if res.successful: ":white_check_mark:"
|
if res.successful: ":white_check_mark:"
|
||||||
else: ":x:"
|
else: ":x:"
|
||||||
|
@ -393,16 +393,15 @@ proc nixBuildWithCache*(name: string, rest: seq[string], service: string, jobs:
|
||||||
let results =
|
let results =
|
||||||
collect:
|
collect:
|
||||||
for path, drv in drvs:
|
for path, drv in drvs:
|
||||||
(drv, build(path, drv, rest))
|
(path, drv, build(path, drv, rest))
|
||||||
|
|
||||||
var outs: seq[string]
|
var outs: seq[string]
|
||||||
for (drv, res) in results:
|
for (path, drv, res) in results:
|
||||||
if res.successful:
|
if res.successful:
|
||||||
outs &= drv.outputsPaths
|
outs &= drv.outputsPaths
|
||||||
|
|
||||||
# TODO: fix refactor above interfaces to make this more seemless
|
if isCi():
|
||||||
# if isCi():
|
reportResults(results)
|
||||||
# reportResults(results)
|
|
||||||
|
|
||||||
if outs.len > 0:
|
if outs.len > 0:
|
||||||
# TODO: push after build not at once?
|
# TODO: push after build not at once?
|
||||||
|
|
Loading…
Add table
Reference in a new issue