Skip to content

ci: parallel per-target builds — 12 jobs, ~5min wall clock instead of ~20min#254

Merged
anandgupta42 merged 3 commits intomainfrom
ci/parallel-builds
Mar 18, 2026
Merged

ci: parallel per-target builds — 12 jobs, ~5min wall clock instead of ~20min#254
anandgupta42 merged 3 commits intomainfrom
ci/parallel-builds

Conversation

@anandgupta42
Copy link
Contributor

Splits CI build matrix from 3 sequential OS jobs to 12 parallel per-target jobs. Each builds ONE binary (~5min). All run concurrently. Expected: ~36min → ~10-15min release.

anandgupta42 and others added 2 commits March 18, 2026 01:10
GitHub Actions runners have Docker pre-installed, so isDockerAvailable()
returns true. But the TypeScript CI job has no test databases running,
causing 3 tests to hang for 60-90s then fail.

Fix: require DRIVER_E2E_DOCKER=1 env var to run Docker-based tests.
The driver-e2e CI job sets TEST_*_HOST vars (CI services), which still
work. Local dev can set DRIVER_E2E_DOCKER=1 to test with Docker.

This eliminates 3 of the 14 CI failures on main.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Before: 3 build jobs (linux/darwin/win32), each building 3-6 targets
sequentially. Darwin took ~20min (3 × 7min per binary).

After: 12 build jobs, one per target, all running in parallel.
Each builds ONE binary in ~5min. Total build time = ~5min (wall clock).

Changes:
- build.ts: add --target-index=N flag to build single target by index
- release.yml: matrix of 12 individual targets instead of 3 OS groups
- Build runs parallel with test (no needs: test)
- Lower artifact compression (level 1 — binaries don't compress much)
- Tighter timeouts (15min per build instead of 60min)

Expected: release time from ~36min to ~10-15min.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude
Copy link

claude bot commented Mar 18, 2026

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review.

# Conflicts:
#	.github/workflows/release.yml
@anandgupta42 anandgupta42 merged commit a53cffe into main Mar 18, 2026
5 of 6 checks passed
publish-npm:
name: Publish to npm
needs: [test, build]
needs: build
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The publish-npm job no longer waits for the test job to complete, allowing a potentially broken package to be published if tests fail.
Severity: HIGH

Suggested Fix

Restore the dependency on the test job for the publish-npm job. In .github/workflows/release.yml, change needs: build back to needs: [test, build].

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: .github/workflows/release.yml#L111

Potential issue: The `publish-npm` job in the `release.yml` workflow has its dependency
on the `test` job removed, now only depending on `build`. This contradicts a comment
stating that publishing waits for both jobs. Since the `test` job runs "release-critical
tests", this change introduces a risk where a failing test suite would not prevent a
broken package from being published to npm. This could lead to distributing a
non-functional or buggy version to users.

Did we get this right? 👍 / 👎 to inform future reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant