Skip to content

Commit 8ded2a1

Browse files
authored
Merge pull request #153 from ianks/drop-24+25
Drop support for Ruby 2.4, 2.5, and 2.6
2 parents d3e6b44 + 4c4b7af commit 8ded2a1

File tree

7 files changed

+19
-82
lines changed

7 files changed

+19
-82
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ jobs:
144144
fail-fast: false
145145
matrix:
146146
os: [ubuntu-latest]
147-
ruby: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7", "2.6", "2.5", "2.4"]
147+
ruby: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"]
148148
runs-on: ${{ matrix.os }}
149149
steps:
150150
- uses: actions/checkout@v4
@@ -169,14 +169,11 @@ jobs:
169169
fail-fast: false
170170
matrix:
171171
platform: [x86_64-linux, x86_64-linux-gnu]
172-
ruby: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7", "2.6", "2.5", "2.4"]
172+
ruby: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"]
173173
include:
174174
# declare rubygems for each ruby version
175175
- { ruby: "3.0", rubygems: "3.5.23" }
176176
- { ruby: "2.7", rubygems: "3.4.22" }
177-
- { ruby: "2.6", rubygems: "3.4.22" }
178-
- { ruby: "2.5", rubygems: "3.3.26" }
179-
- { ruby: "2.4", rubygems: "3.3.26" }
180177
runs-on: ubuntu-latest
181178
steps:
182179
- uses: actions/checkout@v4
@@ -215,14 +212,11 @@ jobs:
215212
- x86_64-linux
216213
- x86_64-linux-gnu
217214
- x86_64-linux-musl
218-
ruby: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7", "2.6", "2.5", "2.4"]
215+
ruby: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"]
219216
include:
220217
# declare rubygems for each ruby version
221218
- { ruby: "3.0", rubygems: "3.5.23" }
222219
- { ruby: "2.7", rubygems: "3.4.22" }
223-
- { ruby: "2.6", rubygems: "3.4.22" }
224-
- { ruby: "2.5", rubygems: "3.3.26" }
225-
- { ruby: "2.4", rubygems: "3.3.26" }
226220
# declare docker image for each platform
227221
- { platform: aarch64-linux-musl, docker_tag: "-alpine" }
228222
- { platform: arm-linux-musl, docker_tag: "-alpine" }
@@ -265,13 +259,7 @@ jobs:
265259
fail-fast: false
266260
matrix:
267261
os: [macos-13, macos-14]
268-
ruby: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7", "2.6", "2.5", "2.4"]
269-
exclude:
270-
# setup-ruby does not provide ruby 2.4 or 2.5 on arm64-darwin as of 2024-05-01
271-
- os: macos-14
272-
ruby: "2.4"
273-
- os: macos-14
274-
ruby: "2.5"
262+
ruby: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"]
275263
include:
276264
- os: macos-13
277265
platform: x86_64-darwin
@@ -280,15 +268,6 @@ jobs:
280268
- os: ubuntu-latest
281269
ruby: jruby
282270
platform: jruby
283-
- os: windows-latest
284-
ruby: "2.4"
285-
platform: x64-mingw32
286-
- os: windows-latest
287-
ruby: "2.5"
288-
platform: x64-mingw32
289-
- os: windows-latest
290-
ruby: "2.6"
291-
platform: x64-mingw32
292271
- os: windows-latest
293272
ruby: "2.7"
294273
platform: x64-mingw32
@@ -335,15 +314,6 @@ jobs:
335314
fail-fast: false
336315
matrix:
337316
include:
338-
- os: windows-latest
339-
ruby: "2.4"
340-
platform: x64-mingw32
341-
- os: windows-latest
342-
ruby: "2.5"
343-
platform: x64-mingw32
344-
- os: windows-latest
345-
ruby: "2.6"
346-
platform: x64-mingw32
347317
- os: windows-latest
348318
ruby: "2.7"
349319
platform: x64-mingw32
@@ -390,10 +360,6 @@ jobs:
390360
fail-fast: false
391361
matrix:
392362
include:
393-
- from_image: amd64/centos
394-
image_platform: linux/amd64
395-
platform: x86_64-linux # centos-8 ships ruby 2.5, rubygems won't recognize -gnu suffix
396-
dockerfile: centos
397363
- from_image: navikey/raspbian-bullseye
398364
image_platform: linux/arm/v7
399365
platform: arm-linux # bullseye ships ruby 2.7, rubygems won't recognize -gnu suffix

Dockerfile.mri.erb

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ ENV BASH_ENV=/etc/rubybashrc
7474
##
7575
USER rubyuser
7676

77-
ENV RBENV_RUBIES="2.5.9 3.1.6 3.4.1"
77+
ENV RBENV_RUBIES="3.1.6 3.4.1"
7878

7979
# Install the bootstrap rubies
8080
RUN bash -c " \
@@ -106,7 +106,6 @@ RUN sudo mkdir -p /usr/local/rake-compiler && \
106106

