eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.27k stars 721 forks source link

Create a github workflow for PR testing #9570

Open smlambert opened 4 years ago

smlambert commented 4 years ago

As we have recently encountered network issues (https://github.com/eclipse/openj9/issues/9560), we are very short of xlinux/mac machines and do not have capacity to adequately cover PR testing, we can put a workflow in place to help cover the gap.

2 github actions we will use for this workflow file (recently demonstrated in the OpenJ9 community call):

related: https://github.com/eclipse/openj9/issues/9547

pshipton commented 4 years ago

we can start with a push to master as the trigger, but can also discuss other ways one might trigger this

I'll note that master is supposed to always be in a working state, with changes pre-tested before they are pushed there, so we'll want to have that discussion.

Also, not to knock this, but fyi someone noticed there is a 2000 min (33.3 h) time limit per month in the free tier, which we will quickly reach considering each build and test is ~2+ hours linear time.

smlambert commented 4 years ago

Yep, we should also look at what enterprise gets you $21/month for 50,000min per month, but fair enough, we can just fix our infra problems and not go this route.

smlambert commented 4 years ago

At free tier, we can do 16 PRs per month, at enterprise tier we can do over 400 PRs per month.

DanHeidinga commented 4 years ago

How does github determine the 2000 minutes? Is that shared across the Eclipse foundation? Or per repo?

I wasn't clear on that from my quick glance thru the documentation

smlambert commented 4 years ago

Or per developer... wink! I believe its per public repo. See https://help.github.com/en/github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-actions

Also note that the administrator of the repo can set rules around what types of actions can be run...

Screen Shot 2020-05-15 at 11 45 23 AM

When I was at DevNexus, I spoke with someone from another Eclipse project that was using workflows heavily, I am guessing they have something more than free tier, but I did not think to ask.

smlambert commented 4 years ago

There is also a minute multiplier for macOS/win apparently. linux 1 min == 1 min, macOS 1 min == 10 min windows 1 min == 2 min

pshipton commented 4 years ago

The page mentions multiple times "GitHub Actions usage is free for public repositories." so maybe we don't have a limit. I read it as the 2000 min limit is for private repos.

pshipton commented 4 years ago

we can start with a push to master as the trigger, but can also discuss other ways one might trigger this

IMO it should be triggered via a comment, like the existing PR testing, if that is possible. So a committer can trigger it on demand once initial reviews are completed and there are no dependencies.

There is a issue_comment event with activity created, but like current PR testing we'd have to parse the comment and look for keywords before triggering the action.

Otherwise, they aren't quite right but

smlambert commented 4 years ago

The exercise is to offload some testing onto Github runners, perhaps we should not target the PR testing, but rather some of the nightly testing, while we discuss the various ways we could or should trigger PR testing.

Nightly can be triggered by a schedule, example:

on:
schedule:
  - cron:  '*/15 * * * 1-5'