Skip to content

Conversation

@jonahgraham
Copy link
Contributor

@jonahgraham jonahgraham commented Nov 11, 2025

Many of the PRs on SWT are OS specific, this change only runs the build on OSes if there are changes that can affect that OS.

This is going to be more important with #2714 because potentially a number of new jobs will be run per PR and avoiding some of the extra time waiting will be a benefit to all.

The junit.yml has been updated to record tests per platform in addition to all tests. When not all platforms are run in a PR, only the respective platform results are reported as a comment. If all platforms are run, the cumulative results are reported as a comment.

Part of #2714

@github-actions
Copy link
Contributor

github-actions bot commented Nov 11, 2025

Test Results

  147 files  ±0    147 suites  ±0   20m 9s ⏱️ - 1m 18s
4 670 tests ±0  4 648 ✅ ±0  22 💤 ±0  0 ❌ ±0 
  411 runs  ±0    406 ✅ ±0   5 💤 ±0  0 ❌ ±0 

Results for commit df9e5bb. ± Comparison against base commit 13d7370.

♻️ This comment has been updated with latest results.

@jonahgraham jonahgraham force-pushed the conditionally-run-tests-per-platform branch 2 times, most recently from bbc0b9d to 73e542b Compare November 12, 2025 16:38
@jonahgraham

This comment was marked as outdated.

@HeikoKlare
Copy link
Contributor

HeikoKlare commented Nov 12, 2025

I totally like the idea of skipping tests for OSes that are not affected by a change. I am just a bit concerned about the condensed test results posted by the bot being rendered less useful. Maybe we could check if we can adapt that the results to be separated by OS, such that you can easily and properly compare for the OS(es) of interest for the current PR.

Edit: just saw that Christoph already made a similar comment: #2762 (comment)

@jonahgraham
Copy link
Contributor Author

I am going to split this PR out from the rest of them for #2741

@laeubi
Copy link
Contributor

laeubi commented Nov 13, 2025

It shows number of tests/runs down compared to master because so many tests were skipped, but it still shows 0 failures as expected. Further down you can see the non-win32 runs are skipped

As mentioned on the other PR (sorry for confusion!) I think we then better should have three check runs for all three oss to prevent the problem you see with the test drops and then have one comment for each os e.g.

  • Test Results GTK
  • Test Results Win32
  • Test Results Cocoa

beside that I'm wondering if it really pay off much to skip the tests, the Jenkins if often the slowest one and Github has completed most often much earlier anyways.

Also I'm wondering what happens with changes to the common parts of SWT that can change behavior on other OS of course as well.

@HeikoKlare
Copy link
Contributor

Also I'm wondering what happens with changes to the common parts of SWT that can change behavior on other OS of course as well.

From my understanding, there is a classification for those changes that enables all OS builds via needs.changes.outputs.other == 'true'

beside that I'm wondering if it really pay off much to skip the tests, the Jenkins if often the slowest one and Github has completed most often much earlier anyways.

Even though this is often the case, in my experience "often" rather means 60% of the cases than 90%, so avoiding unnecessary GHA runs will my in opinion still increase the average roundtrip time. And I see at least two further reasons to do this:

  • Flakyness: we repeatedly run into the situation that some builds start to get flaky for different reasons; reducing the number of (unnecessary) builds that can prevent you from making progress (both in moving actual changes forward as well as in investigating the reason for builds not working properly) is beneficial.
  • Resources: why should we utilize resources when we definitely know that the results are useless? It consumers material and energy without any benefit. You can argue that SWT builds are comparably small such that this does not pay off, but it's at least an additional point in combination with the other arguments.

@jonahgraham
Copy link
Contributor Author

jonahgraham commented Nov 13, 2025

@laeubi / @HeikoKlare thanks for your input - I agree and will see if I have time to bring this to a conclusion.

Also I'm wondering what happens with changes to the common parts [...]

From my understanding, [...]

