Skip to content

Commit

Permalink
Restore support for Ruby 2.6 and 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
mudge committed Dec 29, 2024
1 parent 9dc336e commit 282769b
Show file tree
Hide file tree
Showing 8 changed files with 110 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4.0-rc1"
ruby-version: "3.4"
- name: Upgrade all vendored dependencies to their latest versions
run: ./scripts/update-dependencies
- uses: actions/create-github-app-token@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4.0-rc1"
ruby-version: "3.4"
- run: gem install --no-document yard redcarpet
- run: yardoc
- uses: actions/upload-pages-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/precompile-gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4.0-rc1"
ruby-version: "3.4"
bundler-cache: true
- uses: actions/cache@v4
with:
Expand Down
127 changes: 96 additions & 31 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
key: archives-ubuntu-${{ hashFiles('dependencies.yml') }}
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4.0-rc1"
ruby-version: "3.4"
bundler-cache: true
- run: bundle exec rake gem
- uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
ruby: ["3.4.0-rc1", "3.0"] # oldest and newest
ruby: ["3.4", "2.6"] # oldest and newest
libre2:
- version: "20150501"
soname: 0
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
with:
name: cruby-gem
path: pkg
- run: ./scripts/test-gem-install --enable-system-libraries
- run: ./scripts/test-gem-install default --enable-system-libraries
env:
BUNDLE_PATH: ${{ github.workspace }}/vendor/bundle

Expand All @@ -148,7 +148,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3", "3.4.0-rc1"]
ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4"]
sys: ["enable", "disable"]
runs-on: "ubuntu-latest"
steps:
Expand All @@ -162,7 +162,7 @@ jobs:
with:
name: cruby-gem
path: pkg
- run: ./scripts/test-gem-install --${{ matrix.sys }}-system-libraries
- run: ./scripts/test-gem-install default --${{ matrix.sys }}-system-libraries
env:
BUNDLE_PATH: ${{ github.workspace }}/vendor/bundle

Expand All @@ -171,7 +171,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3", "3.4.0-rc1"]
ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4"]
sys: ["enable", "disable"]
runs-on: "macos-13"
steps:
Expand All @@ -185,7 +185,7 @@ jobs:
with:
name: cruby-gem
path: pkg
- run: ./scripts/test-gem-install --${{ matrix.sys }}-system-libraries
- run: ./scripts/test-gem-install default --${{ matrix.sys }}-system-libraries
env:
BUNDLE_PATH: ${{ github.workspace }}/vendor/bundle

Expand All @@ -194,20 +194,21 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["2.6", "2.7", "3.0"]
sys: ["enable", "disable"]
runs-on: "windows-2019"
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: "3.0"
ruby-version: "${{ matrix.ruby }}"
mingw: re2
bundler-cache: true
- uses: actions/download-artifact@v4
with:
name: cruby-gem
path: pkg
- run: ./scripts/test-gem-install --${{ matrix.sys }}-system-libraries
- run: ./scripts/test-gem-install default --${{ matrix.sys }}-system-libraries
shell: bash
env:
BUNDLE_PATH: ${{ github.workspace }}/vendor/bundle
Expand All @@ -231,7 +232,7 @@ jobs:
with:
name: cruby-gem
path: pkg
- run: ./scripts/test-gem-install --${{ matrix.sys }}-system-libraries
- run: ./scripts/test-gem-install default --${{ matrix.sys }}-system-libraries
shell: bash
env:
BUNDLE_PATH: ${{ github.workspace }}/vendor/bundle
Expand All @@ -254,7 +255,7 @@ jobs:
usesh: true
copyback: false
prepare: pkg install -y ruby devel/ruby-gems sysutils/rubygem-bundler devel/pkgconf devel/cmake shells/bash devel/re2
run: ./scripts/test-gem-install --${{ matrix.sys }}-system-libraries
run: ./scripts/test-gem-install default --${{ matrix.sys }}-system-libraries

