Skip to content

Commit

Permalink
stdize cicero actions and tullia tasks
Browse files Browse the repository at this point in the history
run bitte-tests without cloning the git repo
  • Loading branch information
dermetfan committed Aug 8, 2022
1 parent 1216329 commit 8c6ca04
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 44 deletions.
14 changes: 10 additions & 4 deletions flake.nix
Expand Up @@ -91,9 +91,19 @@

# loops - reconcile a target state
(inputs.std.functions "loops")

# ----------
# Cicero actions and Tullia tasks
# ----------
(inputs.tullia.tasks "pipelines")
(inputs.std.functions "actions")
];
}
# soil -- TODO: remove soil
(tullia.fromStd {
tasks = inputs.std.harvest inputs.self ["automation" "pipelines"];
actions = inputs.std.harvest inputs.self ["cloud" "actions"];
})
(let
overlays = [
fenix.overlay
Expand Down Expand Up @@ -157,10 +167,6 @@
bitte = unstablePackages.callPackage ./cli/package.nix {inherit toolchain;};
default = bitte;
};
}
// tullia.fromSimple system {
tasks = import tullia/tasks.nix self;
actions = import tullia/actions.nix;
})
// {
inherit lib;
Expand Down
40 changes: 40 additions & 0 deletions nix/automation/pipelines.nix
@@ -0,0 +1,40 @@
{
cell,
inputs,
}: let
common = {
config,
lib,
...
}: {
preset = {
nix.enable = true;
github-ci = __mapAttrs (_: lib.mkDefault) {
enable = config.action.facts != {};
repo = "input-output-hk/bitte";
sha = config.preset.github-ci.lib.getRevision "GitHub event" "HEAD";
clone = false;
};
};
};
in {
build = {
config,
lib,
...
}: {
imports = [common];

command.text = let
flakeUrl = lib.escapeShellArg (
with config.preset.github-ci;
if enable
then "github:${repo}/${sha}"
else "."
);
in "nix flake check ${flakeUrl} --allow-import-from-derivation";

memory = 1024 * 12;
nomad.resources.cpu = 10000;
};
}
3 changes: 3 additions & 0 deletions tullia/actions.nix → nix/cloud/actions.nix
@@ -1,4 +1,7 @@
{
cell,
inputs,
}: {
"bitte/ci-push" = {
task = "build";
io = ''
Expand Down
40 changes: 0 additions & 40 deletions tullia/tasks.nix

This file was deleted.

0 comments on commit 8c6ca04

Please sign in to comment.