107107
<%
108108
#
109-
# Build ruby versions prior to ruby2_keywords using ruby-2.5
110109
# Build ruby versions with ruby2_keywords using ruby-3.x
111110
#
112111
# Note that parallel builds of ruby with make flag `-j` are often flaky, see
@@ -120,12 +119,10 @@ xrubies_build_plan = if platform =~ /x64-mingw-ucrt/
120119
elsif platform =~ /x64-mingw32/
121120
[
122121
# Rubyinstaller prior to 3.1 is platform x64-mingw32
123-
["2.6.10:2.5.9:2.4.10", "2.5.9"],
124122
["3.0.7:2.7.8", "3.1.6"],
125123
]
126124
else
127125
[
128-
["2.6.10:2.5.9:2.4.10", "2.5.9"],
129126
["2.7.8", "3.1.6"],
130127
["3.4.1:3.3.7:3.2.6:3.1.6:3.0.7", "3.4.1"],
131128
]
@@ -160,15 +157,10 @@ RUN find /usr/local/rake-compiler/ruby/*linux*/ -name mkmf.rb | while read f ; d
160157
<% if platform =~ /mingw/ %>
161158
# RubyInstaller doesn't install libgcc -> link it static.
162159
RUN find /usr/local/rake-compiler/ruby/*mingw*/ -name rbconfig.rb | while read f ; do sed -i 's/."LDFLAGS". = "/&-static-libgcc /' $f ; done
163-
# Raise Windows-API to Vista (affects ruby < 2.6 only)
164-
RUN find /usr/local/rake-compiler/ruby -name rbconfig.rb | while read f ; do sed -i 's/0x0501/0x0600/' $f ; done
165160
# Don't link to static libruby
166161
RUN find /usr/local/rake-compiler/ruby -name lib*-ruby*.dll.a | while read f ; do n=`echo $f | sed s/.dll//` ; mv $f $n ; done
167162
<% end %>
168163

169-
# ruby-2.5 links to libcrypt, which isn't necessary for extensions
170-
RUN find /usr/local/rake-compiler/ruby -name rbconfig.rb | while read f ; do sed -i 's/-lcrypt//' $f ; done
171-
172164
<% if platform =~ /darwin/ %>
173165
# for rubies which use `-bundle_loader` on darwin
174166
# - the upstream change: https://github.com/ruby/ruby/pull/6193
@@ -226,6 +218,6 @@ COPY build/sudoers /etc/sudoers.d/rake-compiler-dock
226218

227219
RUN bash -c "rbenv global 3.4.1"
228220

229-
ENV RUBY_CC_VERSION=3.4.1:3.3.7:3.2.6:3.1.6:3.0.7:2.7.8:2.6.10:2.5.9:2.4.10
221+
ENV RUBY_CC_VERSION=3.4.1:3.3.7:3.2.6:3.1.6:3.0.7:2.7.8
230222

231223
CMD bash

History.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# `rake-compiler/rake-compiler-dock` Changelog
22

3+
## Unreleased
4+
5+
- Drop support for Ruby 2.4, 2.5, and 2.6. #153 @ianks @flavorjones
6+
- Remove `rbenv` ruby version 2.5.9 from the build container. #153 @ianks @flavorjones
7+
8+
### CRuby container summary
9+
10+
- native rubies: 3.4.1 (default), 3.1.6
11+
- `RUBY_CC_VERSION=3.4.1:3.3.7:3.2.6:3.1.6:3.0.7:2.7.8`
12+
13+
314
## v1.9.1 / 2025-01-20
415

516
### Features

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**Easy to use and reliable cross compiler environment for building Windows, Linux, Mac and JRuby binary gems.**
44

5-
It provides cross compilers and Ruby environments for 2.4 and newer versions of the [RubyInstaller](http://rubyinstaller.org/) and Linux runtime environments.
5+
It provides cross compilers and Ruby environments for 2.6 and newer versions of the [RubyInstaller](http://rubyinstaller.org/) and Linux runtime environments.
66
They are prepared for use with [rake-compiler](https://github.com/rake-compiler/rake-compiler).
77
It is used by [many gems with C or JRuby extentions](https://github.com/rake-compiler/rake-compiler-dock/wiki/Projects-using-rake-compiler-dock).
88

@@ -72,8 +72,6 @@ Ruby version 3.1 and later ship with a sufficient Rubygems version. For earlier
7272
- ruby: "3.0", rubygems: "3.5.5" # or possibly higher
7373
- ruby: "2.7", rubygems: "3.4.22"
7474
- ruby: "2.6", rubygems: "3.4.22"
75-
- ruby: "2.5", rubygems: "3.3.26"
76-
- ruby: "2.4", rubygems: "3.3.26"
7775

7876
**It's strongly suggested that you use rake-compiler v1.2.7 or later to build `linux-musl` and/or `linux-gnu` native gems.** That version of rake-compiler sets `required_rubygems_version` automatically in the native platform gems' gemspecs.
7977

lib/rake_compiler_dock.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,6 @@ def exec(*args, &block)
8888
# # "3.1" => "3.1.6",
8989
# # "3.0" => "3.0.7",
9090
# # "2.7" => "2.7.8",
91-
# # "2.6" => "2.6.10",
92-
# # "2.5" => "2.5.9",
93-
# # "2.4" => "2.4.10",
9491
# # }
9592
#
9693
def cross_rubies
@@ -101,9 +98,6 @@ def cross_rubies
10198
"3.1" => "3.1.6",
10299
"3.0" => "3.0.7",
103100
"2.7" => "2.7.8",
104-
"2.6" => "2.6.10",
105-
"2.5" => "2.5.9",
106-
"2.4" => "2.4.10",
107101
}
108102
end
109103

test/env/Dockerfile.centos

Lines changed: 0 additions & 24 deletions
This file was deleted.

test/rcd_test/rcd_test.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
99
spec.summary = "C extension for testing rake-compiler-dock"
1010
spec.description = "This gem has no real use other than testing builds of binary gems."
1111
spec.homepage = "https://github.com/rake-compiler/rake-compiler-dock"
12-
spec.required_ruby_version = ">= 2.0.0"
12+
spec.required_ruby_version = ">= 2.7.0"
1313
spec.license = "MIT"
1414

1515
spec.files = [

0 commit comments

Comments
 (0)