diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a77b87c..021eca92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,14 @@ on: - '*' jobs: + ruby_versions: + outputs: + setup_ruby: "['3.1', '3.2', '3.3', 'head']" + image_tag: "['3.1', '3.2', '3.3', '3.4-rc']" + runs-on: ubuntu-latest + steps: + - run: echo "generating rubies ..." + # # basic tests # @@ -45,12 +53,12 @@ jobs: - run: bundle exec rake test test: - needs: basic + needs: [basic, ruby_versions] strategy: fail-fast: false matrix: os: [ubuntu, macos, windows] - ruby: ["3.3", "3.2", "3.1"] + ruby: ${{ fromJSON(needs.ruby_versions.outputs.setup_ruby) }} syslib: [enable, disable] include: # additional compilation flags for homebrew @@ -117,12 +125,12 @@ jobs: bundle exec rake test sqlcipher: - needs: basic + needs: [basic, ruby_versions] strategy: fail-fast: false matrix: os: [ubuntu, macos, windows] - ruby: ["3.3", "3.1"] # oldest and newest + ruby: ${{ fromJSON(needs.ruby_versions.outputs.setup_ruby) }} include: - { os: windows, ruby: mingw } - { os: windows, ruby: mswin } @@ -207,13 +215,13 @@ jobs: retention-days: 1 install_source_linux: - needs: build_source_gem + needs: [build_source_gem, ruby_versions] name: "test source" strategy: fail-fast: false matrix: os: [ubuntu, macos, windows] - ruby: ["3.3", "3.2", "3.1"] + ruby: ${{ fromJSON(needs.ruby_versions.outputs.setup_ruby) }} syslib: [enable, disable] include: # additional compilation flags for homebrew @@ -270,7 +278,7 @@ jobs: test_architecture_matrix: name: "${{ matrix.platform }} ${{ matrix.ruby }}" - needs: build_native_gem + needs: [build_native_gem, ruby_versions] strategy: fail-fast: false matrix: @@ -283,7 +291,7 @@ jobs: - x86-linux-musl - x86_64-linux-gnu - x86_64-linux-musl - ruby: ["3.3", "3.2", "3.1"] + ruby: ${{ fromJSON(needs.ruby_versions.outputs.image_tag) }} include: # declare docker image for each platform - { platform: aarch64-linux-musl, docker_tag: "-alpine", bootstrap: "apk add build-base &&" } @@ -315,25 +323,18 @@ jobs: test_the_rest: name: "${{ matrix.platform }} ${{ matrix.ruby }}" - needs: build_native_gem + needs: [build_native_gem, ruby_versions] strategy: fail-fast: false matrix: os: [windows-latest, macos-13, macos-14] - ruby: ["3.3", "3.2", "3.1"] + ruby: ${{ fromJSON(needs.ruby_versions.outputs.setup_ruby) }} include: - os: macos-13 platform: x86_64-darwin - os: macos-14 platform: arm64-darwin - os: windows-latest - ruby: "3.1" - platform: x64-mingw-ucrt - - os: windows-latest - ruby: "3.2" - platform: x64-mingw-ucrt - - os: windows-latest - ruby: "3.3" platform: x64-mingw-ucrt runs-on: ${{ matrix.os }} steps: @@ -360,6 +361,7 @@ jobs: - { ruby: "3.2", flavor: "alpine3.19" } - { ruby: "3.3", flavor: "alpine3.18" } - { ruby: "3.3", flavor: "alpine3.19" } + - { ruby: "3.4-rc", flavor: "alpine" } runs-on: ubuntu-latest container: image: ruby:${{matrix.ruby}}-${{matrix.flavor}} diff --git a/Gemfile b/Gemfile index c92effff..9a31a000 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,7 @@ group :development do gem "minitest", "5.25.4" gem "rake-compiler", "1.2.8" - gem "rake-compiler-dock", "1.5.2" + gem "rake-compiler-dock", "1.7.0.rc1" gem "ruby_memcheck", "3.0.0" if Gem::Platform.local.os == "linux" diff --git a/bin/test-gem-file-contents b/bin/test-gem-file-contents index 8ae6bea7..52a201fd 100755 --- a/bin/test-gem-file-contents +++ b/bin/test-gem-file-contents @@ -65,7 +65,7 @@ Minitest::Reporters.use!([Minitest::Reporters::SpecReporter.new]) puts "Testing '#{gemfile}' (#{gemspec.platform})" describe File.basename(gemfile) do - let(:supported_ruby_versions) { ["3.1", "3.2", "3.3"] } + let(:supported_ruby_versions) { ["3.1", "3.2", "3.3", "3.4"] } describe "setup" do it "gemfile contains some files" do diff --git a/rakelib/native.rake b/rakelib/native.rake index 4d29758e..1895b8d0 100644 --- a/rakelib/native.rake +++ b/rakelib/native.rake @@ -6,19 +6,19 @@ require "rake/extensiontask" require "rake_compiler_dock" require "yaml" -cross_rubies = ["3.3.0", "3.2.0", "3.1.0"] +cross_rubies = ["3.4.0", "3.3.5", "3.2.0", "3.1.0"] cross_platforms = [ "aarch64-linux-gnu", "aarch64-linux-musl", "arm-linux-gnu", "arm-linux-musl", - "arm64-darwin", - "x64-mingw-ucrt", "x86-linux-gnu", "x86-linux-musl", - "x86_64-darwin", "x86_64-linux-gnu", - "x86_64-linux-musl" + "x86_64-linux-musl", + "arm64-darwin", + "x86_64-darwin", + "x64-mingw-ucrt" ] ENV["RUBY_CC_VERSION"] = cross_rubies.join(":")