Skip to content

Add windows and macos platforms to the CI#2493

Open
jbonofre wants to merge 10 commits intoapache:mainfrom
jbonofre:ci-multiplatform
Open

Add windows and macos platforms to the CI#2493
jbonofre wants to merge 10 commits intoapache:mainfrom
jbonofre:ci-multiplatform

Conversation

@jbonofre
Copy link
Copy Markdown
Member

@jbonofre jbonofre commented Mar 30, 2026

@holgerfriedrich as discussed in #2476

Summary

  • Add Windows and macOS platforms to the CI build and test matrix
  • Fix EventPrinterTest to use platform-independent line separators
  • Fix MainLockingTest.testLostMasterLockAfterThreshold timing issue on macOS (replace fixed sleep with polling)
  • Increase Surefire forkedProcessExitTimeoutInSeconds to prevent JVM kill errors on Windows
  • Update .asf.yaml required status checks to match the new matrix job names

@holgerfriedrich
Copy link
Copy Markdown
Contributor

holgerfriedrich commented Mar 31, 2026

Adding MacOS has consequences, as it restricts parallel builds to 5 due to runner limits.
https://docs.github.com/en/actions/reference/limits#job-concurrency-limits-for-github-hosted-runners

When I merged this to my repo, dependabot triggered 30 builds, now my rebuild of main is starving until all of them have completed...

One way could be to run MacOS builds only on merge and skip them in PR builds.
Or we could exclude dependabot PRs for this OS.

@jbonofre
Copy link
Copy Markdown
Member Author

@holgerfriedrich I'm still working on the PR to find the good "tuning". I will let you know when it's good to go.

@jbonofre
Copy link
Copy Markdown
Member Author

jbonofre commented Apr 1, 2026

@holgerfriedrich the CI is green (I fixed the issues on Windows and MacOS platforms). I just have to update the GitHub configuration about the checks (the names changed).

jbonofre and others added 6 commits April 2, 2026 14:14
Use System.lineSeparator() instead of hardcoded \n so the test
passes on Windows where PrintStream.println() outputs \r\n.
Replace fixed Thread.sleep with polling loop in MainLockingTest to
handle slower CI runners, and increase Surefire forked process exit
timeout to prevent JVM kill errors on Windows.
Remove blanket bundle:capabilities and bundle:classes calls (no args)
that dump output for all bundles, causing I/O pipe deadlock on Windows.
The targeted single-bundle calls already validate the commands.
- ConfigTest.listShortCommand: split assertion to avoid \r\n mismatch
  on Windows where line separators differ from \n
- InstanceImpl.packageInZip: normalize zip entry paths to use forward
  slashes, fixing InstanceTest.packageCommand on Windows where
  Path.toString() uses backslashes
jbonofre and others added 4 commits April 2, 2026 14:28
Use per-OS artifact names (maven-local-repo-$OS) so each matrix job
uploads its own artifact instead of conflicting on a shared name.
Also remove invalid 'key' parameter not supported by upload/download-artifact.
Disable PTY echo mode in SSH test channels to prevent garbled output
on Windows that caused ConfigSshCommandSecurityTest assertion failures.
Reduce forkedProcessExitTimeoutInSeconds from 120s to 30s to avoid
wasting ~22 minutes on Windows where Karaf JVMs hang on shutdown.
ClientChannel does not have setPtyModes() - use createShellChannel()
which returns ChannelShell, consistent with SshAction.java.
…before test

The wrapper feature may already be installed on Windows, causing the
test precondition to fail. Ensure it is uninstalled before asserting.
@jbonofre
Copy link
Copy Markdown
Member Author

jbonofre commented Apr 4, 2026

@holgerfriedrich the PR is ready. I have to update the checks on GitHub settings to have CI ok.

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.

2 participants