mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-27 06:10:53 +01:00
Separated evaluators
This commit is contained in:
parent
7124a752b5
commit
60f69c99fb
2 changed files with 15 additions and 7 deletions
|
@ -290,6 +290,7 @@ def nix_update_flake_config(
|
|||
|
||||
def nix_eval_config(
|
||||
worker_names: list[str],
|
||||
repo: str,
|
||||
github_token_secret: str,
|
||||
) -> util.BuilderConfig:
|
||||
"""
|
||||
|
@ -336,10 +337,10 @@ def nix_eval_config(
|
|||
)
|
||||
|
||||
return util.BuilderConfig(
|
||||
name="nix-eval",
|
||||
name=f"nix-eval-{repo}",
|
||||
workernames=worker_names,
|
||||
factory=factory,
|
||||
properties=dict(virtual_builder_name="nix-eval"),
|
||||
properties=dict(virtual_builder_name=f"nix-eval-{repo}"),
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ def build_config() -> dict[str, Any]:
|
|||
filter_fn=lambda c: c.branch
|
||||
== c.properties.getProperty("github.repository.default_branch"),
|
||||
),
|
||||
builderNames=["nix-eval"],
|
||||
builderNames=["nix-eval-nix-config"],
|
||||
),
|
||||
schedulers.SingleBranchScheduler(
|
||||
name="main-linkal",
|
||||
|
@ -61,7 +61,7 @@ def build_config() -> dict[str, Any]:
|
|||
filter_fn=lambda c: c.branch
|
||||
== c.properties.getProperty("github.repository.default_branch"),
|
||||
),
|
||||
builderNames=["nix-eval"],
|
||||
builderNames=["nix-eval-linkal"],
|
||||
),
|
||||
|
||||
# build all pull requests
|
||||
|
@ -70,7 +70,7 @@ def build_config() -> dict[str, Any]:
|
|||
change_filter=util.ChangeFilter(
|
||||
repository=f"https://github.com/{ORG}/{REPO}", category="pull"
|
||||
),
|
||||
builderNames=["nix-eval"],
|
||||
builderNames=["nix-eval-nix-config"],
|
||||
),
|
||||
|
||||
schedulers.SingleBranchScheduler(
|
||||
|
@ -78,7 +78,7 @@ def build_config() -> dict[str, Any]:
|
|||
change_filter=util.ChangeFilter(
|
||||
repository=f"https://github.com/JulienMalka/Linkal", category="pull"
|
||||
),
|
||||
builderNames=["nix-eval"],
|
||||
builderNames=["nix-eval-linkal"],
|
||||
),
|
||||
|
||||
# this is triggered from `nix-eval`
|
||||
|
@ -87,7 +87,7 @@ def build_config() -> dict[str, Any]:
|
|||
builderNames=["nix-build"],
|
||||
),
|
||||
# allow to manually trigger a nix-build
|
||||
schedulers.ForceScheduler(name="force", builderNames=["nix-eval"]),
|
||||
schedulers.ForceScheduler(name="force", builderNames=["nix-eval-nix-config"]),
|
||||
# allow to manually update flakes
|
||||
schedulers.ForceScheduler(
|
||||
name="update-flake-nix-config",
|
||||
|
@ -147,8 +147,15 @@ def build_config() -> dict[str, Any]:
|
|||
# This should prevent exessive memory usage.
|
||||
nix_eval_config(
|
||||
[worker_names[0]],
|
||||
"nix-config",
|
||||
github_token_secret="github-token",
|
||||
),
|
||||
nix_eval_config(
|
||||
[worker_names[0]],
|
||||
"linkal",
|
||||
github_token_secret="github-token",
|
||||
),
|
||||
|
||||
nix_build_config(worker_names),
|
||||
nix_update_flake_config(
|
||||
worker_names,
|
||||
|
|
Loading…
Add table
Reference in a new issue