Repository navigation
Build with Ruby 3.3 to match GitHub Pages - #248
maximthomas wants to merge 3 commits into
Conversation
ubuntu-latest now resolves to ubuntu-26.04, and ruby/setup-ruby has no Ruby 3.1 build for that image, so the build job fails on every run: "Unavailable version 3.1.7 for ruby on ubuntu-26.04". ruby/ruby-builder still ships Ruby 3.1.7 for ubuntu-24.04, so pin the runner and keep the Ruby version.
vharseko
left a comment
There was a problem hiding this comment.
The pin works — build is green on ubuntu-24.04 with Ruby 3.1.7. One suggestion on the approach, though: the failure is about the Ruby version, not the image, so it might be simpler to fix that instead of pinning.
Raise ruby-version instead of pinning the runner. ruby/ruby-builder already ships ruby-3.3.11 and ruby-3.3.12 for ubuntu-26.04, so ruby-version: '3.3' with runs-on: ubuntu-latest should pass today, and the pin plus its unpin comment would go away. It would also match production: GitHub Pages builds this site (legacy build) with github-pages 232 on Ruby 3.3.4 (pages.github.com/versions.json). Right now CI builds on 3.1.7, so a green check doesn't fully vouch for the Pages build. One CI run would confirm that the github-pages 232 native gems (commonmarker, eventmachine) compile on the 26.04 toolchain.
Staying on 3.1 (EOL since March 2025) also means dependencies quietly fall behind: in this PR's run bundler resolved nokogiri 1.18.10, because 1.19+ requires Ruby ≥ 3.2.
If you'd rather keep the pin for now, could you open a tracking issue for the unpin, so it isn't rediscovered when GitHub retires ubuntu-24.04?
Minor, outside the diff: actions/checkout@v4 logs the Node 20 deprecation warning in this run; @v5 clears it.
Note for after merge: re-running #247's failed run will reuse its old merge commit, so #247 needs a new push (or close/reopen) to pick this up.
ruby/ruby-builder has a Ruby 3.3 build for ubuntu-26.04, the image ubuntu-latest resolves to, so raise ruby-version from 3.1 to 3.3 and drop the ubuntu-24.04 pin. 3.3 is also the series GitHub Pages builds this site with (pages.github.com/versions.json). Use the series form: newer runner images only get the latest patch of each series, so an exact older patch would fail to install again.
v4 targets Node.js 20, and the runner logs a deprecation warning for it. v7 runs on Node.js 24.
|
Switched to raising Ruby:
With the pin gone there is nothing to track, so no issue. After this is merged I'll push to #247 so that it builds with the new workflow. Updated the title and description to match. |
Summary
Raises
ruby-versionin.github/workflows/build.ymlfrom3.1to3.3, so thebuildjob runs onubuntu-latestagain. Also updatesactions/checkoutfromv4tov7.Why
ubuntu-latestnow resolves toubuntu-26.04, andruby/setup-rubyhas no Ruby 3.1 build for that image. Since then every run ofbuildfails before the site is built, for example on #247:For
ubuntu-26.04,ruby/ruby-builderbuilds only the latest patch of each supported series, 3.3 included. Withruby-version: '3.3',setup-rubypicks the latest 3.3 release, which has a build for that image.3.3 is also the series GitHub Pages uses for this site: the legacy build runs
github-pages232 on Ruby 3.3 (pages.github.com/versions.jsonlists 3.3.4). CI and production now build on the same series, and bundler is no longer held back by Ruby 3.1, which reached EOL in March 2025 (on 3.1 it resolvednokogiri1.18.10, because 1.19+ requires Ruby ≥ 3.2).actions/checkout@v4targets Node.js 20, and the runner logs a deprecation warning for it;v7runs on Node.js 24.The first revision pinned the runner to
ubuntu-24.04instead. Raising Ruby, as suggested in review, makes the pin unnecessary.Verification
The
buildcheck on this PR ran onubuntu-26.04with Ruby 3.3.13 andgithub-pages232: the native gems (commonmarker0.23.12,eventmachine1.2.7) compiled, the site built, and the internal-link check passed. The Node.js 20 warning is gone.