This directory contains GitHub Actions workflows for Apache Cloudberry CI/CD.
| Workflow | Purpose | Trigger |
|---|---|---|
build-cloudberry.yml | Main CI: build, test, create RPMs | Push, PR, Manual |
build-dbg-cloudberry.yml | Debug build with assertions enabled | Push, PR, Manual |
package-convenience-binaries.yml | Build convenience DEB/RPM packages from an ASF-approved source release | Manual |
apache-rat-audit.yml | License header compliance check | Push, PR |
coverity.yml | Static code analysis with Coverity | Weekly, Manual |
sonarqube.yml | Code quality analysis with SonarQube | Push to main |
docker-cbdb-build-containers.yml | Build Docker images for CI | Manual |
docker-cbdb-test-containers.yml | Build test Docker images | Manual |
Many workflows support manual triggering via workflow_dispatch, allowing developers to run CI jobs on-demand.
build-cloudberry.yml - Main CI| Parameter | Description | Default | Example |
|---|---|---|---|
test_selection | Comma-separated list of tests to run, or “all” | all | ic-good-opt-off,ic-contrib |
reuse_artifacts_from_run_id | Run ID to reuse build artifacts from (see below) | (empty) | 12345678901 |
Available test selections:
all - Run all test suitesic-good-opt-off - Installcheck with optimizer offic-good-opt-on - Installcheck with optimizer onic-contrib - Contrib extension testsic-resgroup - Resource group testsic-resgroup-v2 - Resource group v2 testsic-resgroup-v2-memory-accounting - Resource group memory testsic-singlenode - Single-node mode testsmake-installcheck-world - Full test suitepackage-convenience-binaries.yml - Official source release packagingThis manual workflow supports two manual modes:
official_source_release: builds convenience DEB/RPM packages from an ASF-approved official source releasegit_ref_test: temporarily archives a specified tag or commit from the repository with git archive semantics and runs the same packaging flow for CI validation| Parameter | Description | Example |
|---|---|---|
source_mode | official_source_release or temporary git_ref_test | official_source_release |
version | Official release version | 2.2.0-incubating |
source_url | Official Apache source tarball URL from downloads.apache.org | https://downloads.apache.org/incubator/cloudberry/2.2.0-incubating/apache-cloudberry-2.2.0-incubating-src.tar.gz |
source_asc_url | Detached GPG signature URL for the source tarball (.asc) | https://downloads.apache.org/incubator/cloudberry/2.2.0-incubating/apache-cloudberry-2.2.0-incubating-src.tar.gz.asc |
source_sha512_url | SHA-512 checksum URL for the source tarball (.sha512) | https://downloads.apache.org/incubator/cloudberry/2.2.0-incubating/apache-cloudberry-2.2.0-incubating-src.tar.gz.sha512 |
git_ref | Temporary test-only git tag or commit SHA | 2.1.0-incubating |
Workflow behavior:
official_source_release mode, verifies the source tarball with the project KEYS, .asc, and .sha512 before any build starts.git_ref_test mode, checks out the specified tag or commit and prepares a temporary source tarball using git archive semantics, including checked-out submodule contents, without Apache release verification.-incubating from the release version before invoking the DEB/RPM packaging scripts.unittest-cloudberry.sh after building from source and before packaging.DEB/RPM, verifies its .sha512, and runs a gpdemo smoke test with basic SQL validation..sha512 files for each produced DEB/RPM artifact.dpkg-buildpackage and rpmbuild..asc signatures for convenience binaries; that remains a release manager local signing step.Input rules:
official_source_release: fill source_url, source_asc_url, and source_sha512_urlgit_ref_test: fill git_ref; the Apache URL inputs may be left emptyCurrent target matrix:
rocky8: x86_64, arm64rocky9: x86_64, arm64ubuntu22.04: x86_64, arm64ubuntu24.04: x86_64, arm64When debugging test failures, rebuilding Cloudberry (~50-70 minutes) on every iteration is inefficient. The artifact reuse feature allows you to reuse build artifacts from a previous successful run.
After a successful build (even if tests failed), get the run ID:
Option A: From GitHub Actions UI
https://github.com/apache/cloudberry/actions/runs/1234567890112345678901Option B: From GitHub API
# List recent workflow runs gh run list --workflow=build-cloudberry.yml --limit 5 # Get run ID from specific branch gh run list --workflow=build-cloudberry.yml --branch=my-feature --limit 1
Via GitHub UI:
Via GitHub CLI:
# Reuse artifacts from run 12345678901, run only specific tests gh workflow run build-cloudberry.yml \ --field reuse_artifacts_from_run_id=12345678901 \ --field test_selection=ic-good-opt-off
Debugging a specific test failure:
# Run 1: Full build + all tests (finds test failure in ic-good-opt-off) gh workflow run build-cloudberry.yml # Get the run ID from output RUN_ID=$(gh run list --workflow=build-cloudberry.yml --limit 1 --json databaseId --jq '.[0].databaseId') # Run 2: Reuse artifacts, run only failing test gh workflow run build-cloudberry.yml \ --field reuse_artifacts_from_run_id=$RUN_ID \ --field test_selection=ic-good-opt-off
Testing different configurations:
# Test with optimizer off, then on, using same build gh workflow run build-cloudberry.yml \ --field reuse_artifacts_from_run_id=$RUN_ID \ --field test_selection=ic-good-opt-off gh workflow run build-cloudberry.yml \ --field reuse_artifacts_from_run_id=$RUN_ID \ --field test_selection=ic-good-opt-on
GitHub Actions workflows are enabled in forks, allowing you to validate changes before submitting a Pull Request.
Fork the repository to your GitHub account
Enable GitHub Actions in your fork:
Secrets Configuration:
No manual secret configuration is required for the main build and test workflows.
GITHUB_TOKEN is automatically provided by GitHub and used when downloading artifacts from previous runs (artifact reuse feature)DOCKERHUB_USER, DOCKERHUB_TOKEN) are only required for building custom container images (advanced/maintainer use case, not needed for typical development)workflow_dispatch is fully functional# 1. Create feature branch in fork git checkout -b fix-test-failure # 2. Make changes and push to fork git commit -am "Fix test failure" git push origin fix-test-failure # 3. CI runs automatically on push # 4. If tests fail, iterate using artifact reuse # Get run ID from your fork's Actions tab gh workflow run build-cloudberry.yml \ --field reuse_artifacts_from_run_id=12345678901 \ --field test_selection=ic-good-opt-off # 5. Once tests pass, open PR to upstream gh pr create --web
Cause: Artifacts from specified run ID not found or expired
Solution:
Cause: GitHub Actions not enabled in fork
Solution:
Cause: Workflow trying to access artifacts from different repository
Solution: