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

Add TruffleRuby in CI #1189

wants to merge 2 commits into from

Conversation

eregon
Copy link

@eregon eregon commented Dec 30, 2020

I marked as a Draft PR because there is some spec failing with OutOfMemoryError on TruffleRuby.

This was referenced Dec 30, 2020
@pointlessone
Copy link
Member

@eregon Will you be interested in supporting Prawn on TruffleRuby?

@eregon
Copy link
Author

eregon commented Jan 16, 2021

Yes, as in I'd check the CI (via https://github.com/eregon/truffleruby-gem-tracker) and if it fails I'd take a look at it and fixing whatever issue there is.

@eregon eregon force-pushed the truffleruby-ci branch 2 times, most recently from 1f2b142 to 281239a Compare January 16, 2021 13:59
@eregon eregon marked this pull request as ready for review January 16, 2021 13:59
Rakefile Outdated Show resolved Hide resolved
@eregon
Copy link
Author

eregon commented Jan 16, 2021

Rebased, and I removed the commits related to #1190.

@eregon eregon changed the title Use bundler-cache and add TruffleRuby in CI Add TruffleRuby in CI Jan 16, 2021
@@ -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?

@eregon
Copy link
Author

eregon commented Feb 10, 2022

Closing in favor of #1246

@eregon eregon closed this Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants