Skip building on TruffleRuby #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
- push | |
- pull_request | |
jobs: | |
host: | |
name: >- | |
${{ matrix.os }} ${{ matrix.ruby }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-12 | |
- macos-14 | |
- ubuntu-latest | |
- windows-latest | |
ruby: | |
- '2.5' | |
- '2.6' | |
- '2.7' | |
- '3.0' | |
- '3.1' | |
- '3.2' | |
- debug | |
include: | |
- { os: windows-latest , ruby: mingw } | |
- { os: windows-latest , ruby: mswin } | |
exclude: | |
- { os: macos-14 , ruby: '2.5' } | |
- { os: windows-latest , ruby: '3.0' } | |
- { os: windows-latest , ruby: debug } | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
- run: bundle install | |
- run: rake compile | |
# If Fiddle in Ruby's master has the same version of this Fiddle, | |
# "gem install pkg/*.gem" fails. | |
- run: rake version:bump | |
if: >- | |
matrix.ruby == 'debug' || | |
matrix.ruby == 'mingw' || | |
matrix.ruby == 'mswin' | |
- run: rake build | |
- run: gem install pkg/*.gem | |
- run: rake test | |
env: | |
RUBYOPT: --disable=gems | |
- name: Run test against installed gem | |
# We can't use Fiddle gem with RubyInstaller because | |
# RubyInstaller requires Fiddle before rubygems is loaded: | |
# https://github.com/oneclick/rubyinstaller2/blob/master/lib/ruby_installer/build/dll_directory.rb#L1 | |
if: >- | |
matrix.os != 'windows-latest' || | |
(matrix.os == 'windows-latest' && matrix.ruby == 'mswin') | |
run: | | |
ruby -run -e cp -- -pr test/ tmp/ | |
cd tmp | |
ruby test/run.rb | |
docker: | |
name: >- | |
${{ matrix.service }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
service: | |
- fedora-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: docker compose build ${{ matrix.service }} | |
- run: docker compose run --rm ${{ matrix.service }} |