test-vendored-and-system:
needs: "build-cruby-gem"
Expand All @@ -266,7 +267,7 @@ jobs:
- uses: ruby/setup-ruby@v1
id: setup-ruby
with:
ruby-version: "3.4.0-rc1"
ruby-version: "3.4"
bundler-cache: true
- uses: actions/download-artifact@v4
with:
Expand All @@ -283,7 +284,11 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3", "3.4.0-rc1"]
ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4"]
include:
- { ruby: "2.6", rubygems: "3.4.22" }
- { ruby: "2.7", rubygems: "3.4.22" }
- { ruby: "3.0", rubygems: "3.5.23" }
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -297,14 +302,18 @@ jobs:
docker run --rm -v "$(pwd):/re2" -w /re2 \
--platform=linux/arm64 \
ruby:${{ matrix.ruby }} \
./scripts/test-gem-install
./scripts/test-gem-install ${{ matrix.rubygems }}
test-precompiled-aarch64-linux-musl:
needs: "precompile-aarch64-linux-musl"
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3", "3.4.0-rc1"]
ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4"]
include:
- { ruby: "2.6", rubygems: "3.4.22" }
- { ruby: "2.7", rubygems: "3.4.22" }
- { ruby: "3.0", rubygems: "3.5.23" }
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -318,14 +327,18 @@ jobs:
docker run --rm -v "$(pwd):/re2" -w /re2 \
--platform=linux/arm64 \
ruby:${{ matrix.ruby }}-alpine \
./scripts/test-gem-install
./scripts/test-gem-install ${{ matrix.rubygems }}
test-precompiled-arm-linux-gnu:
needs: "precompile-arm-linux-gnu"
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3", "3.4.0-rc1"]
ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4"]
include:
- { ruby: "2.6", rubygems: "3.4.22" }
- { ruby: "2.7", rubygems: "3.4.22" }
- { ruby: "3.0", rubygems: "3.5.23" }
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -339,14 +352,18 @@ jobs:
docker run --rm -v "$(pwd):/re2" -w /re2 \
--platform=linux/arm/v7 \
ruby:${{ matrix.ruby }} \
./scripts/test-gem-install
./scripts/test-gem-install ${{ matrix.rubygems }}
test-precompiled-arm-linux-musl:
needs: "precompile-arm-linux-musl"
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3", "3.4.0-rc1"]
ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4"]
include:
- { ruby: "2.6", rubygems: "3.4.22" }
- { ruby: "2.7", rubygems: "3.4.22" }
- { ruby: "3.0", rubygems: "3.5.23" }
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -360,14 +377,18 @@ jobs:
docker run --rm -v "$(pwd):/re2" -w /re2 \
--platform=linux/arm/v7 \
ruby:${{ matrix.ruby }}-alpine \
./scripts/test-gem-install
./scripts/test-gem-install ${{ matrix.rubygems }}
test-precompiled-x86-linux-gnu:
needs: "precompile-x86-linux-gnu"
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3", "3.4.0-rc1"]
ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4"]
include:
- { ruby: "2.6", rubygems: "3.4.22" }
- { ruby: "2.7", rubygems: "3.4.22" }
- { ruby: "3.0", rubygems: "3.5.23" }
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -381,14 +402,18 @@ jobs:
docker run --rm -v "$(pwd):/re2" -w /re2 \
--platform=linux/386 \
ruby:${{ matrix.ruby }} \
./scripts/test-gem-install
./scripts/test-gem-install ${{ matrix.rubygems }}
test-precompiled-x86-linux-musl:
needs: "precompile-x86-linux-musl"
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3", "3.4.0-rc1"]
ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4"]
include:
- { ruby: "2.6", rubygems: "3.4.22" }
- { ruby: "2.7", rubygems: "3.4.22" }
- { ruby: "3.0", rubygems: "3.5.23" }
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -402,20 +427,29 @@ jobs:
docker run --rm -v "$(pwd):/re2" -w /re2 \
--platform=linux/386 \
ruby:${{ matrix.ruby }}-alpine \
./scripts/test-gem-install
./scripts/test-gem-install ${{ matrix.rubygems }}
test-precompiled-x86_64-linux-gnu:
needs: "precompile-x86_64-linux-gnu"
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3", "3.4.0-rc1"]
ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4"]
include:
- { ruby: "2.6", rubygems: "3.4.22" }
- { ruby: "2.7", rubygems: "3.4.22" }
- { ruby: "3.0", rubygems: "3.5.23" }
- { ruby: "3.1", rubygems: "default" }
- { ruby: "3.2", rubygems: "default" }
- { ruby: "3.3", rubygems: "default" }
- { ruby: "3.4", rubygems: "default" }
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.ruby }}"
rubygems: "${{ matrix.rubygems }}"
bundler-cache: true
- uses: actions/download-artifact@v4
with:
Expand All @@ -430,7 +464,11 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3", "3.4.0-rc1"]
ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4"]
include:
- { ruby: "2.6", rubygems: "3.4.22" }
- { ruby: "2.7", rubygems: "3.4.22" }
- { ruby: "3.0", rubygems: "3.5.23" }
runs-on: ubuntu-latest
container:
image: "ruby:${{ matrix.ruby }}-alpine"
Expand All @@ -440,20 +478,29 @@ jobs:
with:
name: cruby-x86_64-linux-musl-gem
path: pkg
- run: ./scripts/test-gem-install
- run: ./scripts/test-gem-install ${{ matrix.rubygems }}

