-
Notifications
You must be signed in to change notification settings - Fork 130
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
Create ci.yml to build with GitHub Actions #1254
Conversation
I don't think the test failure
is related to this change. Is this test known as somewhat flaky? |
So the test indeed seems flaky, as it was already reported in #420 (comment) |
uses: actions/setup-java@v3 | ||
with: | ||
java-version: | | ||
8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it mean, ecj will run on Java 8? That is not possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it just makes Java 8 will be available on the CI machine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and why do we need Java 8 on CI machine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tycho requires Java 8 to properly resolve Java 8 APIs. It can be turned off and the current Java runtime can be used instead (Java 17), but we've seen cases where some API disappear in newer versions and thus the code targetting Java 8 that cannot be compiled any longer by Java 17.
IIRC, Java 8 is also installed on Jenkins and configured in java toolchains.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the code targetting Java 8 that cannot be compiled any longer by Java 17.
We do not have code targeting Java 8 AFAIK, and annotations don't use any Java 8 specific API's, so why all this overhead adding something we don't need?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to ensure compatibility with Java 8 if you target Java 8 (in https://github.com/eclipse-jdt/eclipse.jdt.core/blob/master/org.eclipse.jdt.annotation_v1/META-INF/MANIFEST.MF#L8 ). Compatibility cannot be verified at build-time without a Java 8 installation being visible to Tycho.
The build config here is similar to Jenkins one. I wouldn't make it a requirement to chnage the build config to something too different from "main" build.
If you wish to get rid of the requirement of having Java 8 installed for build to succeed, please open another issue; it can be changed from pom.xml, but this would also affect the Jenkins build. It's another topic.
17 | ||
20 | ||
mvn-toolchain-id: | | ||
JavaSE-1.8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here also Java 8?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is a specific Tycho/OSGi label here: tycho wants a toolchain that has the BREE name as id to properly resolve it, and for Java 8, it's JavaSE-1.8. See eclipse-tycho/tycho#2670 .
Note that this particular workaround is necessary for the older org.eclipse.jdt.annotations bundle only.
@rgrunber Anything left that prevents from merging here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there's no other opposition, I'll merge this soon after the freeze ?
@mickaelistria , wait I assume branch freeze policy still applies so we're waiting until 4.30..
Releng improvements (like this one) are in general not under freeze together with docs/examples/tests changes. |
* --batch-mode * remove extra space * split commands as 2 lines.
Thank you! That will be pretty useful for people willing to experiment with JDT to have CI enabled out-of-the-box in their fork! |
@mickaelistria Seems you're not done here, see https://www.eclipse.org/lists/jdt-dev/msg02287.html |
Thanks for the heads-up and sorry for this inconvenience. I hope #1389 fixes it. |
What it does
Adds GitHub action that validates branches and PRs.
Compared to Jenkinsfile, this workflow can easily be used to enable validation in forks, just by enabling GitHub actions on the forked repository. So it makes it almost free for contributors to get some CI validation, and thus to provide higher quality PRs more easily.
Author checklist