-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add buildkite pipeline (#1012)
- Loading branch information
Showing
3 changed files
with
61 additions
and
2 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
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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
withSystem, | ||
lib, | ||
self, | ||
... | ||
}: let | ||
inherit (lib) mapAttrsToList filterAttrs hasPrefix filter elem; | ||
defaultSkip = [ | ||
"container-" | ||
"container-processes" | ||
"container-shell" | ||
"devenv-up" | ||
]; | ||
matrix = withSystem "x86_64-linux" ( | ||
ctx @ {pkgs, ...}: let | ||
skip = | ||
(mapAttrsToList (name: _: name) (filterAttrs (name: _: hasPrefix "images/" name) pkgs)) | ||
++ defaultSkip; | ||
in | ||
filter (item: !(elem item skip)) (mapAttrsToList (name: _: name) ctx.config.packages) | ||
); | ||
in { | ||
flake = { | ||
buildkite-pipeline = { | ||
env = { | ||
CACHE_NAME = "insane"; | ||
NIX_CONFIG = "accept-flake-config = true"; | ||
}; | ||
steps = [ | ||
{ | ||
group = ":broom: Linting and syntax checks"; | ||
key = "checks"; | ||
steps = [ | ||
{ | ||
label = ":nix: Lint"; | ||
command = "nix run .#world -- lint"; | ||
} | ||
{ | ||
label = ":nix: Check"; | ||
command = "nix run .#world -- check"; | ||
} | ||
]; | ||
} | ||
{ | ||
group = ":hammer_and_pick: Building packages"; | ||
key = "packages"; | ||
steps = [ | ||
{ | ||
label = ":nix: {{matrix}} build"; | ||
command = "nix build .#packages.x86_64-linux.{{matrix}} -L"; | ||
inherit matrix; | ||
} | ||
]; | ||
} | ||
]; | ||
}; | ||
}; | ||
} |
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