Skip to content

ci: run CI on the Foundation's runner pools on forge, three times faster - #1141

Merged
cjorge-thegraph merged 5 commits into
mainfrom
ci/forge-runners
Nov 30, 2026
Merged

cjorge-thegraph merged 5 commits into
mainfrom
ci/forge-runners

Conversation

@cjorge-thegraph

@cjorge-thegraph cjorge-thegraph commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Moves docs' CI from GitHub-hosted runners to the Foundation's runner pools on forge and makes the image build about three times faster. A pull request's CI now takes about 170 s; it took a median of 516 s before.

Where each job runs

docs is public, so it uses the public pools (gf-public-<vCPUs>, a fresh VM per job). graphprotocol/graph-infra#1149 added docs to the gf-public runner group, and the change is applied.

Workflow Job Before Now
Pull Request CI/CD lint, format, typecheck ubuntu-latest gf-public-4
Pull Request CI/CD build (image + runtime-env check) ubuntu-latest, after the checks gf-public-8, alongside the checks
Image build (pushes graph-docs:<commit>, latest on main) ubuntu-latest gf-public-8
Release checks, release ubuntu-latest gf-public-4
Production CI/CD build ubuntu-latest gf-public-8
Production CI/CD deploy ubuntu-latest stays hosted: it holds the production GCP key, and forge's public pools never get Google credentials
OpenGraph Service deploy ubuntu-latest stays hosted: a production deploy holding Cloudflare's token
Website Integrity website-check ubuntu-latest gf-public-8 (it has never run: its pages/** filter matches no path)

Image names, tags, the release job and the runtime-env check are unchanged. Main's image builds still run one at a time and are never cancelled.

Why it is faster

  • The image build no longer traces server files (outputFileTracing: false in website/next.config.js).
    • next build traced every page's server files for a Node.js server, which a static export never runs.
    • Next's build trace showed the tracing taking most of the build. While it ran, it stalled the page export beside it: 300 renames that normally take milliseconds took about 1 s each.
    • pnpm build inside the image went from 347 s to 113 s.
    • The exported site is the same without it: two local builds of main in node:22-alpine, compared file by file with the build ID normalised, gave 3,095 files, none different.
  • The build no longer waits for the checks, and no longer runs a pnpm install it never used (the Dockerfile installs its own).
  • pnpm and Node.js are set up without a global npm install.
    • pnpm/action-setup installs the pnpm that packageManager names, setup-node caches its store, and one pnpm install --frozen-lockfile follows.
    • This replaces the-guild-org/shared-config/setup, which runs npm i -g corepack first and fails on forge's runners, where Node.js is root-owned.
  • Pool sizes come from measurements.
    • The build is mostly serial: about 83 s of webpack compile, then the export.
    • It took 156 s on gf-public-16 and 159 s on gf-public-8, so it uses gf-public-8, which has more runners.
    • The checks take 45–50 s on gf-public-4.
    • A job waits about 10 s for its runner.

Before and after

Before (GitHub-hosted) After (forge)
Pull request run, wall time 395–670 s, median 516 s (11 runs, 2026-11-23 to 11-30) 169 s (run), 170 s (run)
Pull request build job 393–610 s (e.g.) 156 s on gf-public-16, 159 s on gf-public-8
Runner move alone (tracing still on) 406 s run, 380 s Docker build (run)
Image build job 372 s and 632 s (run, two attempts) 172 s, branch dispatch that pushed only graph-docs:5d602b6a… (run)
Production build job 382–626 s (v2.1.9–v2.1.13) same build as Image; first measured on the next tag

Caching

  • forge gives each job a fresh VM, so nothing persists on the runner between jobs.
  • The pnpm store is cached through GitHub's cache, as before.
  • No Docker layer cache is added. The Dockerfile copies the whole repository before installing, so only about 2 s of layers are reusable. pnpm install takes about 10 s on forge, which a downloaded layer cache would not beat by much.
  • Next's webpack cache (the remaining 83 s) is not kept: the build script deletes .next before every build.

Not yet run on forge

  • release.yml, ci-cd-production.yml and website-integrity.yml start only from a tag or a pages/** change.
  • Their steps are ones already proven above: checks, build-push-action with a push, and buildx (imagetools uses the same buildx).
  • Their first runs will show their times.

🤖 Generated with Claude Code

cjorge-graphops and others added 5 commits November 30, 2026 18:47
The checks and the release run on gf-public-4; the image builds (pull
request, main, production) and the website integrity build run on
gf-public-16. A pull request's image build no longer waits for the checks
and no longer installs dependencies it does not use (the Dockerfile
installs its own). The production deploy and the OpenGraph deploy stay
on GitHub-hosted runners: they hold GCP and Cloudflare credentials.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
the-guild-org/shared-config/setup runs `npm i -g corepack` before
setting up Node.js, which needs a writable global prefix: forge's runners
keep their Node.js root-owned, so it fails there. pnpm/action-setup
installs the pnpm that packageManager names, setup-node caches its store,
and one frozen install follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
next build traces every page's server files for a Node.js server, which a
static export never runs. On CI the trace took about 200 of the build's
350 seconds and stalled the page export running beside it; the exported
site is the same file for file without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The build is mostly serial (webpack's compile, then the export): on
gf-public-16 it takes as long as on gf-public-8, which has more runners.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cjorge-thegraph cjorge-thegraph changed the title ci: run CI on the Foundation's runner pools on forge ci: run CI on the Foundation's runner pools on forge, three times faster Nov 30, 2026
@cjorge-thegraph
cjorge-thegraph marked this pull request as ready for review November 30, 2026 19:24
@cjorge-thegraph
cjorge-thegraph merged commit ce5295a into main Nov 30, 2026
5 checks passed
@cjorge-thegraph
cjorge-thegraph deleted the ci/forge-runners branch November 30, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants