Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
fba2374
remove unpublished packages from ws
workingjubilee Aug 7, 2024
34634f5
add short aliases
workingjubilee Aug 7, 2024
f849fe7
update cargo.lock
workingjubilee Aug 7, 2024
e5fbd06
Add publishability check
workingjubilee Aug 7, 2024
cfc7aaf
move version-updater into new tools dir
workingjubilee Aug 7, 2024
21c35fa
add lockfile for version-updater
workingjubilee Aug 9, 2024
6865935
move packaging test to later
workingjubilee Aug 9, 2024
0f93c2c
move tests to use tools dir
workingjubilee Aug 9, 2024
95acd1c
add workspace entry to an example
workingjubilee Aug 9, 2024
3ce0aa3
exclude the example packages
workingjubilee Aug 9, 2024
b6410e0
try again
workingjubilee Aug 9, 2024
3fabe6a
this had better not work
workingjubilee Aug 9, 2024
6026049
oops
workingjubilee Aug 9, 2024
a36a57d
try rewriting the example testing
workingjubilee Aug 9, 2024
b24baad
use individual members for excludes
workingjubilee Aug 9, 2024
e896f03
this abomination
workingjubilee Aug 9, 2024
3452844
comment out most tests for faster iteration
workingjubilee Aug 9, 2024
84e74c3
fixup the one test that differed
workingjubilee Aug 9, 2024
8108518
fixup version updates
workingjubilee Aug 9, 2024
418ffc4
fixup tools Cargo.toml
workingjubilee Aug 9, 2024
3bbf149
comment out more tests
workingjubilee Aug 9, 2024
03a3e09
always install nightly
workingjubilee Aug 9, 2024
b9641c6
allow-dirty
workingjubilee Aug 9, 2024
1c8c263
remember to add feature
workingjubilee Aug 9, 2024
06c3ba1
Revert "comment out more tests"
workingjubilee Aug 9, 2024
8c3da89
Revert "comment out most tests for faster iteration"
workingjubilee Aug 9, 2024
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
6 changes: 6 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[alias]
b = "build --features"
c = "check --features"
t = "test --features"
r = "run --features"

[target.'cfg(target_os="macos")']
# Postgres symbols won't be available until runtime
rustflags = ["-Clink-arg=-Wl,-undefined,dynamic_lookup"]
67 changes: 34 additions & 33 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ env:
CARGO_INCREMENTAL: "false"
SCCACHE_MAX_FRAME_LENGTH: 100000000
# CARGO_LOG: cargo::core::compiler::fingerprint=info # Uncomment this to output compiler fingerprint info
TOOL_DIR: ./tools

jobs:
lintck:
Expand Down Expand Up @@ -43,7 +44,7 @@ jobs:
mkdir -p /home/runner/.cache/sccache
echo ""

./ci/rustup.sh
"$TOOL_DIR"/rustup.sh

# https://stackoverflow.com/questions/57968497/how-do-i-set-an-env-var-with-a-bash-expression-in-github-actions/57969570#57969570

Expand Down Expand Up @@ -77,7 +78,7 @@ jobs:
run: cargo fmt --all -- --check

- name: Run license check
run: cargo install cargo-deny --locked && ./ci/license-check.sh
run: cargo install cargo-deny --locked && "$TOOL_DIR"/license-check.sh

# We can't lint most crates because they require "cargo pgrx init" to build
- name: Clippy -Dwarnings sql-entity-graph
Expand Down Expand Up @@ -149,7 +150,7 @@ jobs:
zlib1g-dev
echo ""

./ci/rustup.sh
"$TOOL_DIR"/rustup.sh

echo "----- Set up cross compilation -----"
sudo apt-get install -y --fix-missing crossbuild-essential-arm64
Expand Down Expand Up @@ -250,88 +251,88 @@ jobs:


- name: Run aggregate example tests
run: cargo test --package aggregate --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/aggregate/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run arrays example tests
run: cargo test --package arrays --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/arrays/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run bad_ideas example tests
run: cargo test --package bad_ideas --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/bad_ideas/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run bgworker example tests
run: cargo test --package bgworker --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/bgworker/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run bytea example tests
run: cargo test --package bytea --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/bytea/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run composite_type example tests
run: cargo test --package composite_type --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/composite_type/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run custom_libname example tests
run: cargo test --package custom_libname --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/custom_libname/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run custom_types example tests
run: cargo test --package custom_types --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/custom_types/Cargo.toml --features "pg$PG_VER" --no-default-features

- 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_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/custom_types/Cargo.toml --features "pg$PG_VER no-schema-generation" --no-default-features

- name: Run custom_sql example tests
run: cargo test --package custom_sql --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/custom_sql/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run datetime example tests
run: cargo test --package datetime --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/datetime/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run errors example tests
run: cargo test --package errors --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/errors/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run nostd example tests
run: cargo test --package nostd --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/nostd/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run numeric example tests
run: cargo test --package numeric --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/numeric/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run pgtrybuilder example tests
run: cargo test --package pgtrybuilder --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/pgtrybuilder/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run operators example tests
run: cargo test --package operators --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/operators/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run range example tests
run: cargo test --package range --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/range/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run schemas example tests
run: cargo test --package schemas --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/schemas/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run shmem example tests
run: cargo test --package shmem --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/shmem/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run spi example tests
run: cargo test --package spi --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/spi/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run spi_srf example tests
run: cargo test --package spi_srf --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/spi_srf/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run srf example tests
run: cargo test --package srf --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/srf/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run strings example tests
run: cargo test --package strings --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/strings/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run triggers example tests
run: cargo test --package triggers --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/triggers/Cargo.toml --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
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/versioned_custom_libname_so/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run versioned_so example tests
run: cargo test --package versioned_so --features "pg$PG_VER" --no-default-features
run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/versioned_so/Cargo.toml --features "pg$PG_VER" --no-default-features

- name: Run `cargo pgrx schema` against the versioned_custom_libname_so example
run: cargo pgrx schema pg$PG_VER --package versioned_custom_libname_so
run: cd pgrx-examples/versioned_custom_libname_so && cargo pgrx schema pg$PG_VER

- name: Test that version bumps work
run: ./update-versions.sh 0.0.999-rc.999
run: ./update-versions.sh 0.0.999-rc.999 && cargo +nightly package --workspace -Zpackage-workspace --allow-dirty --features "pg$PG_VER"

# Attempt to make the cache payload slightly smaller.
- name: Clean up built PGRX files
Expand Down Expand Up @@ -401,7 +402,7 @@ jobs:
zlib1g-dev
echo ""

./ci/rustup.sh
"$TOOL_DIR"/rustup.sh

echo "----- Outputting env -----"
env
Expand Down Expand Up @@ -528,7 +529,7 @@ jobs:
# ls -lath `$(which pg_config) --pkglibdir` `$(which pg_config) --sharedir`/extension
echo ""

./ci/rustup.sh
"$TOOL_DIR"/rustup.sh

echo "----- Outputting env -----"
env
Expand Down
Loading
Loading