This repository was archived by the owner on Dec 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
560 additions
and
2 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
inputs = { | ||
nixpkgs.follows = "tullia/nixpkgs"; | ||
std.follows = "tullia/std"; | ||
tullia.url = github:input-output-hk/tullia; | ||
}; | ||
|
||
outputs = { | ||
self, | ||
std, | ||
tullia, | ||
... | ||
} @ inputs: | ||
std.growOn { | ||
inherit inputs; | ||
cellsFrom = nix/cells; | ||
cellBlocks = [ | ||
(std.functions "library") | ||
(std.functions "hydraJobs") | ||
(tullia.tasks "pipelines") | ||
(std.functions "actions") | ||
]; | ||
} | ||
( | ||
tullia.fromStd { | ||
actions = std.harvest self ["cloud" "actions"]; | ||
tasks = std.harvest self ["automation" "pipelines"]; | ||
} | ||
) | ||
{ | ||
hydraJobs = std.harvest self ["automation" "hydraJobs"]; | ||
}; | ||
|
||
nixConfig = { | ||
extra-substituters = ["https://cache.iog.io"]; | ||
extra-trusted-public-keys = ["hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="]; | ||
allow-import-from-derivation = true; | ||
}; | ||
} |
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,9 @@ | ||
{ | ||
cell, | ||
inputs, | ||
}: | ||
|
||
import "${inputs.self}/release.nix" { | ||
smash = inputs.self; | ||
supportedSystems = [inputs.nixpkgs.system]; | ||
} |
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,29 @@ | ||
{ | ||
inputs, | ||
cell, | ||
}: { | ||
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/smash"; | ||
revision = config.preset.github.lib.readRevision inputs.cells.cloud.library.actionCiInputName null; | ||
}; | ||
}; | ||
|
||
command.text = config.preset.github.status.lib.reportBulk { | ||
bulk.text = "nix eval .#hydraJobs --apply __attrNames --json | nix-systems -i"; | ||
each.text = ''nix build -L .#hydraJobs."$1".required''; | ||
skippedDescription = lib.escapeShellArg "No nix builder available for this system"; | ||
}; | ||
|
||
memory = 1024 * 8; | ||
nomad.resources.cpu = 10000; | ||
}; | ||
} |
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,23 @@ | ||
{ | ||
cell, | ||
inputs, | ||
}: { | ||
"smash/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: "${cell.library.actionCiInputName}" | ||
#repo: "input-output-hk/smash" | ||
} | ||
#lib.merge | ||
#ios: [ | ||
#lib.io.github_push & github, | ||
{ #lib.io.github_pr, github, #target_default: false }, | ||
] | ||
''; | ||
}; | ||
} |
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,6 @@ | ||
{ | ||
inputs, | ||
cell, | ||
}: { | ||
actionCiInputName = "GitHub event"; | ||
} |
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