mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-10 04:36:40 +00:00
Thread a single `variant` selector (CSV) end-to-end so CI can split a
role's matrix deploy across runners.
- variant_select.py (SPOT, shared by init + deploy): one --variant taking
a CSV (2 pins one round, 0,1,2 is a runner bundle, empty = full matrix);
replaces the old separate --variant/--variants.
- planner.filter_plan_to_variants filters the plan to a round subset.
- CI discovery (utils/github/variant_bundles.py) splits roles with more
than INFINITO_VARIANT_BUNDLE_SIZE (default 3) variants into bundles of
consecutive indices, one matrix runner each (5 -> 0,1,2 + 3,4), threaded
via the variant env. test-deploy-{local,universal,workstation,server}.yml
switch to matrix.include with a comma-free variant_slug for artifact/job
names (GitHub expressions have no replace()).
- runtime_budget honours INFINITO_VARIANT_TIME_OVERFLOW (cut|fail) when a
runner cannot finish its slice within INFINITO_MAX_RUNTIME.
Unit tests + docs (variants.md, deploy.md) included.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
20 lines
759 B
Bash
Executable File
20 lines
759 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Resolve the app list and write it to GITHUB_OUTPUT.
|
|
# Inputs via env (forwarded to scripts/meta/resolve/apps.sh):
|
|
# INFINITO_DEPLOY_TYPE — required (server|workstation|universal)
|
|
# INFINITO_WHITELIST — optional space-separated allowlist
|
|
set -euo pipefail
|
|
|
|
apps="$(./scripts/meta/resolve/apps.sh)"
|
|
[[ -n "$apps" ]] || apps='[]'
|
|
|
|
# Expand the flat app-id list into deploy-matrix entries, splitting any role
|
|
# with more variants than INFINITO_VARIANT_BUNDLE_SIZE (default 3) into bundles
|
|
# of consecutive variant indices — one runner per bundle.
|
|
matrix="$(printf '%s' "$apps" | "${PYTHON:-python3}" -m utils.github.variant_bundles)"
|
|
[[ -n "$matrix" ]] || matrix='[]'
|
|
|
|
echo "apps=$matrix" >>"$GITHUB_OUTPUT"
|
|
echo "apps=$matrix"
|