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
8253424: Add support for running pre-submit testing using GitHub Actions #284
Conversation
|
/label add build |
@rwestberg |
Webrevs
|
Is there any way to derive the version strings for dependencies from a different source? Once pushed, this file will require updating whenever the bootjdk, jtreg version or gtest version is updated. |
Certainly, the prerequisites step can checkout additional repositories and run shell commands to extract variables to be used for later steps. Do we have any suitable source for these versions? We'll also need download links for the different flavors of the bootjdk (and ideally the sha256 hash, although the verification step could perhaps be skipped). |
We don't have a good source currently no, but something to keep in mind. Ideally we would want to create a common source for both jib-profiles.js and the gitactions to read from. I would prefer something that can be read both as a properties file and sourced as a shell script, much like the version-numbers file currently is. That could be done as a separate change though. |
Sure, should not be that hard to parse something similar. The GitHub actions will probably need it in JSON format at some point, but nothing a little
|
The other primary consumer of this is make/conf/jib-profiles.js. The make/conf dir would make sense to me. The challenge here is creating a set of variables that are suitable enough for both config files to consume. For BootJDK, we never bothered with bumping the version for updates, and I very much doubt we will do that in the future for github actions, so a plain major version 14, and soon 15, would be preferred from my point of view. This is however not enough for jib-profiles.js (yet) so we can't really share bootjdk config for now anyway. For jtreg, we specify 5.1 and b01 as two separate metadata values. For gtest we specify the version as 1.8.1. |
@rwestberg To determine the appropriate audience for reviewing this pull request, one or more labels corresponding to different subsystems will normally be applied automatically. However, no automatic labelling rule matches the changes in this pull request. In order to have an RFR email automatically sent to the correct mailing list, you will need to add one or more labels manually using the |
I added |
The version-numbers file (which is also a shared properties style file) is not using quotes for values, which is fine as long as there are no spaces. I believe if you read it as a properties file, you need to strip the quotes if you have them. I prefer if version-numbers and test-dependencies using the same format. Otherwise this looks good to me! |
Sounds reasonable, didn't notice that discrepancy! Fixed in the latest commit. |
After some feedback on the jdk-dev mailing list (thanks @jaikiran!) I took a second look at removing artifacts that are only created for passing between the build and test steps. Turns out that there is an API for this (it's still in preview, but seems to work fine) that can be used for this. When this API is finalized we can update that part, but it's not a deal-breaker even if it should change, as the test runs will still complete successfully. With this API available, it's also possible to publish a single artifact containing all test results, regardless of outcome. |
@rwestberg This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 84 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
|
/integrate |
@rwestberg Since your change was applied there have been 84 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 840aa2b. |
Mailing list message from Magnus Ihse Bursie on build-dev: On 2020-09-23 19:27, Erik Joelsson wrote:
I've been away for a while, but now I'm back -- with a royal backlog. :) On a related note, I *really* think we should move the version-numbers I'm happy that you put the new test-dependencies file in make/conf, though! /Magnus |
A few days ago I posted an initial version of the necessary configuration required to run pre-submit build and tests for JDK main-line contributions using GitHub Actions [2] and the free tier [3] available to everyone working with open source repositories. I've incorporated the feedback into an updated version that I believe is ready to be integrated.
If this is integrated into the
master
branch, future branches created and updated in personal forks will build and run the basic tier 1 tests as described in this configuration, on Linux, Windows and macOS (all on x64). It's of course possible for any contributor to opt out fully or partially of these automatic runs in a few different ways.To opt out completely, a contributor can simply disable GitHub Actions on their personal fork, and no further jobs will be executed. Another option is to add a repository secret [4] with the name
JDK_SUBMIT_FILTER
set to any value. If this is set, only branches prefixed withsubmit/
will be subject to automatic build and test. This can also be further refined by adding a repository secret namedJDK_SUBMIT_PLATFORMS
with a value such asLinux x64, Windows x64
to limit automatic build and test to these two platforms. It will still be possible to run the tests on any branch and/or platform by manually triggering the workflow.To see what this looks like in practice, an example run can be found here: https://github.com/rwestberg/jdk/actions/runs/265131985 (note that there is currently a failing test on Windows which is tracked by JDK-8249095, which should probably be resolved before this change is integrated).
Best regards,
Robin
[1] https://mail.openjdk.java.net/pipermail/jdk-dev/2020-September/004736.html
[2] https://github.com/features/actions
[3] https://docs.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits
[4] https://docs.github.com/en/actions/reference/encrypted-secrets
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/284/head:pull/284
$ git checkout pull/284