Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TruffleRuby head to CI #1246

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
code-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.0
- name: Gems cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/gems
key: gems-3.0.0-${{ hashFiles('*.gemspec', 'Gemfile') }}-${{ github.sha }}
Expand Down Expand Up @@ -47,13 +47,13 @@ jobs:
- ruby-head
- jruby-9.3
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Gems cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/gems
key: gems-${{ matrix.ruby }}-${{ hashFiles('*.gemspec', 'Gemfile') }}-${{ github.sha }}
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/experimental.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Experimental

on:
schedule:
- cron: "6 20 * * 6"
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby:
- truffleruby-head
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Gems cache
uses: actions/cache@v3
with:
path: ~/gems
key: gems-${{ matrix.ruby }}-${{ hashFiles('*.gemspec', 'Gemfile') }}-${{ github.sha }}
restore-keys: |
gems-${{ matrix.ruby }}-${{ hashFiles('*.gemspec', 'Gemfile') }}-
gems-${{ matrix.ruby }}-
- name: Install dependencies
run: |
gem install bundler
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is redundant, setup-ruby already install Bundler

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm aware of that, but there was a desire by the maintainer to be consistent with ci.yml. And as I recall a previous suggestion for removing that line from ci.yml was not accepted.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh OK then fair enough

bundle config path ~/gems
bundle install --jobs 4 --retry 3
- name: Run tests
run: bundle exec rake spec
13 changes: 6 additions & 7 deletions spec/prawn_manual_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
require 'digest/sha2'

MANUAL_HASH =
case RUBY_ENGINE
when 'ruby'
'2c0279e0bff2a9120494a52aa46216c1871902b5e66a3537bd4d3cbd66db0096b43b6e1ae0e4e189b561c4db9fa1afacb6c41f260e3aaf942faae2fee352d35b'
when 'jruby'
'51baf6440907e9e38d22f50deafa91572aec1174e621c044ae077cfe3d4361982a505dae5f013dd06f64f38cb9b3a38d5a3f8f0903849591774e298a3c91d39a'
end
{
'ruby' => '2c0279e0bff2a9120494a52aa46216c1871902b5e66a3537bd4d3cbd66db0096b43b6e1ae0e4e189b561c4db9fa1afacb6c41f260e3aaf942faae2fee352d35b',
'jruby' => '51baf6440907e9e38d22f50deafa91572aec1174e621c044ae077cfe3d4361982a505dae5f013dd06f64f38cb9b3a38d5a3f8f0903849591774e298a3c91d39a',
'truffleruby' => '9cab8cd0736f239058ce8dc4b2915fe014e1461d434de456d9fbf140c2b69553f39accbe9acb38b974efd1e7d3e5dfddf77e99e0bdba56f43a8746a0e5fcf37b'
}.freeze
Comment on lines +7 to +11
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wander why you changed it to a hash

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pointlessone To satisfy Rubocop


RSpec.describe Prawn do
describe 'manual' do
Expand All @@ -27,7 +26,7 @@

hash = Digest::SHA512.hexdigest(s)

expect(hash).to eq MANUAL_HASH
expect(hash).to eq MANUAL_HASH[RUBY_ENGINE]
end
end
end