@@ -25,7 +25,6 @@ export void ci(string[] args)
2525 auto shardMatrix = generateShardMatrix();
2626 foreach (shard; shardMatrix.include)
2727 {
28- writeln(" Shard " , shard.prefix ~ " " , shard.postfix ~ " " , shard.digit);
2928 params.flakePre = shard.prefix;
3029 params.flakePost = shard.postfix;
3130
@@ -57,25 +56,20 @@ export void ci(string[] args)
5756
5857 foreach (pkg; matrix)
5958 {
60- if (pkg.isCached)
61- {
62- writeln(" Package " , pkg.name, " is cached" );
63- }
64- else
65- {
66- writeln(" Package " , pkg.name, " is not cached; building..." );
67- ProcessPipes res = execute! ProcessPipes([" nix" , " build" , " --json" , " .#" ~ pkg.attrPath]);
59+ if (pkg.isCached) continue ;
6860
69- foreach (line; res.stderr.byLine)
70- {
71- " \r " .write;
72- line.write;
73- }
74- " " .writeln;
75- auto json = parseJSON(res.stdout.byLine.join(" \n " ).to! string );
76- auto path = json.array[0 ][" outputs" ][" out" ].str;
77- execute([" cachix" , " push" , params.cachixCache, path], false , true ).writeln;
61+ writeln(" Package " , pkg.name, " is not cached; building..." );
62+ ProcessPipes res = execute! ProcessPipes([" nix" , " build" , " --json" , " .#" ~ pkg.attrPath]);
63+
64+ foreach (line; res.stderr.byLine)
65+ {
66+ " \r " .write;
67+ line.write;
7868 }
69+ " " .writeln;
70+ auto json = parseJSON(res.stdout.byLine.join(" \n " ).to! string );
71+ auto path = json.array[0 ][" outputs" ][" out" ].str;
72+ execute([" cachix" , " push" , params.cachixCache, path], false , true ).writeln;
7973 }
8074
8175 }
0 commit comments