Repository navigation
Verify extension builds on PG18 + Python 3.14 - #21
Merged
Merged
Conversation
Parameterize the postgres major version in pgbuild/Makefile (PG_MAJOR, default 17 so existing builds are unchanged) and add an extension-build check workflow: on PRs touching the build, or on demand, it builds postgres + all extensions once on ubuntu x86_64 (Python 3.14, PG18 by default) and runs the test suite against the freshly built binaries. C/C++ compilation goes through ccache and cargo downloads are cached to keep repeat runs quick.
noble has no clang-dev/llvm-dev; use clang + libclang-dev instead.
Latest cargo-pgrx (0.19.x) refuses to build extensions pinned to pgrx 0.16.1, and 0.16.1 already supports Postgres 18, matching every pgrx-based extension pin (pgvectorscale, pg_search).
Without it, install falls back to auto-discovered system postgres (e.g. pg16 on GH runners) instead of the version registered via init. This also makes PG_MAJOR actually take effect for pgrx extensions.
cargo pgrx install has no --pgXX flag; without --pg-config it uses the first pg_config on PATH, which on runners with system postgres silently builds the extension against the wrong major version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacks on #20.
Problem
When someone sends an updated version of a Postgres extension (a version bump in
pgbuild/Makefile), there is no verification that it still builds.What this adds
pgbuild/Makefile: parameterize the Postgres major version viaPG_MAJOR(default17, so all existing builds are unchanged). The postgres branch (REL_<major>_STABLE) and thecargo pgrx init --pg<major>flags derive from it. Verified via dry-run thatPG_MAJOR=18selectsREL_18_STABLE/--pg18and the default still selects 17..github/workflows/extension-build.yml(new): builds postgres + all extensions once on ubuntu x86_64 with Python 3.14 / PG18 by default, then runs the test suite against the freshly built binaries. Triggers on PRs touchingpgbuild/**/Makefile, pushes tomaintouching those paths, and manual dispatch (withpg_major/python_version/extensionsinputs to trial a bump before sending a PR).ccache(cached across runs viaactions/cache), cargo registry downloads are cached too.Note:
pgbuild/Makefileis tracked-but-gitignored, so it needed an explicitgit add -f; thepgbuild/**path filter still matches it in PRs.