Skip to content

Speed up CI - #339

Merged
dblock merged 1 commit into
codegram:masterfrom
dblock:dblock/faster-ci
Nov 22, 2026
Merged

dblock merged 1 commit into
codegram:masterfrom
dblock:dblock/faster-ci

Conversation

@dblock

@dblock dblock commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

🤖 This PR was written by an AI (Claude) acting on behalf of @dblock.

Every test run takes ~55-60s wall time, bound by test (Ruby jruby-head, JSON 3); the other jobs finish in 13-28s. From the logs of recent runs (e.g. 45030186935 and master runs 45030304655, 44949098947):

  • JRuby startup: ~30s in setup-ruby with a cache hit and nothing to install (bundle lock spends ~10s before it fetches metadata, bundle install ~8s), and ~16s for a test step whose tests take 1.4s. All JVM startup. → Set JRUBY_OPTS=--dev (CRuby ignores it).
  • Ruby 3.2 JSON 2 recompiles json every time the generated lockfile changes (any dependency release or version bump), 16-22s. Gemfile.lock isn't committed, so setup-ruby falls back to a prefix restore, and the JSON 2 and JSON 3 jobs on Ruby 3.2 share that prefix, so JSON 2 often gets JSON 3's bundle. → Set cache-version: json-<version> so their caches are separate.
  • Duplicate runs: on: [push, pull_request] builds same-repo branches (e.g. dependabot) twice. → Only build pushes to master, and cancel superseded PR runs with concurrency.
  • actions/checkout@v3 runs on a retired Node runtime (actionlint flags it). → Update to the latest v7.

The cache key change causes a one-time cache miss per job.

Validation

  • actionlint clean on all workflows.
  • CI on this PR is the real check; I'll compare its job timings with the runs above.

🤖 Generated with Claude Code

https://claude.ai/code/session_011Gr21htyJfr8XZGHBcPwkW

@coveralls

coveralls commented Nov 22, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 100.0%. remained the same — dblock:dblock/faster-ci into codegram:master

Run JRuby with --dev, which roughly halves its JVM startup-bound bundle
and test steps, the slowest job in every run. Key the bundler cache by
JSON version so the Ruby 3.2 JSON 2 job no longer restores the JSON 3
bundle and recompiles json. Only build pushes to master and cancel
superseded pull request runs, so same-repo branches aren't built twice.
Update actions/checkout to v7, since v3's Node runtime is retired.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Gr21htyJfr8XZGHBcPwkW
@dblock
dblock merged commit abac8d8 into codegram:master Nov 22, 2026
10 checks passed
@dblock
dblock deleted the dblock/faster-ci branch November 22, 2026 14:28
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