diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aaea924191..8942ecf288 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,35 +5,28 @@ on: - pull_request jobs: + ruby-versions: + uses: ruby/actions/.github/workflows/ruby_versions.yml@master + with: + min_version: 2.4 + host: + needs: ruby-versions name: ${{ matrix.os }} ${{ matrix.ruby }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: + ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }} os: - ubuntu-latest - macos-latest - windows-latest - ruby: - - '2.4' - - '2.5' - - '2.6' - - '2.7' - - '3.0' - - '3.1' - - '3.2' - - debug - # We need to update 'jruby-XXX' in "if:" too when we update - # this. - - jruby-9.4.5.0 - - truffleruby - - truffleruby-head include: - { os: windows-latest , ruby: mingw } - { os: windows-latest , ruby: mswin } exclude: - - { os: windows-latest , ruby: debug } + - { os: windows-latest , ruby: head } - { os: windows-latest , ruby: truffleruby } - { os: windows-latest , ruby: truffleruby-head } @@ -52,7 +45,7 @@ jobs: # "gem install pkg/*.gem" fails. - run: bundle exec rake version:bump if: >- - matrix.ruby == 'debug' || + matrix.ruby == 'head' || matrix.ruby == 'mingw' || matrix.ruby == 'mswin' @@ -61,7 +54,7 @@ jobs: - uses: actions/upload-artifact@v4 if: >- matrix.os == 'ubuntu-latest' && - (matrix.ruby == '3.1' || matrix.ruby == 'jruby-9.4.5.0') + (matrix.ruby == '3.3' || matrix.ruby == 'jruby') with: name: gem-${{ matrix.os }}-${{ matrix.ruby }} path: pkg/ @@ -70,7 +63,7 @@ jobs: if: >- startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest' && - (matrix.ruby == '3.1' || matrix.ruby == 'jruby-9.4.5.0') + (matrix.ruby == '3.3' || matrix.ruby == 'jruby') run: | ruby \ -e 'print("## strscan "); \