Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down