ci: sync the shared CI tasks
Make cargoToolchain optional in nix/ci-tasks.nix, so repositories without Rust use the same file, and add a copy-build-output task that copies a build result into the checkout as writable files. The shared files in ci/ and nix/ci-tasks.nix stay identical across repositories. Claude-Session: https://claude.ai/code/session_01D8dLLgYd8cfR2aQfA5eZXa
This commit is contained in:
2 files changed
+29
-10
No files matched your search
+15
-10
@@ -1,14 +1,16 @@
|
||||
{
|
||||
pkgs,
|
||||
mkApp,
|
||||
cargoToolchain,
|
||||
preCommitInputs,
|
||||
cargoToolchain ? null,
|
||||
preCommitInputs ? [ ],
|
||||
extraReleaseInputs ? [ ],
|
||||
releaseWrapperArgs ? [ ],
|
||||
}:
|
||||
let
|
||||
inherit (pkgs) lib;
|
||||
|
||||
cargoInputs = lib.optional (cargoToolchain != null) cargoToolchain;
|
||||
|
||||
nuScriptTool =
|
||||
{
|
||||
script,
|
||||
@@ -49,12 +51,13 @@ let
|
||||
mkApp (nuScriptTool {
|
||||
inherit name;
|
||||
script = ../ci/release-tasks.nu;
|
||||
runtimeInputs = [
|
||||
cargoToolchain
|
||||
pkgs.release-plz
|
||||
pkgs.gitMinimal
|
||||
]
|
||||
++ extraReleaseInputs;
|
||||
runtimeInputs =
|
||||
cargoInputs
|
||||
++ [
|
||||
pkgs.release-plz
|
||||
pkgs.gitMinimal
|
||||
]
|
||||
++ extraReleaseInputs;
|
||||
wrapperArgs = releaseWrapperArgs;
|
||||
});
|
||||
|
||||
@@ -96,8 +99,7 @@ releaseTaskApps
|
||||
open-dependency-update-pr = mkApp (nuScriptTool {
|
||||
name = "open-dependency-update-pr";
|
||||
script = ../ci/dependency-updates.nu;
|
||||
runtimeInputs = [
|
||||
cargoToolchain
|
||||
runtimeInputs = cargoInputs ++ [
|
||||
pkgs.gitMinimal
|
||||
pkgs.tea
|
||||
];
|
||||
@@ -108,6 +110,9 @@ releaseTaskApps
|
||||
import-exported-paths = mkApp (nixBuiltPathsTool {
|
||||
name = "import-exported-paths";
|
||||
});
|
||||
copy-build-output = mkApp (nixBuiltPathsTool {
|
||||
name = "copy-build-output";
|
||||
});
|
||||
upload-exported-paths = mkApp (nixBuiltPathsTool {
|
||||
name = "upload-exported-paths";
|
||||
runtimeInputs = [ pkgs.cachix ];
|
||||
|
||||
Reference in new issue
Block a user