Skip to content

Add Windows and macOS to CI build matrix and fix cross-platform issues#293

Open
addwes7 wants to merge 1 commit into
xkcoding:masterfrom
addwes7:pr-branch
Open

Add Windows and macOS to CI build matrix and fix cross-platform issues#293
addwes7 wants to merge 1 commit into
xkcoding:masterfrom
addwes7:pr-branch

Conversation

@addwes7

@addwes7 addwes7 commented Jun 7, 2026

Copy link
Copy Markdown

What is the purpose of this PR

Expand the GitHub CI workflow to run on Ubuntu, Windows, and macOS instead of only Ubuntu.

Expected results

The project builds successfully on Ubuntu, Windows, and macOS using JDK 8 while preserving the original build behavior.

Actual results

Running the original workflow on additional operating systems exposed platform-specific issues:

  • The workflow was configured to run only on ubuntu-latest.
  • On Windows, Maven command-line properties were parsed incorrectly, causing the build to fail with:
Unknown lifecycle phase ".javadoc.skip=true"
  • On macOS, Maven failed because the JDK setup was not configured correctly, resulting in:
The JAVA_HOME environment variable is not defined correctly,
this environment variable is needed to run this program.

Description of fix

  • Added an OS build matrix (ubuntu-latest, windows-latest, macos-latest).
  • Moved Maven build properties (-DskipTests=true and -Dmaven.javadoc.skip=true) into MAVEN_OPTS to avoid platform-specific command-line parsing issues.
  • Updated the Java setup step to use actions/setup-java@v4 with Zulu JDK 8.
  • Replaced the legacy java-version: 1.8 configuration with java-version: 8 for compatibility with the newer setup action.
  • Preserved the original build behavior while enabling CI execution across all supported operating systems.

@guxiren

guxiren commented Jun 7, 2026 via email

Copy link
Copy Markdown

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