Skip to content

ci: add per-PR cross-platform build gate#233

Merged
JRickey merged 1 commit into
JRickey:mainfrom
Zorkats:ci/build-gate
Jun 17, 2026
Merged

ci: add per-PR cross-platform build gate#233
JRickey merged 1 commit into
JRickey:mainfrom
Zorkats:ci/build-gate

Conversation

@Zorkats

@Zorkats Zorkats commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

What

Adds .github/workflows/build.yml — a build-only CI workflow that compiles the ssb64 target on Windows (MSVC), Linux (clang), and macOS (arm64) for every pull_request and push to main.

Why

Today the only workflow is release.yml, which runs solely on v* tags. No check verifies that a contribution even compiles across platforms before review or merge — a maintainer has to build it by hand on three machines to find out. That's a real gap with active cross-platform work in flight (e.g. a mod loader using a Windows-only detour primitive would pass review and silently break the macOS arm64 release target).

This gate catches that automatically, in red, on the PR.

Design

  • Build-only. Never packages an installer, never produces BattleShip.o2r. Like release.yml, it's ROM-independent end-to-end, so it's safe for public CI.
  • Mirrors release.yml's desktop jobs minus packaging, so a green run here predicts a green release build:
    • Same find_package deps (libzip, nlohmann_json, tinyxml2, spdlog, SDL2, GLEW) + Pillow for the unconditional CSS scroll-arrow codegen.
    • fetch-depth: 0 so the updater's git describe --tags resolves at configure time.
    • On Windows, Python3_EXECUTABLE is pinned to the same python that pip installed Pillow under, avoiding the multi-interpreter "Pillow is required" failure.
  • No manual codegen presteps. Credits text, CSS arrows, reloc tables, and the embedded icon are all driven by CMake custom targets/commands as build dependencies — the workflow only ensures their tools (Python3 + Pillow) are present.
  • concurrency cancels superseded runs on the same ref to save runner minutes.

Notes for review

  • Builds the us version only (default). The us/jp matrix in release.yml is release-scoped; a single region is enough to catch compile breakage.
  • macOS runner minutes carry a higher multiplier — flagging it in case you'd prefer the macOS job gated to non-draft PRs or main only. Easy to adjust.

Build-only workflow that compiles the ssb64 target on Windows, Linux,
and macOS for every pull_request and push to main. Mirrors release.yml's
desktop jobs (deps incl. Pillow, fetch-depth: 0 for git-describe, Windows
Python3_EXECUTABLE pin) minus packaging. Codegen runs via CMake custom
targets, so no manual presteps. ROM-independent end-to-end.

Catches platform-specific build breaks (e.g. Windows-only mod loaders)
before review.
@JRickey JRickey merged commit 9d21ea4 into JRickey:main Jun 17, 2026
3 checks passed
@Zorkats Zorkats deleted the ci/build-gate branch June 17, 2026 03:32
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