Yes, that is correct, anything that isn't in the platform specific changes (e.g **/win32/**) will mean everything gets run. What this means is any PR that includes/updates a test, snippet, or example change will cause all platforms to run.

jonahgraham added a commit to jonahgraham/eclipse.platform.swt that referenced this pull request Nov 14, 2025
As part of working on eclipse-platform#2764
I was considering how to display badges going forward to align with
test results per platform. As it turns out the "SWT Matrix Tests"
has been stuck on an arbitrary old badge for many years now.

This PR updates it, but as it has been wrong for a long time, perhaps
removing it entirely makes more sense, but for now I update it. There
was push back in eclipse-platform#1897
against removing it.

Part of eclipse-platform#2714
jonahgraham added a commit that referenced this pull request Nov 14, 2025
As part of working on #2764
I was considering how to display badges going forward to align with
test results per platform. As it turns out the "SWT Matrix Tests"
has been stuck on an arbitrary old badge for many years now.

This PR updates it, but as it has been wrong for a long time, perhaps
removing it entirely makes more sense, but for now I update it. There
was push back in #1897
against removing it.

Part of #2714
jonahgraham added a commit to jonahgraham/eclipse.platform.swt that referenced this pull request Dec 6, 2025
This badge has been incorrect since its inception and keeping it
maintained properly going forward would require some additional
work in the context of eclipse-platform#2764

Therefore, this removes the badge.

Fixes eclipse-platform#2783

Part of eclipse-platform#2714
jonahgraham added a commit that referenced this pull request Dec 6, 2025
This badge has been incorrect since its inception and keeping it
maintained properly going forward would require some additional
work in the context of #2764

Therefore, this removes the badge.

Fixes #2783

Part of #2714
@jonahgraham jonahgraham force-pushed the conditionally-run-tests-per-platform branch from 73e542b to 2c56a05 Compare December 6, 2025 04:53
Many of the PRs on SWT are OS specific, this change only runs the build
on OSes if there are changes that can affect that OS.

This is going to be more important with eclipse-platform#2714 because potentially a number
of new jobs will be run per PR and avoiding some of the extra time
waiting will be a benefit to all.

The junit.yml has been updated to record tests per platform in addition
to all tests. When not all platforms are run in a PR, only the respective
platform results are reported as a comment. If all platforms are run, the
cumulative results are reported as a comment.

Part of eclipse-platform#2714
@jonahgraham jonahgraham force-pushed the conditionally-run-tests-per-platform branch from 2c56a05 to df9e5bb Compare December 6, 2025 05:14
@jonahgraham
Copy link
Contributor Author

I have now implemented test result reporting based on what has run. You can see what it will look like once this change is merged in the 4 examples I provide in my fork:

Single platform only

Only the platform that was run generates a comment.

image

Common code (or any change that triggers all the platforms)

Nothing is skipped in this case. Since linux + macos are matrix jobs, the total number of matrix jobs run is 6 (will be more once #2768 is merged). The comment added to the PR is the summary of all the jobs.

image

If you click through the results you can also see the results of the individual platforms. This is especially useful when reviewing skipped jobs and a few of the other annotations.

image

2 platforms change

In this case the 3rd platform SWT Matrix job is skipped. This means that two comments are created, for the two platforms that did run.

image

Only markdown changed (or anything in a category with no associated jobs)

In this case all the SWT Matrix jobs are skipped and no test results are reported.

image

@jonahgraham jonahgraham marked this pull request as ready for review December 6, 2025 05:41
@jonahgraham
Copy link
Contributor Author

4 examples I provide in my fork:

Actually 5 - I realized I missed an important case, what failures look like.

How errors report

In this example PR I have a ridiculous failures that throws an exception in the Display constructor meaning almost everything fails. This is what that looks like.

image

Test report diff to base commit

When I made the screenshots in #2764 (comment) the base commit had not finished running yet, so they were not showing diffs to base commit. I updated all the linked example PRs, but I am only redoing this screenshot:

image

@jonahgraham
Copy link
Contributor Author

This is now ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants