diff --git a/.github/workflows/precompile-gem.yml b/.github/workflows/precompile-gem.yml index cac8f7e..5f60699 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.3" + ruby-version: "3.4.0-rc1" 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 b96934a..89edfb1 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.3" + ruby-version: "3.4.0-rc1" 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.3" + ruby-version: "3.4.0-rc1" bundler-cache: true - run: bundle exec rake java:gem - uses: actions/upload-artifact@v4 @@ -45,25 +45,45 @@ jobs: name: jruby-gem path: pkg/*.gem - precompile-aarch64-linux: + precompile-aarch64-linux-gnu: uses: ./.github/workflows/precompile-gem.yml with: - platform: aarch64-linux + platform: aarch64-linux-gnu - precompile-arm-linux: + precompile-aarch64-linux-musl: uses: ./.github/workflows/precompile-gem.yml with: - platform: arm-linux + platform: aarch64-linux-musl - precompile-x86-linux: + precompile-arm-linux-gnu: uses: ./.github/workflows/precompile-gem.yml with: - platform: x86-linux + platform: arm-linux-gnu - precompile-x86_64-linux: + precompile-arm-linux-musl: uses: ./.github/workflows/precompile-gem.yml with: - platform: x86_64-linux + platform: arm-linux-musl + + precompile-x86-linux-gnu: + uses: ./.github/workflows/precompile-gem.yml + with: + platform: x86-linux-gnu + + precompile-x86-linux-musl: + uses: ./.github/workflows/precompile-gem.yml + with: + platform: x86-linux-musl + + precompile-x86_64-linux-gnu: + uses: ./.github/workflows/precompile-gem.yml + with: + platform: x86_64-linux-gnu + + precompile-x86_64-linux-musl: + uses: ./.github/workflows/precompile-gem.yml + with: + platform: x86_64-linux-musl precompile-arm64-darwin: uses: ./.github/workflows/precompile-gem.yml @@ -95,7 +115,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4", "truffleruby"] + ruby: ["3.0", "3.1", "3.2", "3.3", "3.4.0-rc1", "truffleruby"] runs-on: "ubuntu-latest" steps: - uses: actions/checkout@v4 @@ -116,7 +136,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4"] + ruby: ["3.0", "3.1", "3.2", "3.3", "3.4.0-rc1"] runs-on: "macos-13" steps: - uses: actions/checkout@v4 @@ -134,16 +154,12 @@ jobs: test-windows-2019: needs: "build-cruby-gem" - strategy: - fail-fast: false - matrix: - ruby: ["2.6", "2.7", "3.0"] runs-on: "windows-2019" steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: ${{ matrix.ruby }} + ruby-version: "3.0" bundler-cache: true - uses: actions/download-artifact@v4 with: @@ -159,7 +175,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.1", "3.2", "3.3"] + ruby: ["3.1", "3.2", "3.3", "head"] runs-on: "windows-2022" steps: - uses: actions/checkout@v4 @@ -197,39 +213,60 @@ jobs: prepare: pkg install -y ruby devel/ruby-gems sysutils/rubygem-bundler shells/bash devel/gmake run: ./scripts/test-gem-install - test-precompiled-aarch64-linux: - needs: "precompile-aarch64-linux" + test-precompiled-aarch64-linux-gnu: + needs: "precompile-aarch64-linux-gnu" strategy: fail-fast: false matrix: - ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3"] + ruby: ["3.0", "3.1", "3.2", "3.3", "3.4-rc"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/download-artifact@v4 with: - name: cruby-aarch64-linux-gem + name: cruby-aarch64-linux-gnu-gem path: pkg - name: Enable execution of multi-architecture containers by QEMU run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - run: | docker run --rm -v "$(pwd):/argon2id" -w /argon2id \ - --platform=linux/arm64/v8 \ + --platform=linux/arm64 \ ruby:${{ matrix.ruby }} \ ./scripts/test-gem-install - test-precompiled-arm-linux: - needs: "precompile-arm-linux" + test-precompiled-aarch64-linux-musl: + needs: "precompile-aarch64-linux-musl" strategy: fail-fast: false matrix: - ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3"] + ruby: ["3.0", "3.1", "3.2", "3.3", "3.4-rc"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/download-artifact@v4 with: - name: cruby-arm-linux-gem + name: cruby-aarch64-linux-musl-gem + path: pkg + - name: Enable execution of multi-architecture containers by QEMU + run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + - run: | + docker run --rm -v "$(pwd):/argon2id" -w /argon2id \ + --platform=linux/arm64 \ + ruby:${{ matrix.ruby }}-alpine \ + sh -c "gem update --system && apk add bash && ./scripts/test-gem-install" + + 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-rc"] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 + with: + name: cruby-arm-linux-gnu-gem path: pkg - name: enable execution of multi-architecture containers by qemu run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes @@ -239,18 +276,39 @@ jobs: ruby:${{ matrix.ruby }} \ ./scripts/test-gem-install - test-precompiled-x86-linux: - needs: "precompile-x86-linux" + 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-rc"] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 + with: + name: cruby-arm-linux-musl-gem + path: pkg + - name: enable execution of multi-architecture containers by qemu + run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + - run: | + docker run --rm -v "$(pwd):/argon2id" -w /argon2id \ + --platform=linux/arm/v7 \ + ruby:${{ matrix.ruby }}-alpine \ + sh -c "gem update --system && apk add bash && ./scripts/test-gem-install" + + test-precompiled-x86-linux-gnu: + needs: "precompile-x86-linux-gnu" strategy: fail-fast: false matrix: - ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3"] + ruby: ["3.0", "3.1", "3.2", "3.3", "3.4-rc"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/download-artifact@v4 with: - name: cruby-x86-linux-gem + name: cruby-x86-linux-gnu-gem path: pkg - name: Enable execution of multi-architecture containers by QEMU run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes @@ -260,12 +318,33 @@ jobs: ruby:${{ matrix.ruby }} \ ./scripts/test-gem-install - test-precompiled-x86_64-linux: - needs: "precompile-x86_64-linux" + test-precompiled-x86-linux-musl: + needs: "precompile-x86-linux-musl" strategy: fail-fast: false matrix: - ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3"] + ruby: ["3.0", "3.1", "3.2", "3.3", "3.4-rc"] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 + with: + name: cruby-x86-linux-musl-gem + path: pkg + - name: Enable execution of multi-architecture containers by QEMU + run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + - run: | + docker run --rm -v "$(pwd):/argon2id" -w /argon2id \ + --platform=linux/386 \ + ruby:${{ matrix.ruby }}-alpine \ + sh -c "gem update --system && apk add bash && ./scripts/test-gem-install" + + 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"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -275,18 +354,36 @@ jobs: bundler-cache: true - uses: actions/download-artifact@v4 with: - name: cruby-x86_64-linux-gem + name: cruby-x86_64-linux-gnu-gem path: pkg - run: ./scripts/test-gem-install env: BUNDLE_PATH: ${{ github.workspace }}/vendor/bundle + test-precompiled-x86_64-linux-musl: + needs: "precompile-x86_64-linux-musl" + strategy: + fail-fast: false + matrix: + ruby: ["3.0", "3.1", "3.2", "3.3", "3.4-rc"] + runs-on: ubuntu-latest + container: + image: "ruby:${{ matrix.ruby }}-alpine" + steps: + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 + with: + name: cruby-x86_64-linux-musl-gem + path: pkg + - run: apk add bash + - run: ./scripts/test-gem-install + test-precompiled-arm64-darwin: needs: "precompile-arm64-darwin" strategy: fail-fast: false matrix: - ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3"] + ruby: ["3.0", "3.1", "3.2", "3.3", "3.4.0-rc1"] runs-on: macos-14 steps: - uses: actions/checkout@v4 @@ -307,7 +404,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3"] + ruby: ["3.0", "3.1", "3.2", "3.3", "3.4.0-rc1"] runs-on: macos-13 steps: - uses: actions/checkout@v4 @@ -345,7 +442,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["3.1", "3.2", "3.3"] + ruby: ["3.1", "3.2", "3.3", "head"] runs-on: windows-2022 steps: - uses: actions/checkout@v4 @@ -364,16 +461,12 @@ jobs: test-precompiled-x64-mingw32: needs: "precompile-x64-mingw32" - strategy: - fail-fast: false - matrix: - ruby: ["2.6", "2.7", "3.0"] runs-on: windows-2019 steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: "${{ matrix.ruby }}" + ruby-version: "3.0" bundler-cache: true - uses: actions/download-artifact@v4 with: @@ -384,24 +477,6 @@ jobs: env: BUNDLE_PATH: ${{ github.workspace }}/vendor/bundle - test-precompiled-x86_64-alpine: - needs: "precompile-x86_64-linux" - strategy: - fail-fast: false - matrix: - ruby: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3"] - runs-on: ubuntu-latest - container: - image: "ruby:${{ matrix.ruby }}-alpine" - steps: - - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 - with: - name: cruby-x86_64-linux-gem - path: pkg - - run: apk add bash libstdc++ gcompat - - run: ./scripts/test-gem-install - ruby-memcheck: runs-on: "ubuntu-latest" env: @@ -410,7 +485,7 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby-pkgs@v1 with: - ruby-version: "3.3" + ruby-version: "3.4.0-rc1" apt-get: valgrind bundler-cache: true - run: bundle exec rake test:valgrind diff --git a/README.md b/README.md index d880dd1..ef1bb78 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/) 2.6 to 3.3 +* [Ruby](https://www.ruby-lang.org/en/) 3.0 to 3.4.0-rc1 * [JRuby](https://www.jruby.org) 9.4 * [TruffleRuby](https://www.graalvm.org/ruby/) 24.1 @@ -271,9 +271,8 @@ This gem requires any of the following to run: Where possible, a pre-compiled native gem will be provided for the following platforms: * Linux - * `aarch64-linux` and `arm-linux` (requires [glibc](https://www.gnu.org/software/libc/) 2.29+) - * `x86-linux` and `x86_64-linux` (requires [glibc](https://www.gnu.org/software/libc/) 2.17+) - * [musl](https://musl.libc.org/)-based systems such as [Alpine](https://alpinelinux.org) are supported as long as a [glibc-compatible library is installed](https://wiki.alpinelinux.org/wiki/Running_glibc_programs) + * `aarch64-linux`, `arm-linux`, `x86-linux`, `x86_64-linux` (requires [glibc](https://www.gnu.org/software/libc/) 2.29+, RubyGems 3.3.22+ and Bundler 2.3.21+) + * [musl](https://musl.libc.org/)-based systems such as [Alpine](https://alpinelinux.org) are supported with Bundler 2.5.6+ * macOS `x86_64-darwin` and `arm64-darwin` * Windows `x64-mingw32` and `x64-mingw-ucrt` * Java: any platform running JRuby 9.4 or higher diff --git a/Rakefile b/Rakefile index d0621dc..3736cb8 100644 --- a/Rakefile +++ b/Rakefile @@ -5,18 +5,22 @@ require "minitest/test_task" CLEAN.add("lib/**/*.{o,so,bundle}", "pkg") cross_platforms = %w[ - aarch64-linux - arm-linux + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-musl arm64-darwin x64-mingw-ucrt x64-mingw32 - x86-linux + x86-linux-gnu + x86-linux-musl x86-mingw32 x86_64-darwin - x86_64-linux + x86_64-linux-gnu + x86_64-linux-musl ].freeze -ENV["RUBY_CC_VERSION"] = %w[3.3.0 3.2.0 3.1.0 3.0.0 2.7.0 2.6.0].join(":") +ENV["RUBY_CC_VERSION"] = %w[3.4.0 3.3.5 3.2.0 3.1.0 3.0.0].join(":") gemspec = Gem::Specification.load("argon2id.gemspec") diff --git a/argon2id.gemspec b/argon2id.gemspec index 8a59cf0..ecb1f95 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.5") + s.add_development_dependency("rake-compiler-dock", "~> 1.7.0.rc1") s.add_development_dependency("minitest", "~> 5.25") end