Skip to content

Extract generate_index command to rubygems-generate_index gem #17

Extract generate_index command to rubygems-generate_index gem

Extract generate_index command to rubygems-generate_index gem #17

Workflow file for this run

name: rubygems
on:
pull_request:
push:
branches:
- master
concurrency:
group: ci-${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
rubygems:
name: Rubygems on ${{ matrix.os.name }} (${{ matrix.ruby.name }})
runs-on: ${{ matrix.os.value }}
strategy:
fail-fast: false
matrix:
os:
- { name: Ubuntu, value: ubuntu-22.04 }
- { name: macOS, value: macos-12 }
- { name: Windows, value: windows-2022 }
ruby:
- { name: "2.6", value: 2.6.10 }
- { name: "2.7", value: 2.7.8 }
- { name: "3.0", value: 3.0.6 }
- { name: "3.1", value: 3.1.4 }
- { name: "3.2", value: 3.2.2 }
include:
- ruby: { name: "3.2", value: 3.2.2 }
os: { name: macOS, value: macos-12 }
- ruby: { name: jruby-9.4, value: jruby-9.4.2.0 }
os: { name: Ubuntu, value: ubuntu-22.04 }
- ruby: { name: truffleruby-22, value: truffleruby-22.3.0 }
os: { name: Ubuntu, value: ubuntu-22.04 }
- os: { name: Windows, value: windows-2022 }
ruby: { name: mswin, value: mswin }
- os: { name: Ubuntu, value: ubuntu-22.04 }
ruby: { name: ruby-head, value: ruby-head }
- os: { name: Ubuntu, value: ubuntu-22.04 }
ruby: { name: truffleruby-head, value: truffleruby-head }
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Setup ruby (Ubuntu/macOS)
uses: ruby/setup-ruby@5cfe23c062c0aac352e765b1b7cc12ea5255ccc4 # v1.156.0
with:
ruby-version: ${{ matrix.ruby.value }}
bundler-cache: true
if: matrix.os.name != 'Windows'
- name: Setup ruby (Windows)
uses: ruby/setup-ruby-pkgs@070791aab73b96ab166e572b2e4a0f056c410394 # v1.33.0
with:
ruby-version: ${{ matrix.ruby.value }}
bundler-cache: true
mingw: clang
if: matrix.os.name == 'Windows'
- name: Configure bindgen
shell: pwsh
run: |
echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
echo "BINDGEN_EXTRA_CLANG_ARGS=$((gcm clang).source -replace "bin\clang.exe","include")" >> $env:GITHUB_ENV
if: matrix.ruby.name == 'mswin'
- name: Run Test
run: bundle exec rake test
if: "!startsWith(matrix.ruby.name, 'truffleruby') && !startsWith(matrix.ruby.name, 'jruby')"
- name: Run Test isolatedly
run: bundle exec rake test:isolated
if: matrix.ruby.name == '3.2' && matrix.os.name != 'Windows'
- name: Run Test (JRuby)
run: JRUBY_OPTS=--debug bundle exec rake test
if: startsWith(matrix.ruby.name, 'jruby')
- name: Run Test (Truffleruby)
run: TRUFFLERUBYOPT="--experimental-options --testing-rubygems" bundle exec rake test
if: startsWith(matrix.ruby.name, 'truffleruby')
timeout-minutes: 20