-
Notifications
You must be signed in to change notification settings - Fork 108
ci(release): Add weekly pre-releases workflow for Generals and GeneralsMD #929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
What does this change produce then? |
|
If these are our 'official' pre-releases then they need to be properly versions. |
I can adjust for a semVer schema if it looks better. |
It will produce zip files weekly with the main executables for generals, worldbuilder and w3dview both for both games. |
It's not about looking better, it's about having traceability when somebody reports an issue or bug. |
d248576 to
b668cf2
Compare
|
@xezon @roossienb I’ve just updated the pull request to use semantic versioning. The version is now based on When the project is ready for a stable release, we just need to update the version file to I ran the workflow on my fork and everything went smoothly:
|
|
In a discussion with @Mauller he told me that they did nightly builds in which they used the latest commit number as the build number in the application. This makes it easy to track back. |
It’s fine to change the logic to whatever is needed. But just need to decide what will be the pattern. All approaches have its own pros and cons. Using latest commit it’s a good approach but we can get more than one commit in a day, and this would be a problem to track anyway. What about to mix the approaches like |
|
I think most important is that the version is also shown in-game (so when you open the options menu, in the bottom). |
I totally agree with you. But I don’t have enough knowledge in C language. Can you guys help me to do that? |
|
I don't think it should have a proper version number tag, only official releases should get a version tag and otherwise should show the commit and if the tree was dirty when it was built. Vanilla Conquer uses a GitWatcher cmake module to populate the variables used to configure this file which is then referred to when configuring the version. |
09d1dd0 to
a801bfb
Compare
I think I’m getting close to add the build version to game. I believe in a few days I will be able to update this pr with the modifications. |
|
@xezon @roossienb @OmniBlade @tintinhamans I've update the first comment of this PR with the latest changes. |
.github/workflows/weekly-release.yml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does the version string now look in the game?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to set the following defines:
VERSION_BUILDUSER="The Super Hackers"
VERSION_BUILDLOC="https://github.com/TheSuperHackers/GeneralsGameCode"
VERSION_BUILDNUM=<The number of total builds>
For version number we currently use the Git Revision number which is ok.
The files that are generated for VERSION_BUILDUSER etc probably need updating to:
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/GeneratedVersion.h
"#pragma once
#ifndef VERSION_BUILDNUM
#define VERSION_BUILDNUM ${BuildNumber}
#endif
#ifndef VERSION_LOCALBUILDNUM
#define VERSION_LOCALBUILDNUM 0
#endif
#ifndef VERSION_BUILDUSER
#define VERSION_BUILDUSER ${BuildUser}
#endif
#ifndef VERSION_BUILDLOC
#define VERSION_BUILDLOC ${BuildLocation}
#endif
"
)
or a variation thereof
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
9746f58 to
ad803af
Compare
|
@xezon , I've made some major changes to the codebase here. Summary of ChangesThe primary modification is how the version string is displayed on the options screen.
How It Works
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs another pass, reverting the string mutations and string presentations in the game. Please try to fit CI strings into the established formats.
Feed the Product Title, Product Version and Product Author from CI.
resources/CMakeLists.txt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not ideal. Git Info should be taken as is and not be mutated for other purposes. If new information is added, then it should be explicit with new names and fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was previously localized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think exe and ini must not be omitted here. Both EXE and INI hashes are critical information for Game Client compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this removed? The purpose of configurable Product information is to allow Mods to override this Product information from Data.
If you want to set a new production version put that into the function:
UnicodeString Version::getUnicodeProductVersion() const
{
UnicodeString version = getBuildVersion();
if (version.empty())
version = getUnicodeGitVersion();
return version;
}There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this building an entirely new string variant for the CI Build? Instead I think we should feed the existing ProductName, ProductVersion and ProductAuthor from CI. That is what it was made for.
I suggest use the existing framework and fit the CI data in there, with priority over the git/other values. And do not override the git information. Just add new raw information as new fields.
GeneralsMD/Code/Main/CMakeLists.txt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to get a CI build count number here instead of git commit count?
resources/CMakeLists.txt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should always be generated as is. No custom mutation of Git data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we drop the embedding of information from the CI for now as it is proving controvertial for exactly the best method to do so and just focus on producing weeklies as is from the CI? Embedding alternative build info from the CI can be a separate PR.
No problem to change the pr to only build in this first moment. will change the code and request a new review. |
|
@xezon @OmniBlade Just to start a parallel discussion about the versioning system itself: In my opinion, the CI pipeline should be the single source of truth for versioning. This aligns with what’s considered best practice in the literature (Continuous Delivery – Humble & Farley, Build Automation – Fowler, and SemVer.org). Version numbers should reflect intentional release decisions, while commit hashes and build metadata are generated automatically. CI is the natural place to bring those together in a consistent way. If we allow local builds to stamp arbitrary versions (date, hash, etc.), we risk drift: the same code might exist under multiple “versions” depending on who built it. By centralizing version stamping in CI, every official artifact can always be traced back to its exact commit and release tag, without mutating Git metadata. Local builds can still include fallback info (like “dev” or build time) for debugging, but those shouldn’t override what CI assigns. This approach also gives us governance: only CI-published builds carry an official version identifier. That makes it clear which artifacts are “real releases” versus developer builds, and keeps the history consistent and auditable. |
|
This is an open source project, so anyone will be able to generate any version information in the game client as he likes. So even if we generate a version in CI, someone can replicate it locally. We currently build version information locally with a mix of Product Name, Git Author and Commit count. From CI you can set a Product Name, Product Version and Product Author, which is different from what is auto generated. Example: Locally Generated: "Community Patch 752 By Mauller" 0.1.752 meaning |
|
That’s true for any open source project — anyone can fork the repo and stamp whatever version string they want into their local builds. But that doesn’t reduce the value of CI-generated versioning. The real distinction is not whether the string can be replicated, but whether it represents an official artifact or just a local build. The real value of CI versioning is giving us a single, consistent scheme for official artifacts. Local builds can still show commit/author info for debugging, but CI builds are what the community can trust as authoritative releases. That separation keeps things clear for both contributors and players. |
ad6019d to
92d3959
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to see a current example Release based on this workflow?
92d3959 to
eec1741
Compare
|
@xezon @OmniBlade what is still needed to merge this pr? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks okay to me now, lets get it merged and if it needs further tweaking so be it.







What this PR does?
This PR complements #1171
Creates a github action to create a weekly release with the latest code changes. It will be scheduled to every moday.
https://github.com/fbraz3/GeneralsGameCode/actions/runs/15689781515

It also can be mannualy triggered, and it have parameters to bypass the code changes check to force a new build

The release notes also have a changelog with all commits since the last release - for the first release it will be limited to the last 10 commits
