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 in CI #1189

Closed
wants to merge 2 commits into from
Closed
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
- "3.0.0"
- ruby-head
- jruby-9.2
- truffleruby-head
Copy link
Member

Choose a reason for hiding this comment

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

I'm not seeing a job for TruffleRuby in the latest builds. Any idea what might cause that?

Copy link
Author

Choose a reason for hiding this comment

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

It seems due to the workflow using pull_request_target: instead of pull_request:

Copy link
Author

Choose a reason for hiding this comment

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

@pointlessone Any reason why pull_request_target is used?
Could you use the more intuitive pull_request, as documented here ?
Note that changing that in a PR would likely not work, due to how pull_request_target seem to ignore workflow changes in PRs.

Copy link
Member

Choose a reason for hiding this comment

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

When we migrated to GH Actions PR from forks wouldn't trigger CI builds. We've settled on the current setup but I'm not sure if it's entirely correct. I'll read the docs again and see if it needs changing.

Meanwhile, I checked builds on your fork and see that a few specs failed with OOM. I tried locally and for a few specs memory usage goes north of 29GB and the whole test suite takes over 10 min on 400%+ CPU while MRI manages run it on a single core in 13s and a few hundreds MB of RAM. Is this expected or is my TruffleRuby not quite right? I've got mine from rbenv, it's truffleruby 21.1.0-dev-70c024bb.

Copy link
Author

@eregon eregon Jan 16, 2021

Choose a reason for hiding this comment

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

When we migrated to GH Actions PR from forks wouldn't trigger CI builds. We've settled on the current setup but I'm not sure if it's entirely correct. I'll read the docs again and see if it needs changing.

I know that pull_request works just fine, and clearly pull_request_target doesn't work here.
Yes, pull_request needs to be in on: explicitly.

Meanwhile, I checked builds on your fork and see that a few specs failed with OOM. I tried locally and for a few specs memory usage goes north of 29GB and the whole test suite takes over 10 min on 400%+ CPU while MRI manages run it on a single core in 13s and a few hundreds MB of RAM. Is this expected or is my TruffleRuby not quite right? I've got mine from rbenv, it's truffleruby 21.1.0-dev-70c024bb.

Something is definitely not right. There is an upcoming fix related to memory consumption for many String concatenations, that should be merged soon. We'll take a look after that fix is merged.
29GB seems like a pathological case, the GitHub runners have 7GB of RAM, and they seem to OOM reliably on a single test (Prawn::Images::PNG When making a pdf file with png images and the image is Type 6 does not error), so I guess that will be the interesting test to look at.
More CPU usage (in %) is expected, especially for test suites, as the JIT uses those other cores.

Copy link
Member

Choose a reason for hiding this comment

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

pull_request needs to be in on: explicitly.

Thank you. I'll look into it.

There is an upcoming fix related to memory consumption for many String concatenations, that should be merged soon.

Do you mind postponing merging this PR until after it lands?

Copy link
Author

@eregon eregon Jan 16, 2021

Choose a reason for hiding this comment

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

Do you mind postponing merging this PR until after it lands?

Yes of course, the new CI job needs to pass before merging :)

Copy link
Member

Choose a reason for hiding this comment

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

Please ping me when that happens.

Copy link
Author

Choose a reason for hiding this comment

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

I think the OOM error above was related to oracle/truffleruby#2127, which is now fixed.

Could you switch from pull_request_target to pull_request so CI runs on PRs?

steps:
- uses: actions/checkout@v1
- name: Set up Ruby
Expand Down
2 changes: 1 addition & 1 deletion spec/prawn_manual_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

MANUAL_HASH =
case RUBY_ENGINE
when 'ruby'
when 'ruby', 'truffleruby'
'de26db4fe63e024231c0a332203b41305103d877b584a2e98dbd0561bced39f2c066b5c0c96a4686e586a9deb347f099dac4c646446dadb1521a7d4a674ae6fb'
when 'jruby'
'c002ffaf6fe4b2877bd2244735e99c04a4b28b06bc365f343411af052d491660e0d858a956a757ad15a4ed16d6808fc8d726fd683d524f5a3f7c0c8b9566b683'
Expand Down