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

ci: build by java high version and test by multi java versions(WIP) #478

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

oldratlee
Copy link
Contributor

@oldratlee oldratlee commented Jan 1, 2024

Still WIP... 🚧 the implemetation codes need be simplified and polished.

The reasons to create the WIP PR:

  • show the working progress
  • ask questions
  • get feedback early

Work items and their progress

  • update GitHub Actions config(.github/workflows/maven.yml) and add running script(scripts/integration-test.sh)
    • build/compile/test with java 21 by mvn package
    • test with multiply java versions(e.g. 8/11.0.3/11/17) by mvn surefire:test
  • fix test cases failure with java 8
  • ...

Related infos

@oldratlee
Copy link
Contributor Author

oldratlee commented Jan 1, 2024

Is the specified old java version 11.0.3 in CI significant?

os: [ ubuntu-latest ]
java-version: [ 11.0.3, 11 ]
steps:

If the newest Java 11 version is enough and remove 11.0.3 in CI,
the CI script(scripts/integration-test.sh) could be simplified a lot.


Found the info about adding the specified java version 11.0.3 in commit b7838d4 by @carldea:

Using TCK Tested JDK builds of OpenJDK

The AdoptOpenJDK has been discontinued since July 2021. When using Zulu you get all the latest updated (TCK Tested) builds for all versions of OpenJDK.

Also added are fixed (major) release version(s) such as 11.0.3.

This is often a good practice whenever a build/test triggers (push/pull events) this can determine if the latest JDK (11) had failed the build vs something in your code that caused it.

For example, when building with JDK 11.0.3 (fixed version) the build passes (green) and JDK 11 fails (red) will mean that the latest JDK (11) was the cause and not your code.

@carldea

I agree that "adding an old fixed (major) release version(s)" is often a good practice.

Because

  • after introducing "build by java high version and test by multi java versions (LTS 8/11/17/21)", "adding an old fixed (major) release version(s)" practice adding many old versions into a workflow
  • if the CI run continuously, it's possible to "determine if the latest JDK (11) had failed"
  • if "the latest JDK (11) had failed" happened(low probability case & can not be ignored), can add a new workflow to reproduce the case

, how about removing the specified old java version 11.0.3 in CI?

@oldratlee oldratlee force-pushed the ci/build-by-java-high-version-and-test-by-multi-java-versions branch 2 times, most recently from 54dee7d to e674484 Compare January 2, 2024 05:38
@oldratlee oldratlee force-pushed the ci/build-by-java-high-version-and-test-by-multi-java-versions branch from e674484 to 3150ccb Compare January 2, 2024 06:10
@oldratlee oldratlee marked this pull request as draft January 2, 2024 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant