Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[donotland] Looking into the versioned-so thing #1212

Closed
wants to merge 6 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[target.'cfg(target_os="macos")']
# Postgres symbols won't be available until runtime
rustflags = ["-Clink-arg=-Wl,-undefined,dynamic_lookup"]
[target.x86_64-unknown-linux-gnu]
rustflags = ["-Clink-arg=-Wl,-V"]
77 changes: 41 additions & 36 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -23,9 +23,9 @@ jobs:
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, 'nogha')"
env:
RUSTC_WRAPPER: sccache
# RUSTC_WRAPPER: sccache
SCCACHE_DIR: /home/runner/.cache/sccache
RUSTFLAGS: -Copt-level=0
RUSTFLAGS: -Copt-level=0 -Clink-arg=-Wl,-V

strategy:
fail-fast: false
@@ -160,101 +160,106 @@ jobs:
--package pgrx \
--package pgrx-macros \
--package pgrx-pg-sys \
--package pgrx-sql-entity-graph
--package pgrx-sql-entity-graph \
--verbose
- name: Check that cross-compiled pgrx-tests can build
run: |
cargo build --tests \
--features "pg$PG_VER" \
--package pgrx-tests \
--target aarch64-unknown-linux-gnu
--target aarch64-unknown-linux-gnu \
--verbose
- name: Run pgrx-tests with cshim enabled
run: |
cargo test \
--features "pg$PG_VER cshim" \
--package pgrx-tests
--package pgrx-tests --verbose --verbose
- name: Run pgrx-tests with cshim disabled
run: |
cargo test \
--features "pg$PG_VER" \
--package pgrx-tests
--package pgrx-tests --verbose
- name: Run aggregate example tests
run: cargo test --package aggregate --features "pg$PG_VER" --no-default-features
run: cargo test --package aggregate --features "pg$PG_VER" --no-default-features --verbose

- name: Run arrays example tests
run: cargo test --package arrays --features "pg$PG_VER" --no-default-features
run: cargo test --package arrays --features "pg$PG_VER" --no-default-features --verbose

- name: Run bad_ideas example tests
run: cargo test --package bad_ideas --features "pg$PG_VER" --no-default-features
run: cargo test --package bad_ideas --features "pg$PG_VER" --no-default-features --verbose

- name: Run bgworker example tests
run: cargo test --package bgworker --features "pg$PG_VER" --no-default-features
run: cargo test --package bgworker --features "pg$PG_VER" --no-default-features --verbose

- name: Run bytea example tests
run: cargo test --package bytea --features "pg$PG_VER" --no-default-features
run: cargo test --package bytea --features "pg$PG_VER" --no-default-features --verbose

- name: Run composite_type example tests
run: cargo test --package composite_type --features "pg$PG_VER" --no-default-features
run: cargo test --package composite_type --features "pg$PG_VER" --no-default-features --verbose

- name: Run custom_libname example tests
run: cargo test --package custom_libname --features "pg$PG_VER" --no-default-features
run: cargo test --package custom_libname --features "pg$PG_VER" --no-default-features --verbose

- name: Run custom_types example tests
run: cargo test --package custom_types --features "pg$PG_VER" --no-default-features
run: cargo test --package custom_types --features "pg$PG_VER" --no-default-features --verbose

- name: Run custom_types without schema generation example tests
run: cargo test --package custom_types --features "pg$PG_VER no-schema-generation" --no-default-features
run: cargo test --package custom_types --features "pg$PG_VER no-schema-generation" --no-default-features --verbose

- name: Run custom_sql example tests
run: cargo test --package custom_sql --features "pg$PG_VER" --no-default-features
run: cargo test --package custom_sql --features "pg$PG_VER" --no-default-features --verbose

- name: Run datetime example tests
run: cargo test --package datetime --features "pg$PG_VER" --no-default-features
run: cargo test --package datetime --features "pg$PG_VER" --no-default-features --verbose

- name: Run errors example tests
run: cargo test --package errors --features "pg$PG_VER" --no-default-features
run: cargo test --package errors --features "pg$PG_VER" --no-default-features --verbose

- name: Run nostd example tests
run: cargo test --package nostd --features "pg$PG_VER" --no-default-features
run: cargo test --package nostd --features "pg$PG_VER" --no-default-features --verbose

