Skip to content

Add Windows and macOS to build matrix in GitHub Actions run, fix cross-platform issues#1569

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

Add Windows and macOS to build matrix in GitHub Actions run, fix cross-platform issues#1569
addwes7 wants to merge 1 commit into
LibrePDF:masterfrom
addwes7:pr-branch

Conversation

@addwes7
Copy link
Copy Markdown

@addwes7 addwes7 commented May 20, 2026

What is the purpose of this PR

Add Windows and macOS to the CI build matrix. Currently the workflow only runs on Ubuntu.

Expected results

Build and tests pass on all three operating systems (Ubuntu, Windows, macOS).

Actual results

Running the workflow on Windows and macOS without fixes produces the following errors:

  • Windows: The debug step uses pwd && ls -l. On Windows, ls maps to PowerShell's Get-ChildItem, and -l is interpreted as -LiteralPath, which requires an argument.

  • macOS: FontTest.testFontStyleOfStyledFont loads Courier.ttc and expects an OS/2 TrueType table. On macOS, the bundled Courier font does not include that table. This is a platform-specific font difference, not a code defect.

Description of fix

  1. Added OS build matrix (ubuntu-latest, windows-latest, macos-latest).
  2. Added shell: bash to the debug step so it runs correctly on Windows.
  3. Added Assumptions.assumeFalse to skip testFontStyleOfStyledFont on macOS where the required font table is unavailable. An alternative approach would be to comment out or remove the FontFactory.registerDirectories() call.

@sonarqubecloud
Copy link
Copy Markdown

@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

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.

1 participant