From 3857d7352d41ae0ababb4d549ea56ccf5a7d1408 Mon Sep 17 00:00:00 2001 From: Paul Mucur Date: Sun, 29 Dec 2024 10:47:09 +0000 Subject: [PATCH 1/2] Test against the final release of Ruby 3.4 Now Ruby 3.4 is out, switch from the release candidate to the final version (upgrading rake-compiler-dock along the way). Note 3.4 is not yet available on Windows so we continue to test against Ruby HEAD. --- .github/workflows/precompile-gem.yml | 2 +- .github/workflows/tests.yml | 40 ++++++++++++++-------------- README.md | 2 +- argon2id.gemspec | 2 +- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/precompile-gem.yml b/.github/workflows/precompile-gem.yml index 5f60699..43637b5 100644 --- a/.github/workflows/precompile-gem.yml +++ b/.github/workflows/precompile-gem.yml @@ -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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 54dec93..25bbae2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 @@ -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 @@ -115,13 +115,13 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4.0-rc1", "truffleruby"] + ruby: ["3.0", "3.1", "3.2", "3.3", "3.4", "truffleruby"] include: - { 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: @@ -144,13 +144,13 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4.0-rc1"] + ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"] include: - { 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 @@ -234,7 +234,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4-rc"] + ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"] include: - { ruby: "3.0", rubygems: "3.5.23" } runs-on: ubuntu-latest @@ -257,7 +257,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4-rc"] + ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"] include: - { ruby: "3.0", rubygems: "3.5.23" } runs-on: ubuntu-latest @@ -280,7 +280,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4-rc"] + ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"] include: - { ruby: "3.0", rubygems: "3.5.23" } runs-on: ubuntu-latest @@ -303,7 +303,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4-rc"] + ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"] include: - { ruby: "3.0", rubygems: "3.5.23" } runs-on: ubuntu-latest @@ -326,7 +326,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4-rc"] + ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"] include: - { ruby: "3.0", rubygems: "3.5.23" } runs-on: ubuntu-latest @@ -349,7 +349,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4-rc"] + ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"] include: - { ruby: "3.0", rubygems: "3.5.23" } runs-on: ubuntu-latest @@ -372,13 +372,13 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4.0-rc1"] + ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"] include: - { 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 @@ -400,7 +400,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4-rc"] + ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"] include: - { ruby: "3.0", rubygems: "3.5.23" } runs-on: ubuntu-latest @@ -419,13 +419,13 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4.0-rc1"] + ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"] include: - { 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 @@ -447,13 +447,13 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4.0-rc1"] + ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"] include: - { 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 @@ -536,7 +536,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 diff --git a/README.md b/README.md index 4460a82..c471851 100644 --- a/README.md +++ b/README.md @@ -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/) 3.0 to 3.4 * [JRuby](https://www.jruby.org) 9.4 * [TruffleRuby](https://www.graalvm.org/ruby/) 24.1 diff --git a/argon2id.gemspec b/argon2id.gemspec index 6c3c033..9dfcf6a 100644 --- a/argon2id.gemspec +++ b/argon2id.gemspec @@ -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 From 4569d40bd833821e4fb22f2688fe0aadd77de113 Mon Sep 17 00:00:00 2001 From: Paul Mucur Date: Sun, 29 Dec 2024 10:56:23 +0000 Subject: [PATCH 2/2] Restore support for Ruby 2.6 and 2.7 --- .github/workflows/tests.yml | 72 ++++++++++++++++++++++++++++--------- README.md | 2 +- Rakefile | 2 +- argon2id.gemspec | 2 +- 4 files changed, 59 insertions(+), 19 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 25bbae2..203d0b4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -115,8 +115,10 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4", "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" } @@ -144,8 +146,10 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"] + 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" } @@ -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: @@ -234,8 +246,10 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"] + 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: @@ -257,8 +271,10 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"] + 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: @@ -280,8 +296,10 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"] + 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: @@ -303,8 +321,10 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"] + 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: @@ -326,8 +346,10 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"] + 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: @@ -349,8 +371,10 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"] + 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: @@ -372,8 +396,10 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"] + 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" } @@ -400,8 +426,10 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"] + 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: @@ -419,8 +447,10 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"] + 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" } @@ -447,8 +477,10 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"] + 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" } @@ -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: diff --git a/README.md b/README.md index c471851..3c500c1 100644 --- a/README.md +++ b/README.md @@ -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 +* [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 diff --git a/Rakefile b/Rakefile index 3736cb8..322f7c1 100644 --- a/Rakefile +++ b/Rakefile @@ -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") diff --git a/argon2id.gemspec b/argon2id.gemspec index 9dfcf6a..704a2b4 100644 --- a/argon2id.gemspec +++ b/argon2id.gemspec @@ -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",