- name: Run numeric example tests
run: cargo test --package numeric --features "pg$PG_VER" --no-default-features
run: cargo test --package numeric --features "pg$PG_VER" --no-default-features --verbose

- name: Run pgtrybuilder example tests
run: cargo test --package pgtrybuilder --features "pg$PG_VER" --no-default-features
run: cargo test --package pgtrybuilder --features "pg$PG_VER" --no-default-features --verbose

- name: Run operators example tests
run: cargo test --package operators --features "pg$PG_VER" --no-default-features
run: cargo test --package operators --features "pg$PG_VER" --no-default-features --verbose

- name: Run range example tests
run: cargo test --package range --features "pg$PG_VER" --no-default-features
run: cargo test --package range --features "pg$PG_VER" --no-default-features --verbose

- name: Run schemas example tests
run: cargo test --package schemas --features "pg$PG_VER" --no-default-features
run: cargo test --package schemas --features "pg$PG_VER" --no-default-features --verbose

- name: Run shmem example tests
run: cargo test --package shmem --features "pg$PG_VER" --no-default-features
run: cargo test --package shmem --features "pg$PG_VER" --no-default-features --verbose

- name: Run spi example tests
run: cargo test --package spi --features "pg$PG_VER" --no-default-features
run: cargo test --package spi --features "pg$PG_VER" --no-default-features --verbose

- name: Run spi_srf example tests
run: cargo test --package spi_srf --features "pg$PG_VER" --no-default-features
run: cargo test --package spi_srf --features "pg$PG_VER" --no-default-features --verbose

- name: Run srf example tests
run: cargo test --package srf --features "pg$PG_VER" --no-default-features
run: cargo test --package srf --features "pg$PG_VER" --no-default-features --verbose

- name: Run strings example tests
run: cargo test --package strings --features "pg$PG_VER" --no-default-features
run: cargo test --package strings --features "pg$PG_VER" --no-default-features --verbose

- name: Run triggers example tests
run: cargo test --package triggers --features "pg$PG_VER" --no-default-features
run: cargo test --package triggers --features "pg$PG_VER" --no-default-features --verbose

# - name: Run versioned_custom_libname_so example tests
# run: cargo test --package versioned_custom_libname_so --features "pg$PG_VER" --no-default-features
- name: Run versioned_custom_libname_so example tests
run: cargo test --package versioned_custom_libname_so --features "pg$PG_VER" --no-default-features --verbose

- name: Run versioned_so example tests
run: cargo test --package versioned_so --features "pg$PG_VER" --no-default-features --verbose

# Attempt to make the cache payload slightly smaller.
- name: Clean up built PGRX files
@@ -279,9 +284,9 @@ jobs:
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, 'nogha')"
env:
RUSTC_WRAPPER: sccache
# RUSTC_WRAPPER: sccache
SCCACHE_DIR: /home/runner/.cache/sccache
RUSTFLAGS: -Copt-level=0
RUSTFLAGS: -Copt-level=0 -Clink-arg=-Wl,-V

strategy:
matrix:
@@ -400,7 +405,7 @@ jobs:
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, 'nogha')"
env:
RUSTC_WRAPPER: sccache
# RUSTC_WRAPPER: sccache
SCCACHE_CACHE_SIZE: 20G
SCCACHE_DIR: /Users/runner/Library/Caches/Mozilla.sccache
SCCACHE_IDLE_TIMEOUT: 0
@@ -475,7 +480,7 @@ jobs:
cargo pgrx init --pg$PG_VER $(which pg_config)
- name: Run tests
run: cargo test --all --features "pg$PG_VER pg_test cshim" --no-default-features
run: cargo test --all --features "pg$PG_VER pg_test cshim" --no-default-features --verbose

- name: Print sccache stats
run: sccache --show-stats
3 changes: 2 additions & 1 deletion cargo-pgrx/src/command/install.rs
Original file line number Diff line number Diff line change
@@ -126,7 +126,8 @@ pub(crate) fn install_extension(
let versioned_so = get_property(&package_manifest_path, "module_pathname")?.is_none();

let build_command_output =
build_extension(user_manifest_path.as_ref(), user_package, &profile, &features)?;
dbg!(build_extension(user_manifest_path.as_ref(), user_package, &profile, &features))?;

let build_command_bytes = build_command_output.stdout;
let build_command_reader = BufReader::new(build_command_bytes.as_slice());
let build_command_stream = cargo_metadata::Message::parse_stream(build_command_reader);