Skip to content

feat: build SDL backend on Windows and Linux hosts - #327

Merged
Xavier Bernhardt (XavierBernhardt-Philips) merged 8 commits into
mainfrom
fix/sdl-host-build
Sep 30, 2026
Merged

Xavier Bernhardt (XavierBernhardt-Philips) merged 8 commits into
mainfrom
fix/sdl-host-build

Conversation

@XavierBernhardt-Philips

@XavierBernhardt-Philips Xavier Bernhardt (XavierBernhardt-Philips) commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

Enable the preview.sdl target for any host build, not just Windows, so the SDL DirectDisplay can be used from Linux host applications.

  • gate preview/sdl on EMIL_HOST_BUILD instead of EMIL_BUILD_WIN
  • avoid taking the address of a temporary SDL_Rect in Convert(), which fails to compile under GCC/Clang with -Werror
  • drop a duplicate Colour.hpp include

Current problem:

  • X11 is now installed for CI runs, but there's nothing to install it for local machines / dev containers.

Enable the preview.sdl target for any host build, not just Windows, so
the SDL DirectDisplay can be used from Linux/macOS host applications.

- gate preview/sdl on EMIL_HOST_BUILD instead of EMIL_BUILD_WIN
- avoid taking the address of a temporary SDL_Rect in Convert(), which
  fails to compile under GCC/Clang with -Werror
- drop a duplicate Colour.hpp include
@github-actions

github-actions Bot commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

✅⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Max errors Warnings Elapsed time
✅ ACTION actionlint 5 0 0 0.09s
⚠️ ACTION zizmor 5 0 0 1 1.93s
✅ CPP clang-format 166 1 0 0 1.92s
✅ CPP cppcheck 166 0 0 2.37s
✅ DOCKERFILE hadolint 1 0 0 0.04s
✅ JSON jsonlint 8 0 0 0.16s
✅ JSON prettier 8 1 0 0 0.79s
⚠️ MARKDOWN markdownlint 4 0 2 0 0.95s
✅ MARKDOWN markdown-table-formatter 4 0 0 0 0.27s
✅ REPOSITORY betterleaks yes no no 1.13s
✅ REPOSITORY checkov yes no no 22.44s
✅ REPOSITORY git_diff yes no no 0.03s
✅ REPOSITORY grype yes no no 93.2s
✅ REPOSITORY ls-lint yes no no 0.02s
✅ REPOSITORY secretlint yes no no 1.26s
✅ REPOSITORY syft yes no no 2.68s
✅ REPOSITORY trivy yes no no 12.07s
✅ REPOSITORY trivy-sbom yes no no 0.18s
✅ REPOSITORY trufflehog yes no no 3.68s
⚠️ SPELL lychee 35 3 0 3.95s
✅ YAML prettier 8 1 0 0 0.64s
✅ YAML v8r 8 0 0 7.53s
✅ YAML yamllint 8 0 0 0.72s

Detailed Issues

⚠️ SPELL / lychee - 3 errors
📝 Summary
---------------------
🔍 Total...........67
🔗 Unique..........61
✅ Successful......64
⏳ Timeouts.........0
🔀 Redirected......10
👻 Excluded.........0
❓ Unknown..........0
🚫 Errors...........3
⛔ Unsupported......3

Errors in .github/workflows/static-analysis.yml
[403] https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$ (at 32:21) | Rejected status code: 403 Forbidden

Errors in CHANGELOG.md
[404] https://github.com/philips-software/amp-preview/compare/v1.0.0...v1.1.0 (at 15:4) | Rejected status code: 404 Not Found

Errors in CONTRIBUTING.md
[ERROR] https://confluence.atlas.philips.com/display/GITHUB/Contribution+Models (at 42:22) | Connection failed. Check network connectivity and firewall settings

Hint: Followed 10 redirects. You might want to consider replacing redirecting URLs with the resolved URLs. Use verbose mode (`-v`/`-vv`) to see redirection details.
Hint: You can configure accepted/rejected response codes with `-a` or `--accept`
⚠️ MARKDOWN / markdownlint - 2 errors
CHANGELOG.md:18 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:23 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Bug Fixes"]
⚠️ ACTION / zizmor - 1 warning
INFO zizmor: 🌈 zizmor v1.25.0
 INFO audit: zizmor: 🌈 completed .github/workflows/ci.yml
 INFO audit: zizmor: 🌈 completed .github/workflows/linting-formatting.yml
 INFO audit: zizmor: 🌈 completed .github/workflows/release-please.yml
 INFO audit: zizmor: 🌈 completed .github/workflows/social-interaction.yml
 INFO audit: zizmor: 🌈 completed .github/workflows/static-analysis.yml
{
  "$schema": "https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/schemas/sarif-schema-2.1.0.json",
  "runs": [
    {
      "invocations": [
        {
          "executionSuccessful": true
        }
      ],
      "results": [],
      "tool": {
        "driver": {
          "downloadUri": "https://github.com/zizmorcore/zizmor",
          "informationUri": "https://docs.zizmor.sh",
          "name": "zizmor",
          "rules": [],
          "semanticVersion": "1.25.0",
          "version": "1.25.0"
        }
      }
    }
  ],
  "version": "2.1.0"
No fixes available to apply.
}

Notices

⚠️ Your configuration references items that have been removed from MegaLinter and are ignored: REPOSITORY_GITLEAKS, REPOSITORY_KICS. See Removed linters to find their replacements.

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@10.1.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,ACTION_ZIZMOR,CPP_CPPCHECK,CPP_CLANG_FORMAT,DOCKERFILE_HADOLINT,JSON_JSONLINT,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_BETTERLEAKS,REPOSITORY_GRYPE,REPOSITORY_LS_LINT,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,SPELL_LYCHEE,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is provided by OX Security
Show us your support by starring ⭐ the repository

SDL3's CMake hard-fails on Linux without X11/Wayland development headers.
Now that preview.sdl builds on all host platforms (not just Windows), the
Linux CI jobs must provide them. Install libx11-dev + the common X
extensions on host_build_test (Linux only), Static Analysis, and CodeQL.
macOS/Windows use their native backends and need nothing extra.
SDL3 hard-requires XScrnSaver and XTest (in addition to the earlier X
libs); add libxss-dev, libxtst-dev, and libxkbcommon-dev so the SDL host
build configures on the Linux CI jobs.
@XavierBernhardt-Philips
Xavier Bernhardt (XavierBernhardt-Philips) marked this pull request as ready for review September 29, 2026 12:37
EMIL_HOST_BUILD also covers Darwin, which would make macOS build SDL for
the first time. CI runs only ubuntu-latest and windows-latest, so that
path is untested; gating on EMIL_BUILD_WIN or EMIL_BUILD_UNIX keeps the
host build to the two platforms that are actually exercised.
@XavierBernhardt-Philips Xavier Bernhardt (XavierBernhardt-Philips) changed the title feat: build SDL backend on all host platforms feat: build SDL backend on Windows and Linux hosts Sep 30, 2026
macOS was dropped because EMIL_HOST_BUILD made it build SDL, which is
untested there. SDL is now gated on Windows and Linux, so macOS builds
exactly what it built on main, and Host Build & Test (macos-latest)
reports again instead of leaving the required check unsatisfied.
@XavierBernhardt-Philips
Xavier Bernhardt (XavierBernhardt-Philips) merged commit fedb5e4 into main Sep 30, 2026
22 checks passed
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.

3 participants