From 623476e6e4e8496913b5a4c084fa39e72ce67fde Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 31 Oct 2026 11:29:40 +0900 Subject: [PATCH 1/2] Set CC for Ruby < 3.2 on ubuntu-26.04 Ruby 3.1 and older fail to build there with GCC 15. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/build.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 673a9c55..3281b8b1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -83,6 +83,20 @@ jobs: run: echo "warnflags=-Wno-error=implicit-function-declaration" >> $GITHUB_ENV if: startsWith(steps.ruby.outputs.ruby, 'ruby-1.9') || startsWith(steps.ruby.outputs.ruby, 'ruby-2.0') || startsWith(steps.ruby.outputs.ruby, 'ruby-2.1') || startsWith(steps.ruby.outputs.ruby, 'ruby-2.2') || steps.ruby.outputs.ruby == 'ruby-2.6.7' + # GCC 15 on ubuntu-26.04 defaults to C23, where `()` means `(void)`, and since GCC 14 implicit declarations are errors + # The flags go on CC because CFLAGS would replace Ruby's default optflags, and 2.6 checks its MJIT header with a bare $(CC) + - name: Set CC for Ruby < 3.2 on ubuntu-26.04 + run: | + case "${{ steps.ruby.outputs.ruby }}" in + ruby-1.9.*) + # _FORTIFY_SOURCE=3 aborts miniruby, and ext/bigdecimal races under parallel make + echo "CC=gcc -std=gnu17 -fpermissive -U_FORTIFY_SOURCE" >> $GITHUB_ENV + echo "MAKE_OPTS=-j1" >> $GITHUB_ENV ;; + ruby-2.[012].*) echo "CC=gcc -std=gnu17 -fpermissive" >> $GITHUB_ENV ;; + ruby-2.*|ruby-3.[01].*) echo "CC=gcc -std=gnu17" >> $GITHUB_ENV ;; + esac + if: startsWith(matrix.os, 'ubuntu-26.04') + - name: Set RUBY_CONFIGURE_OPTS run: echo 'RUBY_CONFIGURE_OPTS=--enable-shared --disable-install-doc' >> $GITHUB_ENV # https://github.com/rbenv/ruby-build/discussions/1961#discussioncomment-4031745 From eaaf2fe242fa6e0e6afdcc8b431ddf081d6a2c5b Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 31 Oct 2026 11:30:07 +0900 Subject: [PATCH 2/2] Add ubuntu-26.04 builds of CRuby 1.9.3 to 3.1.7 Co-Authored-By: Claude Opus 5.5 --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3281b8b1..bdff125c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,8 +10,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-22.04, ubuntu-24.04, ubuntu-26.04, ubuntu-22.04-arm, ubuntu-24.04-arm, ubuntu-26.04-arm, macos-15-intel, macos-14 ] - ruby: [ruby-3.3.13, ruby-3.4.12, ruby-4.0.9] + os: [ ubuntu-26.04, ubuntu-26.04-arm ] + ruby: [ ruby-1.9.3-p551, ruby-2.0.0-p648, ruby-2.1.9, ruby-2.2.10, ruby-2.3.8, ruby-2.4.10, ruby-2.5.9, ruby-2.6.10, ruby-2.7.8, ruby-3.0.7, ruby-3.1.7 ] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v6