test-precompiled-arm64-darwin:
needs: "precompile-arm64-darwin"
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3", "3.4.0-rc1"]
ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4"]
include:
- { ruby: "2.6", rubygems: "3.4.22" }
- { ruby: "2.7", rubygems: "3.4.22" }
- { ruby: "3.0", rubygems: "3.5.23" }
- { ruby: "3.1", rubygems: "default" }
- { ruby: "3.2", rubygems: "default" }
- { ruby: "3.3", rubygems: "default" }
- { ruby: "3.4", rubygems: "default" }
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.ruby }}"
rubygems: "${{ matrix.rubygems }}"
bundler-cache: true
- uses: actions/download-artifact@v4
with:
Expand All @@ -468,13 +515,22 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3", "3.4.0-rc1"]
ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4"]
include:
- { ruby: "2.6", rubygems: "3.4.22" }
- { ruby: "2.7", rubygems: "3.4.22" }
- { ruby: "3.0", rubygems: "3.5.23" }
- { ruby: "3.1", rubygems: "default" }
- { ruby: "3.2", rubygems: "default" }
- { ruby: "3.3", rubygems: "default" }
- { ruby: "3.4", rubygems: "default" }
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.ruby }}"
rubygems: "${{ matrix.rubygems }}"
bundler-cache: true
- uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -508,12 +564,21 @@ jobs:

test-precompiled-x64-mingw32:
needs: "precompile-x64-mingw32"
strategy:
fail-fast: false
matrix:
ruby: ["2.6", "2.7", "3.0"]
include:
- { ruby: "2.6", rubygems: "3.4.22" }
- { ruby: "2.7", rubygems: "3.4.22" }
- { ruby: "3.0", rubygems: "3.5.23" }
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.0"
ruby-version: "${{ matrix.ruby }}"
rubygems: "${{ matrix.rubygems }}"
bundler-cache: true
- uses: actions/download-artifact@v4
with:
Expand All @@ -536,7 +601,7 @@ jobs:
key: archives-ubuntu-${{ hashFiles('dependencies.yml') }}
- uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: "3.4.0-rc1"
ruby-version: "3.4"
apt-get: valgrind
bundler-cache: true
- run: bundle exec rake spec:valgrind
Loading

0 comments on commit 282769b

Please sign in to comment.