Skip to content

Build Script and Github CI Enhancements#60

Open
coolDudeRude wants to merge 11 commits into
MarioSMB:masterfrom
coolDudeRude:master
Open

Build Script and Github CI Enhancements#60
coolDudeRude wants to merge 11 commits into
MarioSMB:masterfrom
coolDudeRude:master

Conversation

@coolDudeRude
Copy link
Copy Markdown

@coolDudeRude coolDudeRude commented May 19, 2026

This PR overhauls the build scripts and GitHub Actions workflows. It replaces the legacy update.sh with a unified build.sh with additional changes:

Build Script

  • build script handles submodule initialization, gmqcc compiler setup, and the build process.
  • Uses --filter=blob:none (partial clone) flag for submodule initialization. This reduces the xonotic-data clone size from ~1GB to ~700MB, drastically speeding up local and CI setups.
  • Build artifacts are now isolated by branch in the build/<branch-name>/ directory.
  • Switched to realpath for calculating BUILD_MOD.

Note

The --filter flag is used to speed up setup and compilation for those who are only interested in using the mod. For development, the submodules must be initialized manually before running the build script or passing
-nf or --no-filter flag to the build script to setup submodules automatically with full blob history.

Important

By default, the build script now synchronizes all submodules to the specific commits tracked in the parent repository. This ensures build reproducibility across different environments.
Use the -ni (--no-init) flag to skip this initialization and synchronization if you are testing local submodule changes or have different submodule commit checked out.

CI Enhancements

  • Implemented gmqcc binary caching.
    • The workflow uses gmqcc submodule commit ID as key for cache lookup.
    • If the submodule hash hasn't changed, the workflow skips the initialization of gmqcc submodule and make step entirely, restoring gmqcc from cache.
  • Integrated the blob:none filter into the actions/checkout step, significantly reducing CI runner disk usage and download time.
  • Upgraded to actions/upload-artifact@v7.
    • Artifacts are now named dynamically: progs-<branch>-<tag>.
    • Specifically targets the new build/ directory for uploads.
  • Introduced the same setup changes from build.yml into daily.yml.

Cleanup

  • Deleted update.sh (obsolete).
  • Updated .gitignore to track the new build/ structure and ignore binary artifacts.
  • Added gmqcc as a formal git submodule.

- Add centralized build script (build.sh)
- Optimize GitHub Actions using caching and partial clones
- Update .gitignore and move output directory from 'compiled/' to 'build/'
- Remove redundant daily.yml workflow
- Remove update.sh and integrate gmqcc compilation into build.sh
- Add github workflow to test building the mod against xonotic master
- Add short-hand flags `-nf` and `-ni` for submodule control
- Replace file-existence checks for submodules with `git submodule status`
- Improve logging to include commit hashes during initialization
- Update usage documentation
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