# Membl Pipelines

Membl Pipelines give engineering teams and AI coding agents fast, predictable CI on GitHub. Point existing `.github/workflows/*.yml` jobs at `membl-x64` or `membl-arm`, or write native declarative workflows under `.membl/workflows/*.yml` to get self-sizing Liquid Runners, instant shared caches on membl runners, structured test analytics, and itemized per-job cost receipts.

<Cards>
  <Card title="1-Click Setup" href="/docs/one-click-setup">
    Connect your GitHub repository and open a best-practice draft PR in 60 seconds.
  </Card>

  <Card title="Workflow Schema" href="/docs/workflow-schema">
    Reference guide for 

    `.membl/workflows/*.yml`

     syntax and primitives.
  </Card>

  <Card title="AI Agents & MCP" href="/docs/agents">
    Configure Claude Code, Codex, Cursor, and Antigravity with @membl/mcp v0.3.0.
  </Card>

  <Card title="vCPU-Minute Plans & Trial" href="/pricing">
    Starter ($25/mo, 7,500 vCPU-min), Team ($75/mo, 22,500 vCPU-min), Business ($225/mo, 67,500 vCPU-min), and 7-day trial.
  </Card>
</Cards>

## Four core pillars

Membl Pipelines are built around four practical guarantees:

### 1. Telemetry-sized Liquid Runners

Workloads run on isolated Linux x64 Liquid Runners built to survive heavy builds without wasting vCPU-minutes:

* **Live RSS right-sizing**: Instead of forcing every workflow into a static box, Liquid Runners track peak RSS memory, CPU saturation, and step timing across runs and match each sandbox to the job (`Speed`, `Balanced`, or `Cost` target).
* **8 GB RAM headroom**: Liquid Runner profiles provision 8 GB of RAM so dense TypeScript, Rust, and monorepo builds finish cleanly without Exit Code 137 out-of-memory kills.
* **vCPU-minute plans + per-second metering**: Plans include monthly vCPU-minute pools (7,500 on Starter, 22,500 on Team, 67,500 on Business), with $0 queue and boot time and per-second metering past your pool ($0.002/vCPU-min, 15-second minimum per job). Estimate compute charges in the [pricing calculator](/calculator) or review [head-to-head CI runner comparisons](/vs).

### 2. Smarter workflow steps

Membl removes common CI bottlenecks:

* **Declarative DAG execution**: Independent jobs run in parallel by default. Downstream stages declare explicit upstream dependencies using `needs`.
* **Tool-native cache presets**: Declare `cache: [pnpm, next]`, `cache: [cargo, sccache]`, `cache: [uv]`, or `cache: [go]` directly on job steps. On Membl runners, shared read-only caches mount in place, skipping multi-GB archive downloads and decompression stalls.
* **Parallel sharding & JUnit reports**: Distribute test suites across parallel workers (`shard: { count: 4, strategy: "index" }`), collect structured results via `reports: { junit: ["test-results/**/*.xml"] }`, and track flaky or slowest specs in the project Tests view (with optional change-scoped test selection via `.membl/tests.yml`).
* **Zero-waste concurrency**: Automatically cancel superseded pull request runs when newer commits are pushed (`concurrency: { policy: "cancel-superseded-pr" }`), preventing wasted compute on stale code.

### 3. Health, deployments, and per-job cost receipts

Get full visibility into pipeline execution, release state, and compute spend:

* **Itemized job receipts**: Every job records runner size, queue time, boot duration, active execution seconds, and exact dollar cost.
* **Gate jobs (`type: gate`)**: Aggregate multiple parallel check jobs into a single stable status check context for branch protection rules without consuming runner compute.
* **Run controls, schedules & deployments**: Cancel or re-run failed/all jobs directly from the dashboard, manage scheduled runs, inspect organization insights, and track GitHub Deployments per environment.

### 4. Security and ephemeral isolation

Security guarantees built into every run:

* **Ephemeral sandboxes**: Every job executes in a fresh, isolated Linux sandbox destroyed immediately after job completion.
* **Isolated cache layers**: Shared caches mount read-only on Membl runners. Writes stay scoped to repository-specific layers, preventing cross-tenant inspection or tampering.
* **Least-privilege permissions & secrets**: Top-level `permissions: {}` empty defaults ensure jobs only receive access explicitly granted, third-party actions are pinned to immutable 40-character commit SHAs, and workspace secrets are managed centrally under **Settings -> Secrets** (with 1Password import support).
* **Zero retention & secret safety**: Source code is never retained after runs exit, and customer code is never used to train AI models.

## Drop-in GitHub Actions vs. native pipelines

Membl supports both zero-edit drop-in ephemeral execution for existing `.github/workflows/*.yml` files (`runs-on: membl-x64` for Linux x64 or `runs-on: membl-arm` for Linux Arm64) and declarative `.membl/workflows/*.yml` pipelines with zero vendor lock-in.

### Option A: Drop-in workflow (Default 1-click blueprint)

By default, Membl generates hardened `.github/workflows/ci.yml` workflows updating `runs-on` to `membl-x64` (or `membl-arm` for Arm64). All existing actions, triggers, matrices, and GitHub secrets remain identical:

```yaml
name: CI

on:
  push:
    branches: [main]
  pull_request:

permissions: {}

concurrency:
  group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

jobs:
  lint:
    name: Lint
    permissions:
      contents: read
    runs-on: membl-x64
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
        with:
          persist-credentials: false
      - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
        with:
          node-version: "22"
      - run: pnpm install --frozen-lockfile
      - run: pnpm lint

  test:
    name: Test
    permissions:
      contents: read
    runs-on: membl-x64
    timeout-minutes: 15
    steps:
      - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
        with:
          persist-credentials: false
      - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
        with:
          node-version: "22"
      - run: pnpm install --frozen-lockfile
      - run: pnpm test

  ci:
    name: CI / ci
    needs: [lint, test]
    if: always()
    permissions:
      contents: read
    runs-on: membl-x64
    timeout-minutes: 5
    steps:
      - name: Require check jobs
        run: |
          set -euo pipefail
          if [ "${{ needs.lint.result }}" != "success" ] || [ "${{ needs.test.result }}" != "success" ]; then
            echo "::error::Required checks failed."
            exit 1
          fi
```

### Option B: Native Membl Pipeline (1-click toggle)

You can toggle 1-click blueprints to generate native `.membl/workflows/ci.yml` files. Native pipelines leverage Membl's declarative v1 schema, native cache presets, auto-sized compute, and zero-overhead gate jobs:

```yaml
version: 1
name: CI

on:
  push:
    branches: [main]
  pull_request:

concurrency:
  policy: cancel-superseded-pr

defaults:
  compute:
    intent: balanced
    size: auto

jobs:
  lint:
    name: Lint & Typecheck
    cache: [pnpm]
    steps:
      - uses: checkout
      - run: pnpm lint
      - run: pnpm typecheck

  test:
    name: Unit & Integration Tests
    cache: [pnpm]
    shard:
      count: 2
      strategy: index
    reports:
      junit: ["test-results/**/*.xml"]
    steps:
      - uses: checkout
      - run: pnpm test -- --reporter=junit --outputFile=test-results/results.xml

  ci:
    name: CI / ci
    type: gate
    needs: [lint, test]
```

