Skip to content

Commit

Permalink
Merge pull request #12 from mudge/restore-2.x-support
Browse files Browse the repository at this point in the history
Restore Ruby 2.6 and 2.7 support
  • Loading branch information
mudge authored Dec 29, 2024
2 parents d005d63 + 4569d40 commit 4cf1745
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 29 deletions.
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
- run: bundle exec rake gem:${{ inputs.platform }}
- uses: actions/upload-artifact@v4
Expand Down
88 changes: 64 additions & 24 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,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
- run: bundle exec rake gem
- uses: actions/upload-artifact@v4
Expand All @@ -37,7 +37,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
- run: bundle exec rake java:gem
- uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -115,13 +115,15 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3", "3.4.0-rc1", "truffleruby"]
ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4", "truffleruby"]
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.0-rc1", rubygems: "default" }
- { ruby: "3.4", rubygems: "default" }
- { ruby: "truffleruby", rubygems: "default" }
runs-on: "ubuntu-latest"
steps:
Expand All @@ -144,13 +146,15 @@ 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.0-rc1", rubygems: "default" }
- { ruby: "3.4", rubygems: "default" }
runs-on: "macos-13"
steps:
- uses: actions/checkout@v4
Expand All @@ -169,13 +173,21 @@ jobs:

test-windows-2019:
needs: "build-cruby-gem"
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"
rubygems: "3.5.23"
ruby-version: "${{ matrix.ruby }}"
rubygems: "${{ matrix.rubygems }}"
bundler-cache: true
- uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -234,8 +246,10 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3", "3.4-rc"]
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:
Expand All @@ -257,8 +271,10 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3", "3.4-rc"]
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:
Expand All @@ -280,8 +296,10 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3", "3.4-rc"]
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:
Expand All @@ -303,8 +321,10 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3", "3.4-rc"]
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:
Expand All @@ -326,8 +346,10 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3", "3.4-rc"]
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:
Expand All @@ -349,8 +371,10 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3", "3.4-rc"]
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:
Expand All @@ -372,13 +396,15 @@ 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.0-rc1", rubygems: "default" }
- { ruby: "3.4", rubygems: "default" }
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -400,8 +426,10 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3", "3.4-rc"]
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:
Expand All @@ -419,13 +447,15 @@ 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.0-rc1", rubygems: "default" }
- { ruby: "3.4", rubygems: "default" }
runs-on: macos-14
steps:
- uses: actions/checkout@v4
Expand All @@ -447,13 +477,15 @@ 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.0-rc1", rubygems: "default" }
- { ruby: "3.4", rubygems: "default" }
runs-on: macos-13
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -511,13 +543,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"
rubygems: "3.5.23"
ruby-version: "${{ matrix.ruby }}"
rubygems: "${{ matrix.rubygems }}"
bundler-cache: true
- uses: actions/download-artifact@v4
with:
Expand All @@ -536,7 +576,7 @@ jobs:
- uses: actions/checkout@v4
- 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 test:valgrind
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ User.find_by(name: "alice")&.authenticate("password") #=> user

This gem requires any of the following to run:

* [Ruby](https://www.ruby-lang.org/en/) 3.0 to 3.4.0-rc1
* [Ruby](https://www.ruby-lang.org/en/) 2.6 to 3.4
* [JRuby](https://www.jruby.org) 9.4
* [TruffleRuby](https://www.graalvm.org/ruby/) 24.1

Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cross_platforms = %w[
x86_64-linux-musl
].freeze

ENV["RUBY_CC_VERSION"] = %w[3.4.0 3.3.5 3.2.0 3.1.0 3.0.0].join(":")
ENV["RUBY_CC_VERSION"] = %w[3.4.0 3.3.5 3.2.0 3.1.0 3.0.0 2.7.0 2.6.0].join(":")

gemspec = Gem::Specification.load("argon2id.gemspec")

Expand Down
4 changes: 2 additions & 2 deletions argon2id.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Gem::Specification.new do |s|
"source_code_uri" => "https://github.com/mudge/argon2id",
"rubygems_mfa_required" => "true"
}
s.required_ruby_version = ">= 3.0.0"
s.required_ruby_version = ">= 2.6.0"
s.extensions = ["ext/argon2id/extconf.rb"]
s.files = [
"CHANGELOG.md",
Expand Down Expand Up @@ -54,6 +54,6 @@ Gem::Specification.new do |s|
s.rdoc_options = ["--main", "README.md"]

s.add_development_dependency("rake-compiler", "~> 1.2")
s.add_development_dependency("rake-compiler-dock", "~> 1.7.0.rc1")
s.add_development_dependency("rake-compiler-dock", "~> 1.7")
s.add_development_dependency("minitest", "~> 5.25")
end

0 comments on commit 4cf1745

Please sign in to comment.