-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-write GitHub action to improve reliability
Re-write the GitHub action to work more like Hydra * Packages are evaluated and then built in topological order * Each build failure is added as a separate cache entry. Makes it work even if the action times out, and makes it easier to retry individual packages. * Dependency failures are reported accurately
- Loading branch information
1 parent
89a4655
commit a94ed52
Showing
11 changed files
with
68,382 additions
and
22,199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,6 @@ Thumbs.db | |
# Ignore built ts files | ||
__tests__/runner/* | ||
lib/**/* | ||
|
||
# Output directory | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89,182 changes: 67,220 additions & 21,962 deletions
89,182
.github/actions/nix-ros-build-action/dist/index.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,22 @@ | ||
{ lib, pkgs }: let | ||
validDrv = (n: v: (builtins.tryEval v).success); | ||
listDrvs = prefix: | ||
in lib.attrNames (lib.filterAttrs validDrv pkgs) | ||
# Evaluate `release.nix' like Hydra would. Too bad nix-instantiate can't to do this. | ||
{ lib ? pkgs.lib, pkgs }: | ||
|
||
let | ||
trace = if builtins.getEnv "VERBOSE" == "1" then builtins.trace else (x: y: y); | ||
|
||
# Add the ‘recurseForDerivations’ attribute to ensure that | ||
# nix-instantiate recurses into nested attribute sets. | ||
recurse = path: attrs: | ||
if (builtins.tryEval attrs).success then | ||
if lib.isDerivation attrs | ||
then | ||
if (builtins.tryEval attrs.drvPath).success | ||
then { inherit (attrs) name drvPath; } | ||
else { failed = true; } | ||
else if lib.isAttrs attrs && (attrs.recurseForDerivations or false) then | ||
{ recurseForDerivations = true; } // | ||
lib.mapAttrs (n: v: let path' = path ++ [n]; in trace path' (recurse path' v)) attrs | ||
else { } | ||
else { }; | ||
|
||
in recurse [] pkgs |
Oops, something went wrong.