GameVersion.cpp becomes a configure_file template, so the version strings are a
build input rather than something a CI step seds into the working tree mid-run.
That is what lets a crash report be matched to its exact build's PDB for offline
symbolization.
The two strings get distinct jobs. czVersionString is the machine-readable build
identity: the bare short commit SHA and nothing else. A `git describe` string
cannot serve here -- czVersionString is 16 bytes because it is stored in the
savegame header as SAVED_GAME_HEADER::zGameVersionNumber and strcmp'd on load,
and describe puts the SHA last, so truncation ate exactly the discriminating part
and could make two different commits compare equal. CI passes 9 hex; anything
that would not fit is now a configure error rather than a silent clip.
zBuildInformation is the display string, untruncated, and it is no longer printed
beside czVersionString: that drops the duplication in the version line ("JA2 1.13
V4-555-G6A941C0 2026-07-25 V4-555-G6A941C06") and stops showing a token that is
now machine-only. CI's copy leads with GAME_VERSION, because the version line is
now the only place a player reads which release they are running.
Finish what the sed step's TODO asked for: the workflow pins GAME_BUILD_INFORMATION
and GIT_SHA once, next to the gamedir SHAs it already pins, and hands them to CMake
with -D. Every parallel build job therefore stamps one agreed identity, and the
compile checkout needs no git history at all.
A build nobody identifies is a local build and says so -- czVersionString reads
"local" -- rather than deriving a SHA from HEAD. A derived SHA could not stay
true: nothing re-runs configure once HEAD moves, so an incremental build would
keep whatever it was configured with, and keeping it honest would mean
reconfiguring on every commit. It would also buy nothing, because only packaged
builds are archived with their PDBs; a local build's crash reports are symbolized
against the PDB sitting next to the exe.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
every build artifact also carries Ja2Export.exe, so the glob handed mv
three paths and it failed with "target 'gamedir/ja2.exe' is not a
directory". The assemble job runs on Windows, so the lowercase matrix
name matches the uppercase target file.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A skipped job still shows up in a pull request's check list, so assemble
and release reported there as two permanently skipped checks. A job can
only be left out of a run graph it does not belong to, so move both into
release.yml, which triggers on master, v* tags and manual dispatch, and
gets its build by calling build.yml through workflow_call. A pull request
now runs build.yml directly and reports exactly the five checks it can
actually pass.
The global_vars step only existed to compute assemble_release for the two
jobs that left, and it read the workflow_dispatch input, which a called
workflow cannot see. Its logic moves to a condition on assemble itself,
unchanged: a manual run assembles only when asked, tags always assemble,
master assembles only upstream. The release job needs no condition since
a skipped assemble skips it.
Check out the source rather than cloning it by hand. A pull request
builds its merge commit, which is on no branch and so is absent from a
clone of branches and tags; it resolved only because --filter=tree:0 made
the clone partial and git fetched it from the promisor remote on demand.
The action fetches the merge ref itself, so nothing hinges on the filter.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A push builds in the repository it was pushed to, so a contributor's
branch builds in their fork and the base repository sees nothing. Without
a run of its own there is no check on the pull request for branch
protection to require, so trigger on pull_request as well.
Push builds narrow to master and v* tags: with pull requests covered,
building every branch push only duplicated the same commit's build across
four Windows matrix jobs. Master still builds so the "latest" pre-release
keeps updating. A branch with no pull request open builds via
workflow_dispatch.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Compiler cache stored in the GitHub Actions cache, shared across runs.
Requires /Z7 instead of the CMake default /Zi, since sccache cannot cache
objects whose debug information lands in a shared PDB. That is a debug
information format change only, the generated code is unchanged.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This reverts commit 1976dee738.
Revert "yet another fix for the github actions"
This reverts commit 552951795c.
Revert "make sure CI to assemble release on 'v*' tag push or manually"
This reverts commit 8897769f0d.
create empty CMakeUserPresets.json file so build happens on first run
comment doesn't apply anymore
no need to specify the compiler when using msbuild@xxx
ask ninja for the verbose command line when building
* GitHub Workflow improvements
- Automatically pre-release master as "latest"
- Build all languages
- Parallelize workflow
- Support tag based releases
* GitHub Workflow: Added support for ja2ubmapeditor.