Skip to content

Commit e4e30e7

Browse files
committed
CI: Add convenience packaging workflow with multi-platform support
Add a GitHub Actions workflow to build Apache Cloudberry convenience DEB/RPM packages from verified source releases. Workflow features: - Two modes: official source release validation and git ref test - Multi-platform support: Rocky 8/9 and Ubuntu 22.04/24.04 - Multi-arch support: x86_64 and arm64 - Concurrency control to prevent duplicate builds - Timeout settings (30 minutes per job) - Matrix reuse via fromJSON() for DRY configuration - GPG signature and SHA-512 verification for official releases - Package installation smoke test with gpdemo - Organized input fields with mode-specific descriptions Also includes Ubuntu 24.04 packaging updates: - Change Architecture from amd64 to any for multi-arch support - Add logic to copy pre-built binaries from CBDB_BIN_PATH - Include Apache compliance files (LICENSE, NOTICE, DISCLAIMER) - Fix LD_LIBRARY_PATH for multi-arch compatibility Also update the workflow README with usage and scope notes.
1 parent f9ca4fa commit e4e30e7

4 files changed

Lines changed: 706 additions & 3 deletions

File tree

.github/workflows/README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ This directory contains GitHub Actions workflows for Apache Cloudberry CI/CD.
3434
|----------|---------|---------|
3535
| `build-cloudberry.yml` | Main CI: build, test, create RPMs | Push, PR, Manual |
3636
| `build-dbg-cloudberry.yml` | Debug build with assertions enabled | Push, PR, Manual |
37+
| `package-convenience-binaries.yml` | Build convenience DEB/RPM packages from an ASF-approved source release | Manual |
3738
| `apache-rat-audit.yml` | License header compliance check | Push, PR |
3839
| `coverity.yml` | Static code analysis with Coverity | Weekly, Manual |
3940
| `sonarqube.yml` | Code quality analysis with SonarQube | Push to main |
@@ -74,6 +75,42 @@ Many workflows support manual triggering via `workflow_dispatch`, allowing devel
7475
- `make-installcheck-world` - Full test suite
7576
- And more... (see workflow for complete list)
7677

78+
#### `package-convenience-binaries.yml` - Official source release packaging
79+
80+
This manual workflow supports two manual modes:
81+
- `official_source_release`: builds convenience `DEB/RPM` packages from an ASF-approved official source release
82+
- `git_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
83+
84+
| Parameter | Description | Example |
85+
|-----------|-------------|---------|
86+
| `source_mode` | `official_source_release` or temporary `git_ref_test` | `official_source_release` |
87+
| `version` | Official release version | `2.2.0-incubating` |
88+
| `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` |
89+
| `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` |
90+
| `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` |
91+
| `git_ref` | Temporary test-only git tag or commit SHA | `2.1.0-incubating` |
92+
93+
Workflow behavior:
94+
- In `official_source_release` mode, verifies the source tarball with the project `KEYS`, `.asc`, and `.sha512` before any build starts.
95+
- In `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.
96+
- Derives the package build version automatically by stripping a trailing `-incubating` from the release version before invoking the DEB/RPM packaging scripts.
97+
- Runs `unittest-cloudberry.sh` after building from source and before packaging.
98+
- Installs each generated `DEB/RPM`, verifies its `.sha512`, and runs a `gpdemo` smoke test with basic SQL validation.
99+
- Runs the full flow, from source release verification to package generation, inside Cloudberry Docker build images instead of installing dependencies on the GitHub runner.
100+
- Generates `.sha512` files for each produced `DEB/RPM` artifact.
101+
- Preserves the default package filenames emitted by `dpkg-buildpackage` and `rpmbuild`.
102+
- Does not generate detached `.asc` signatures for convenience binaries; that remains a release manager local signing step.
103+
104+
Input rules:
105+
- `official_source_release`: fill `source_url`, `source_asc_url`, and `source_sha512_url`
106+
- `git_ref_test`: fill `git_ref`; the Apache URL inputs may be left empty
107+
108+
Current target matrix:
109+
- `rocky8`: `x86_64`, `arm64`
110+
- `rocky9`: `x86_64`, `arm64`
111+
- `ubuntu22.04`: `x86_64`, `arm64`
112+
- `ubuntu24.04`: `x86_64`, `arm64`
113+
77114
## Artifact Reuse for Faster Testing
78115

79116
When 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.

0 commit comments

Comments
 (0)