Skip to content

Commit

Permalink
remove cicero actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dermetfan committed Jun 22, 2023
1 parent d41df65 commit e7f27d7
Showing 1 changed file with 2 additions and 71 deletions.
73 changes: 2 additions & 71 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
CHaP.url = "github:input-output-hk/cardano-haskell-packages?ref=repo";
CHaP.flake = false;

# cicero
tullia.url = "github:input-output-hk/tullia";

# non-flake nix compatibility
flake-compat.url = "github:edolstra/flake-compat";
flake-compat.flake = false;
Expand Down Expand Up @@ -85,12 +82,7 @@
# and from nixpkgs or other inputs
shell.nativeBuildInputs = with nixpkgs;
[
]
++ (with inputs.tullia.packages.${system}; [
# for testing tullia ci locally
tullia
nix-systems
]);
];
# disable Hoogle until someone request it
shell.withHoogle = false;
# Skip cross compilers for the shell
Expand Down Expand Up @@ -122,68 +114,7 @@
inherit compiler-nix-name;
});
}
)
# add cicero logic.
// (let
actionCiInputName = "GitHub event";
in
inputs.tullia.fromSimple system {
tasks = {
ci = {
config,
lib,
...
}: {
preset = {
nix.enable = true;
github.ci = {
# Tullia tasks can run locally or on Cicero.
# When no facts are present we know that we are running locally and vice versa.
# When running locally, the current directory is already bind-mounted into the container,
# so we don't need to fetch the source from GitHub and we don't want to report a GitHub status.
enable = config.actionRun.facts != {};
repository = "input-output-hk/cardano-api";
remote = config.preset.github.lib.readRepository actionCiInputName null;
revision = config.preset.github.lib.readRevision actionCiInputName null;
};
};

command.text = ''
# filter out systems that we cannot build for:
systems=$(nix eval .#packages --apply builtins.attrNames --json |
nix-systems -i |
jq -r 'with_entries(select(.value)) | keys | .[]')
targets=$(for s in $systems; do echo .#hydraJobs."$s".required; done)
# shellcheck disable=SC2086
nix build --keep-going $targets || nix build --keep-going -L $targets
'';

memory = 1024 * 8;
nomad.driver = "exec";
nomad.resources.cpu = 10000;
};
};

actions = {
"cardano-api/ci" = {
task = "ci";
io = ''
// This is a CUE expression that defines what events trigger a new run of this action.
// There is no documentation for this yet. Ask SRE if you have trouble changing this.
let github = {
#input: "${actionCiInputName}"
#repo: "input-output-hk/cardano-api"
}
#lib.merge
#ios: [
{#lib.io.github_push, github, #default_branch: true},
{#lib.io.github_pr, github},
]
'';
};
};
});
);
in
nixpkgs.lib.recursiveUpdate flake rec {
# add a required job, that's basically all hydraJobs.
Expand Down

0 comments on commit e7f27d7

Please sign in to comment.