-
-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split out pgrx-bindgen crate (#1802)
One last essentially-administrative change, and part of the reason that I did all the mucking-about in #1796. We have a lot of code in pgrx-pg-sys's build.rs, and it's high time that we actually split out the real crate that it is. Currently this *just* moves that around, rather than doing any refactoring, to make the git blame trackable. The packaging test generates a sufficiently large cache that it cannot be done for every version of pgrx in the combinatoric fashion that we usually do, thus, we don't anymore! We simply run it for one version.
- Loading branch information
1 parent
1f7ce64
commit 8124b63
Showing
12 changed files
with
124 additions
and
33 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: verify package can build | ||
|
||
on: | ||
push: | ||
branches: [develop] | ||
pull_request: | ||
branches: [develop] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
RUST_BACKTRACE: 1 | ||
TOOL_DIR: ./tools | ||
PG_VER: 14 | ||
|
||
jobs: | ||
ubuntu: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
prefix-key: "v1-pgrx--package-test" | ||
|
||
- name: Install Postgres deps | ||
run: | | ||
sudo apt-get update -y -qq --fix-missing | ||
sudo apt-get install -y postgresql-server-dev-$PG_VER | ||
- name: Rustup | ||
run: $TOOL_DIR/rustup.sh nightly | ||
|
||
- name: Install cargo pgrx | ||
run: cargo +nightly install --path cargo-pgrx --debug | ||
|
||
- name: cargo pgrx init | ||
run: cargo +nightly pgrx init "--pg$PG_VER=$(which pg_config)" | ||
|
||
- name: Test pgrx can be packaged as a new version | ||
run: | | ||
./update-versions.sh 0.0.999-rc.999 && \ | ||
cargo +nightly package \ | ||
--workspace -Zpackage-workspace \ | ||
--allow-dirty \ | ||
--features "pg$PG_VER" |
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[package] | ||
name = "pgrx-bindgen" | ||
description = "additional bindgen support for pgrx" | ||
version = "0.1.0" | ||
edition = "2021" | ||
license = "MIT" | ||
homepage = "https://github.com/pgcentralfoundation/pgrx" | ||
repository = "https://github.com/pgcentralfoundation/pgrx" | ||
docs = "https://docs.rs/pgrx-bindgen" | ||
|
||
[dependencies] | ||
pgrx-pg-config.workspace = true | ||
|
||
eyre.workspace = true | ||
proc-macro2.workspace = true | ||
syn.workspace = true | ||
walkdir.workspace = true | ||
|
||
bindgen = { version = "0.69", default-features = false, features = ["runtime"] } | ||
clang-sys = { version = "1", features = ["clang_6_0", "runtime"] } | ||
quote = "1.0.33" | ||
shlex = "1.3" # shell lexing, also used by many of our deps |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod build; |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// not a build.rs so that it doesn't inherit the git history of the build.rs | ||
|
||
// little-known Rust quirk: you can import main from wherever | ||
use pgrx_bindgen::build::main; |
This file contains 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