Skip to content

ci: compile source-built Rubies with flags that make them run faster - #3245

Draft
solnic wants to merge 1 commit into
masterfrom
ci/optimize-source-built-rubies
Draft

solnic wants to merge 1 commit into
masterfrom
ci/optimize-source-built-rubies

Conversation

@solnic

@solnic solnic commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Ruby 2.7, 3.0 and 3.1 have no precompiled build, so CI compiles them from source. .mise.ci.toml set RUBY_CFLAGS to an empty string on x86, which replaced Ruby's default -O3. Those Rubies were built with CFLAGS=" -fPIC", effectively -O0, and ran a CPU benchmark about 6.5x slower than the precompiled 3.2+ (3.07s vs 0.47s).

This sets -O3 explicitly in RUBY_CFLAGS.

On sentry-rails, "Run specs" on those Rubies drops 2–3x compared with master. For example, 3.0/7.1 goes from 358s to 125s, and 3.1/7.2 from 781s to 447s.

The mise cache key covers .mise*.toml, so the first run recompiles the three Rubies once (about 9 min in setup-mise).

@solnic
solnic force-pushed the ci/optimize-source-built-rubies branch from 3881cd5 to 6e38384 Compare November 25, 2026 11:56
@solnic
solnic added this pull request to stack #3246 November 25, 2026 11:56
@solnic
solnic force-pushed the ci/optimize-source-built-rubies branch from 6a3a2f8 to 6e38384 Compare November 25, 2026 12:25
@solnic
solnic removed this pull request from stack #3246 November 25, 2026 12:33
@solnic
solnic added this pull request to stack #3248 November 25, 2026 12:33
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.

1 participant