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

Enhance build matrix in GitHub Actions #2584

Merged
merged 13 commits into from
Jun 11, 2021
Merged

Conversation

vlsi
Copy link
Contributor

@vlsi vlsi commented Jun 4, 2021

This PR enables adding new test dimensions while keeping CI duration under control.

Issues identified:

  • testng build does not work with OpenJ9 JVM (looks like com.sun.management.ThreadMXBean does not exist there)
  • testng does not work with XX:hashCode=2
  • test.yaml.YamlTest > testXmlDependencyGroups sometimes produces a trailing whitespace (windows-related issue?)

@vlsi
Copy link
Contributor Author

vlsi commented Jun 4, 2021

Frankly speaking, I am inclined to rename Java CI with Gradle to Test to make GitHub UI look better.

@vlsi vlsi force-pushed the build_matrix branch 3 times, most recently from ec1ab7f to a0c8f22 Compare June 5, 2021 00:06
@juherr
Copy link
Member

juherr commented Jun 5, 2021

Frankly speaking, I am inclined to rename Java CI with Gradle to Test to make GitHub UI look better.

Lgtm

@vlsi vlsi force-pushed the build_matrix branch 9 times, most recently from 9c8368e to db00051 Compare June 5, 2021 12:30
@vlsi
Copy link
Contributor Author

vlsi commented Jun 5, 2021

I guess the PR is ready.

There is a couple of flaky tests left #2587 and #2586, however, I do not understand what do they test and why do they fail.

Copy link
Member

@juherr juherr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really cool!

.github/workflows/matrix.js Show resolved Hide resolved
// Zulu
{group: 'Zulu', version: '8', distribution: 'zulu'},
{group: 'Zulu', version: '11', distribution: 'zulu'},
{group: 'Zulu', version: '16', distribution: 'zulu'},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are only supporting the 2 latest LTS (8 + 11 and 11 + 17 soon).

Is it possible to have the other version as optional? We did it with Travis and it helps to have an eye on potential issues without breaking the build.
Is it possible to have EAP version as optional? https://jdk.java.net/17/ It will allow us to anticipate issues without breaking the build.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gradle does not support running with Java 17 yet, so building with Java 17 needs to configure toolchain for the build: https://docs.gradle.org/7.0.2/userguide/toolchains.html

.github/workflows/matrix.js Show resolved Hide resolved
settings.gradle.kts Show resolved Hide resolved
testng-asserts/src/test/java/org/testng/AssertTest.java Outdated Show resolved Hide resolved
Copy link
Member

@krmahadevan krmahadevan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vlsi - Is there any reference document that you can perhaps link to and create it as a markdown file so that anyone who wants to enhance this stuff but is not familiar with the matrix workings, can refer to and understand ?

Also please help fix the merge conflicts (I guess it got triggered due to the line endings PR that was merged ahead of this)

@vlsi
Copy link
Contributor Author

vlsi commented Jun 7, 2021

@krmahadevan , I've published the script as https://github.com/vlsi/github-actions-random-matrix
It might be good to move the script to npm in the future, however, the script is small, and having it in testng repository makes it easy to test locally. You can run node matrix.js and you get the matrix JSON.

@juherr
Copy link
Member

juherr commented Jun 8, 2021

Please rebase 🙏

@juherr
Copy link
Member

juherr commented Jun 10, 2021

@krmahadevan Is this PR ok for you? I think it will help us to find issues.

@krmahadevan
Copy link
Member

@krmahadevan Is this PR ok for you? I think it will help us to find issues.

@juherr Yes I am fine with this PR. I think there are merge conflicts which need to be fixed. I will explore the tool that @vlsi has shared to understand how it works.

vlsi added 3 commits June 11, 2021 17:53
The matrix selects random values for os, jdk, timezone to keep CI
duration reasonable.

Note: important combinations (e.g. os=windows, os=linux) are listed
explicitly, so PR builds are always verified for cross-platform compatibility.
@vlsi
Copy link
Contributor Author

vlsi commented Jun 11, 2021

@juherr , I rebased the PR.

@juherr juherr merged commit 0ace1d4 into testng-team:master Jun 11, 2021
@vlsi vlsi deleted the build_matrix branch June 20, 2021 13:45
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.

3 participants