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 minor negative of skipping tests conditionally is that the Test Results summary comment will report less runs that base commit.

Part of #2714

@github-actions
Copy link
Contributor

github-actions bot commented Nov 11, 2025

Test Results

  118 files  ±0    118 suites  ±0   17m 25s ⏱️ +43s
4 652 tests ±0  4 634 ✅ ±0  18 💤 ±0  0 ❌ ±0 
  338 runs  ±0    334 ✅ ±0   4 💤 ±0  0 ❌ ±0 

Results for commit 73e542b. ± Comparison against base commit e84097b.

♻️ This comment has been updated with latest results.

@jonahgraham jonahgraham force-pushed the conditionally-run-tests-per-platform branch from 7fddc90 to bbc0b9d Compare November 11, 2025 21:08
Rather than a single matrix that covers all OSes, split them up
so that enumerating different ones is a little easier.

This has three benefits:

1. `matrix.exclude` is easier to write in this format
2. Tools like `act` work with simple string matrix dimensions
   (see new comment at top of maven.yml)
3. conditional execution on file name pattens are easier to implement
   (see subsequent PR on this topic)

Part of eclipse-platform#2714
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 minor negative of skipping tests conditionally is that the **Test
Results** summary comment will report less runs that base commit.

Part of eclipse-platform#2714
@jonahgraham jonahgraham force-pushed the conditionally-run-tests-per-platform branch from bbc0b9d to 73e542b Compare November 12, 2025 16:38
@jonahgraham
Copy link
Contributor Author

The minor negative of skipping tests conditionally is that the Test Results summary comment will report less runs that base commit.

I put together an example of what this looks like on my fork. I pushed this commit as my master HEAD, and then made three PRs:

You end up with, for example, on win32 this output:

image

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

image

@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
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