Skip to content

Add GitHub Actions CI/CD and release packaging infrastructure#1

Merged
willibrandon merged 45 commits into
REL2_x_STABLEfrom
002-github-releases
Jan 8, 2026
Merged

Add GitHub Actions CI/CD and release packaging infrastructure#1
willibrandon merged 45 commits into
REL2_x_STABLEfrom
002-github-releases

Conversation

@willibrandon

@willibrandon willibrandon commented Jan 6, 2026

Copy link
Copy Markdown
Owner

Summary

Adds automated CI/CD infrastructure for building and releasing pglogical across all supported platforms.

CI Workflow (ci.yml)

  • Builds and tests on push to REL2_x_STABLE and PRs
  • Matrix: PostgreSQL 15-18 × Linux, Windows, macOS ARM64
  • Runs regression tests on all platforms
  • Uploads test artifacts on failure (regression_output/, tmp_check/log/)
  • Shows regression diffs in job summary

Release Workflow (release.yml)

  • Triggered by v* tags (e.g., v2.5.0)
  • Produces binary packages for all platform/PG combinations
  • Windows: ZIP + MSI installer with auto-detection of PostgreSQL path
  • Linux/macOS: tar.gz with install.sh helper script
  • Source archives with submodules included
  • SHA256 checksums
  • Automatic prerelease detection for tags with hyphens

Packaging

  • packaging/windows/pglogical.wxs - WiX v5 MSI installer
  • packaging/unix/install.sh - Installation script supporting pg_config, PG_CONFIG, and PGDIR
  • Platform-specific README documentation

Platform Support

  • PostgreSQL: 15, 16, 17, 18 (dropped 13/14 - deprecated upstream)
  • Linux: x64 (Ubuntu, Debian, RHEL, CentOS)
  • Windows: x64 (Windows 10, 11, Server 2019+)
  • macOS: ARM64 only (Apple Silicon) - Intel Mac builds removed

Test Plan

  • CI workflow runs successfully on this PR
  • All matrix jobs pass (12 jobs: 4 PG versions × 3 platforms)
  • Before merge, test release workflow with v2.5.0-rc16 tag

Complete design documents for automated binary distribution:
- spec.md: 7 user stories, 31 functional requirements, success criteria
- plan.md: technical context, constitution checks, project structure
- tasks.md: 71 implementation tasks organized by user story
- research.md: GitHub Actions, WiX v5, cross-platform build patterns
- contracts/: workflow and installer contracts
- data-model.md: artifact naming, build matrix, release entities

Targets pglogical 2.5.0 with PG 13-18 support across Windows 10/11,
Linux (Ubuntu 20.04+, RHEL 8+), and macOS (13 Ventura - 26 Tahoe).
Add CI/CD infrastructure for automated builds and releases:
- CI workflow for PR validation across PG 13-18 on Linux, Windows, macOS
- Release workflow triggered by v* tags with artifact packaging
- WiX v5 MSI installer with PostgreSQL auto-detection
- Unix install script supporting pg_config and PGDIR options
- Platform-specific README documentation

Updates spec files to use README.md instead of README.txt.
@willibrandon willibrandon self-assigned this Jan 6, 2026
…dows

- Add libkrb5-dev to Linux apt-get for gssapi/gssapi.h header
- Replace Chocolatey with EDB prebuilt binaries for faster Windows setup
- Update pg_config path resolution for EDB binary layout
- Add sys/stat.h include for stat() function declaration
- Revert Windows from EDB binaries to Chocolatey (EDB URLs return 403)
- Add libkrb5-dev for GSSAPI headers on Linux
PostgreSQL 13 PGDG packages have backported the cmdtype parameter,
making it a 3-argument function (estate, slot, cmdtype) instead of
the original 2-argument version.
@willibrandon willibrandon added documentation Improvements or additions to documentation enhancement New feature or request continuous integration labels Jan 6, 2026
@willibrandon
willibrandon force-pushed the 002-github-releases branch 20 times, most recently from baf8b5c to 67dc269 Compare January 6, 2026 06:44
- Add .clangd config to suppress warnings and disable inlay hints
- Add .gitignore entries for LLVM bitcode, compile_commands.json, .cache
- Use NO_DEFAULT_PATH in CMake find_library/find_program to avoid
  picking up wrong PostgreSQL installation
- Fix signed/unsigned comparison warning in pglogical_dependency.c
Windows process startup and IPC are slower than Unix, causing regression
tests to time out. This reduces polling intervals on Windows only:
- supervisor latch: 180s -> 30s
- drop_subscription wait: 1000ms -> 200ms
- manager MIN_SLEEP: 5000ms -> 1000ms
- slot_confirm_lsn poll: 1000ms -> 200ms
- sync_worker_cleanup: 1000ms -> 200ms
- wait_for_sync_status: 60s -> 10s
- wait_for_worker_startup: 1000ms -> 200ms
- Distinguish worker slot exists vs no slot for accurate subscription status
- Fix CI artifact paths to capture regression.diffs from source root
- Show regression diffs directly in job summary for easier debugging
On Windows, pg_usleep has ~15ms timer granularity which can cause the
apply_delay to fall slightly short of the requested duration. This
caused the apply_delay regression test to fail intermittently.

Add a 100ms buffer on Windows and guard against negative sleep values
that could occur when processing delays exceed the target time.
…rate state

This reverts the sync status lookup that incorrectly reported "replicating"
when a worker slot existed but the worker wasn't actually connected.
Also untrack .clangd file and add it to .gitignore.
Three fixes for race conditions when extension is dropped and recreated:

1. Notify supervisor immediately when manager exits cleanly, not just
   on crash. Previously supervisor waited up to 30s before restarting.

2. Retry extension check on manager startup (5 attempts, 200ms apart)
   to handle window between DROP EXTENSION and CREATE EXTENSION.

3. Return false instead of exiting when no local node found, letting
   the main loop wait and retry for create_node() to complete.

Also adds 500ms delay on Windows after sync completes to ensure
streaming connection is established before checking pg_replication_slots.

Includes stress test scripts to detect flaky tests (20/20 passes).
@willibrandon
willibrandon force-pushed the 002-github-releases branch 2 times, most recently from 3055429 to c596432 Compare January 8, 2026 06:19
- Remove deprecated PostgreSQL 13 and 14 from build matrix
- Remove Intel Mac (macos-15-intel) builds - Apple Silicon only now
- Switch ARM64 runner from macos-14 to macos-26
- Fix artifact upload to use regression_output/ directory
WiX v5 resolves source paths relative to where 'wix build' is run,
not relative to the .wxs file location. Updated paths from
"..\..\build\Release" to "build\Release" to resolve from repo root.
1. Use absolute paths for WiX file harvesting - relative paths with "."
   prefix weren't matching SQL files correctly in WiX v5
2. Add MSI_VERSION variable for numeric-only version (strips -rc* suffix)
   to satisfy MSI version requirements (major.minor.patch only)
3. Add MSI verification step that checks file size and attempts install
4. Update Package Name to show full version including prerelease suffix
Make MSI verification step strict - any installation failure now
fails the release workflow instead of just logging warnings.
@willibrandon
willibrandon merged commit 76a514b into REL2_x_STABLE Jan 8, 2026
12 checks passed
@willibrandon
willibrandon deleted the 002-github-releases branch January 8, 2026 15:41
@willibrandon willibrandon added packaging Release packaging, installers, and distribution and removed infrastructure labels Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request packaging Release packaging, installers, and distribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant