-
Notifications
You must be signed in to change notification settings - Fork 0
SMS++ GitLab Guide
SMS++ is developed on GitLab, where every module is
its own repository and the SMS++ Project
umbrella ties them together as git submodules. This page explains how the
GitLab CI/CD pipelines are organized. For the contribution workflow see the
Developer's Guide and CONTRIBUTING.md.
[[TOC]]
Each module ships a .gitlab-ci.yml with three stages — build, test,
deploy — that run on the develop branch and on tags, and only when relevant
files change (cmake/, include/, src/, test/, tools/, CMakeLists.txt):
-
build — clones the umbrella, configures it with the module's
BUILD_<Module>=ONflag and builds/installs it; -
test — runs
cteston the resulting build; - deploy — on tags, packages the build with CPack.
Cloning the private build image and the umbrella uses the SMSPP_DEPLOY_KEY
CI/CD variable (an SSH deploy key).
The umbrella .gitlab-ci.yml adds two project-level jobs:
- pages — builds the Doxygen API reference and the MkDocs User Manual and publishes them to GitLab Pages (manual trigger);
-
release_job — on tags, assembles a source archive of the whole project
(submodules included) and publishes a GitLab Release, using
glaband theANTONIO_PERSONAL_ACCESS_TOKENvariable.
The project is mirrored read-only to the SMSpp-Project organization on GitHub for visibility. GitLab stays the single source of truth: please open issues and merge requests on GitLab.
The mirror is implemented entirely in CI, with two complementary mechanisms:
- a
mirrorjob in every repository (themirrorstage) that, on each push, does agit clone --mirrorfrom GitLab and agit push --mirrorto the matching GitHub repository. It declaresneeds: []so it starts immediately, in parallel withbuild, without blocking the other stages; - a
mirror_allorchestrator job in the umbrella that mirrors every submodule first and the umbrella last, so a--recurse-submodulesclone of the GitHub mirror is always consistent. It runs on a schedule or manually, and skips repositories that are not hosted on GitLab (e.g. thepySMSppsubmodule, which lives on GitHub) and the wiki.
Both jobs are guarded by if: '$GITHUB_MIRROR_TOKEN && …', so they only run when
the group-level CI/CD variable GITHUB_MIRROR_TOKEN (a GitHub token with
write access to the organization) is set; until then they stay dormant and no
pipeline turns red.
| Variable | Scope | Used by |
|---|---|---|
SMSPP_DEPLOY_KEY |
group | cloning the umbrella in module builds |
ANTONIO_PERSONAL_ACCESS_TOKEN |
group |
release_job (GitLab releases via glab) |
GITHUB_MIRROR_TOKEN |
group | the mirror / mirror_all jobs (push to GitHub) |
Note: SMS++ support for GitLab CI/CD has historically been uneven across modules; the
build/testcoverage of some modules is still a work in progress, while themirrorjob is present in all of them.