Skip to content

Merge pull request #131 from rubygems/dependabot/github_actions/githu… #216

Merge pull request #131 from rubygems/dependabot/github_actions/githu…

Merge pull request #131 from rubygems/dependabot/github_actions/githu… #216

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-24.04 }
- { name: macOS, value: macos-14 }
- { name: Windows, value: windows-2022 }
ruby:
- { name: "3.1", value: 3.1.4 }
- { name: "3.2", value: 3.2.2 }
- { name: "3.3", value: 3.3.6 }
include:
- ruby: { name: jruby-9.4, value: jruby-9.4.9.0 }
os: { name: Ubuntu, value: ubuntu-24.04 }
- ruby: { name: truffleruby-24, value: truffleruby-24.1.0 }
os: { name: Ubuntu, value: ubuntu-24.04 }
- os: { name: Windows, value: windows-2022 }
ruby: { name: mswin, value: mswin }
- os: { name: Ubuntu, value: ubuntu-24.04 }
ruby: { name: ruby-head, value: ruby-head }
- os: { name: Ubuntu, value: ubuntu-24.04 }
ruby: { name: truffleruby-head, value: truffleruby-head }
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup ruby (Ubuntu/macOS)
uses: ruby/setup-ruby@44511735964dcb71245e7e55f72539531f7bc0eb # v1.257.0
with:
ruby-version: ${{ matrix.ruby.value }}
bundler-cache: true
- 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: bin/rake spec
if: "!startsWith(matrix.ruby.name, 'truffleruby') && !startsWith(matrix.ruby.name, 'jruby')"
- name: Run Test (JRuby)
run: JRUBY_OPTS=--debug bin/rake spec
if: startsWith(matrix.ruby.name, 'jruby')
- name: Run Test (Truffleruby)
run: TRUFFLERUBYOPT="--experimental-options --testing-rubygems" bin/rake spec
if: startsWith(matrix.ruby.name, 'truffleruby')
timeout-minutes: 20