C++ Build, Git, and CI Workflow
Overview
Use this skill to keep C++ project delivery predictable: clean local build/test commands, disciplined git flow, and CI pipelines that match release requirements.
Local developer workflow
- Keep canonical make/cmake targets documented (
release,debug,test,integration,tidy-check). - Make environment setup explicit (
configure_ci-style target for dependencies/toolchains). - Use fast local checks before pushing.
- Keep integration tests reproducible via containers.
Git workflow
- Branch from
mainwith short-lived feature/fix branches. - Keep commits atomic and scoped (code, tests, docs).
- Require green CI before merge.
- Use semantic version tags for release automation (
vX.Y.Z, optional prerelease suffix). - Keep changelog/release notes synced to tagged artifacts.
CI pipeline design
- Build matrix should match supported OS/arch/release targets.
- Separate smoke/unit checks from heavier integration jobs.
- Cache dependencies/toolchains, but keep cache invalidation clear.
- Use least-privilege tokens; only elevate when workflow updates require it.
- Publish artifacts with deterministic naming that encodes extension and DuckDB version.
Release and compatibility flow
- Trigger release pipeline from tags.
- Verify artifacts on release page and smoke-load in target runtime.
- Track compatibility matrix against upstream DuckDB versions.
- Keep upgrade automation (e.g., DuckDB version update workflows) documented.
Review checklist
- Can a new contributor build and run tests from docs alone?
- Do CI jobs mirror local commands?
- Are release steps repeatable and scriptable?
- Are platform-specific dependencies explicit?
- Are secrets/tokens minimally scoped?
Learn more (official)
- GitHub Actions docs: https://docs.github.com/actions
- GitHub Actions security hardening: https://docs.github.com/actions/security-guides/security-hardening-for-github-actions
- CMake docs: https://cmake.org/cmake/help/latest/
- Conventional Commits (optional policy): https://www.conventionalcommits.org/
- SemVer: https://semver.org/
Scan to join WeChat group