Skip to content

Commit 629882e

Browse files
perf(ci): parallelize monorepo build via mise DAG dependencies (#203)
* perf(ci): parallelize monorepo build via mise DAG dependencies Restructures task execution from sequential to parallel: Root mise.toml: changes build from sequential `run = [...]` to parallel `depends = [agent, cdk, cli, docs]`. All packages now build concurrently. cdk/mise.toml: adds `depends = [":compile"]` to test and synth:quiet so they wait for TypeScript compilation, while eslint runs immediately. Removes compile from build's depends (it's now pulled in transitively). DAG execution order: t=0: agent:quality + cdk:compile + cdk:eslint + cli:build + docs:build t=35: cdk:test + cdk:synth (after compile finishes) t=185: all done Critical path: cdk:compile (35s) → cdk:synth (150s) = ~3min vs. previous serial: ~12min Also removes redundant //docs:sync (already a dependency of //docs:build). Refs #201 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ci: test ubuntu-latest-4-cores runner with timing instrumentation Probes whether larger runners are available to the org. If the job queues and runs, mise parallelism should actually benefit from 4 real cores vs 2. If it fails, we know larger runners aren't enabled. Adds nproc/RAM logging and SECONDS timing to measure the difference. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * ci: re-trigger after label removal --------- Co-authored-by: bgagent <345885+scottschreckengaust@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 2e0c534 commit 629882e

3 files changed

Lines changed: 22 additions & 13 deletions

File tree

.github/workflows/build.yml

Lines changed: 14 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cdk/mise.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ run = "yarn eslint"
1717

1818
[tasks.test]
1919
description = "Jest tests"
20+
depends = [":compile"]
2021
run = "yarn test"
2122

2223
[tasks.synth]
@@ -25,6 +26,7 @@ run = "yarn synth"
2526

2627
[tasks."synth:quiet"]
2728
description = "cdk synth (quiet)"
29+
depends = [":compile"]
2830
run = "yarn synth:quiet"
2931

3032
[tasks.deploy]
@@ -54,5 +56,5 @@ description = "No-op bundle step for cdk/cdk.json (NodejsFunction bundles at syn
5456
run = "node -e \"process.exit(0)\""
5557

5658
[tasks.build]
57-
description = "compile, test, eslint, synth (quiet)"
58-
depends = [":compile", ":test", ":eslint", ":synth:quiet"]
59+
description = "compile, test, eslint, synth (quiet) — DAG: compile first, then test+synth+eslint in parallel"
60+
depends = [":test", ":eslint", ":synth:quiet"]

mise.toml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -151,16 +151,11 @@ run = [
151151
##### BUILD #####
152152
##################
153153

154-
# Agent code is packaged by CDK (Docker asset); validate Python before heavy JS/CDK work.
155-
# Multiple `depends` run in parallel, so agent is a sole prerequisite, then packages run in order.
154+
# All packages run in parallel via DAG. Each resolves its own internal dependencies.
155+
# Agent quality runs alongside CDK/CLI/docs — no sequential bottleneck.
156156
[tasks.build]
157-
description = "Monorepo build (agent quality, then cdk, cli, docs)"
158-
depends = ["//agent:quality"]
159-
run = [
160-
"MISE_EXPERIMENTAL=1 mise //cdk:build",
161-
"MISE_EXPERIMENTAL=1 mise //cli:build",
162-
"MISE_EXPERIMENTAL=1 mise //docs:build",
163-
]
157+
description = "Monorepo build (agent, cdk, cli, docs in parallel)"
158+
depends = ["//agent:quality", "//cdk:build", "//cli:build", "//docs:build"]
164159

165160
[tasks.default]
166161
description = "Install + build"

0 commit comments

Comments
 (0)