Skip to content

Commit

Permalink
Add TruffleRuby in CI (#1079)
Browse files Browse the repository at this point in the history
* Add TruffleRuby in CI

* Remove continue-on-error in unstable.yml workflow

* This is a daily job, the failures only appear in the Actions tab so
  there seems to be little value to hide it.

* Add comment about running only rake spec on truffleruby
  • Loading branch information
eregon committed Apr 15, 2024
1 parent a9a9dcc commit 99c0040
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/stable.yml
Expand Up @@ -19,6 +19,7 @@ jobs:
- '3.2'
- '3.3'
- jruby-9.4
- truffleruby

steps:
- uses: actions/checkout@v4
Expand All @@ -28,5 +29,13 @@ jobs:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true

- run: |
bundle exec rake
- name: Run tests
run: bundle exec rake
if: matrix.ruby-version != 'truffleruby'

# Run only `rake spec` on truffleruby, because just `rake` runs `rubocop spec cucumber`.
# There is no value to rerun rubocop here.
# cucumber fails because it uses an old childprocess which depends on fork.
- name: Run specs (truffleruby)
run: bundle exec rake spec
if: matrix.ruby-version == 'truffleruby'
15 changes: 11 additions & 4 deletions .github/workflows/unstable.yml
Expand Up @@ -17,6 +17,7 @@ jobs:
ruby-version:
- ruby-head
- jruby-head
- truffleruby-head

steps:
- uses: actions/checkout@v4
Expand All @@ -25,8 +26,14 @@ jobs:
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
continue-on-error: ${{ (matrix.ruby-version == 'ruby-head') || (matrix.ruby-version == 'jruby-head') }}

- run: |
bundle exec rake
continue-on-error: ${{ (matrix.ruby-version == 'ruby-head') || (matrix.ruby-version == 'jruby-head') }}
- name: Run tests
run: bundle exec rake
if: matrix.ruby-version != 'truffleruby-head'

# Run only `rake spec` on truffleruby, because just `rake` runs `rubocop spec cucumber`.
# There is no value to rerun rubocop here.
# cucumber fails because it uses an old childprocess which depends on fork.
- name: Run specs (truffleruby)
run: bundle exec rake spec
if: matrix.ruby-version == 'truffleruby-head'
2 changes: 2 additions & 0 deletions spec/return_codes_spec.rb
Expand Up @@ -34,6 +34,8 @@
end

it "prints a message to STDERR" do
# https://github.com/oracle/truffleruby/issues/3535
skip "fails on truffleruby" if RUBY_ENGINE == "truffleruby" && command.include?("testunit_bad.rb")
expect(@stderr).to match(/stopped.+SimpleCov.+previous.+error/i)
end
end
Expand Down

0 comments on commit 99c0040

Please sign in to comment.