This site is open for sponsorshipHow it works →
CI cost figures are vendor list prices verified November 2026. Actual cost depends on plan, concurrency, and discount terms. Vendor links are direct, unpaid. How we work.

Updated November 2026 · 8 min read

CI cost in a monorepo: Turborepo vs Nx vs Bazel

Without affected-only logic, every PR in a 10-package monorepo runs CI for every package. That is 10x the CI cost of the same codebase in separate repositories. Monorepo CI cost is quadratic by default and linear with the right tooling.

§ 01

Strategy A: DIY only-changed-packages

The zero-vendor approach using git diff and workflow paths filters. Works well for small monorepos (under 10 packages) where the dependency graph is simple enough to manage manually.

# Detect changed packages with git diff
- id: changes
  uses: dorny/paths-filter@v3
  with:
    filters: |
      api:
        - 'packages/api/**'
      web:
        - 'packages/web/**'

# Run only affected jobs
jobs:
  api-tests:
    if: needs.changes.outputs.api == 'true'
    # ...
  web-tests:
    if: needs.changes.outputs.web == 'true'
    # ...

Limitation: does not handle transitive dependencies. If package A depends on package B and you change B, this approach does not know to re-run A's tests without explicit configuration.

§ 02

Strategy B: Turborepo

Turborepo understands your package dependency graph and runs only the tasks affected by a change, including transitive dependencies. Remote cache stores task outputs: on a cache hit, the task is skipped entirely and the output replayed.

# Run only affected packages since origin/main
- run: npx turbo run build test --filter='...[origin/main]'
  env:
    TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
    TURBO_TEAM: your-org

Pricing: Vercel hosts Turborepo remote cache free for small teams. Self-host on S3/R2 with turborepo-remote-cache package for free. No per-minute charge from Turborepo itself.

Cost impact: every task whose inputs are unchanged is replayed from the remote cache instead of run, so the saving depends on how many packages a typical PR touches.

§ 03

Strategy C: Nx Cloud

Nx provides nx affected commands that scope tasks to changed packages, plus Nx Cloud remote cache and distributed task execution.

Nx Cloud pricing (nx.dev/pricing, read 24 November 2026): Hobby: free, 50,000 credits a month, up to 5 active contributors. Team: from $29 a month, 5 active contributors included then $19 each, 10 concurrent connections included then $2.25 each, and credits at $5.50 per 10,000 ($0.00055 a credit). A usage-based CI Plan (beta) starts at $99 a month. Enterprise: custom pricing.

For large monorepos, Nx Cloud's distributed execution (running individual tasks across multiple agents) cuts wall-clock time separately from the saving of running only affected tasks.

§ 04

Strategy D: Bazel

Bazel is the maximum-correctness option. It builds a precise dependency graph at the file level (not package level), stores all outputs in a content-addressed remote cache, and only rebuilds targets whose inputs have changed.

At scale (100+ engineers, deep C++/Java/Python polyglot codebases), Bazel's precision pays dividends that no other tool matches. Dropbox describes using Bazel's dependency graph to run only the tests each commit affects, and Uber reports halving its Go monorepo build time with a Bazel remote cache. See case studies.

The honest counterpoint: Bazel setup cost is high. Plan 2-6 months of migration for a large existing codebase. Maintenance requires dedicated build-engineering capacity. Below 100 engineers, Turborepo or Nx almost always gives better ROI per engineering hour invested.

§ 05

Side-by-side cost table

StrategyCI minutes/moCI cost/moTooling cost/moTotalSetup effort
No strategy (all packages, every PR)45,000$270$0$270None
DIY paths filter27,000$162$0$1621-2 days
Turborepo + Vercel remote cache18,000$108$0 (free tier)$1082-3 days
Nx Cloud Team14,000$84Team plan (from $29, + $19 per contributor over 5) + credits$84 + Nx plan3-5 days
Bazel + remote cache8,000$48Cache hosting + build-engineer time$48 + your engineer time2-6 months

Illustrative scenario: 25-dev team, 10-package monorepo, 50 PRs/day, GitHub-hosted Linux at $0.006/min. The CI minutes per strategy are our assumptions about how much work each approach skips, not measurements; tooling prices are the vendors' published plans.

Updated 2026-11-24