|
15 | 15 | CARGO_INCREMENTAL: "false"
|
16 | 16 | SCCACHE_MAX_FRAME_LENGTH: 100000000
|
17 | 17 | # CARGO_LOG: cargo::core::compiler::fingerprint=info # Uncomment this to output compiler fingerprint info
|
| 18 | + TOOL_DIR: ./tools |
18 | 19 |
|
19 | 20 | jobs:
|
20 | 21 | lintck:
|
|
43 | 44 | mkdir -p /home/runner/.cache/sccache
|
44 | 45 | echo ""
|
45 | 46 |
|
46 |
| - ./ci/rustup.sh |
| 47 | + "$TOOL_DIR"/rustup.sh |
47 | 48 |
|
48 | 49 | # https://stackoverflow.com/questions/57968497/how-do-i-set-an-env-var-with-a-bash-expression-in-github-actions/57969570#57969570
|
49 | 50 |
|
|
77 | 78 | run: cargo fmt --all -- --check
|
78 | 79 |
|
79 | 80 | - name: Run license check
|
80 |
| - run: cargo install cargo-deny --locked && ./ci/license-check.sh |
| 81 | + run: cargo install cargo-deny --locked && "$TOOL_DIR"/license-check.sh |
81 | 82 |
|
82 | 83 | # We can't lint most crates because they require "cargo pgrx init" to build
|
83 | 84 | - name: Clippy -Dwarnings sql-entity-graph
|
@@ -149,7 +150,7 @@ jobs:
|
149 | 150 | zlib1g-dev
|
150 | 151 | echo ""
|
151 | 152 |
|
152 |
| - ./ci/rustup.sh |
| 153 | + "$TOOL_DIR"/rustup.sh |
153 | 154 |
|
154 | 155 | echo "----- Set up cross compilation -----"
|
155 | 156 | sudo apt-get install -y --fix-missing crossbuild-essential-arm64
|
@@ -250,88 +251,88 @@ jobs:
|
250 | 251 |
|
251 | 252 |
|
252 | 253 | - name: Run aggregate example tests
|
253 |
| - run: cargo test --package aggregate --features "pg$PG_VER" --no-default-features |
| 254 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/aggregate/Cargo.toml --features "pg$PG_VER" --no-default-features |
254 | 255 |
|
255 | 256 | - name: Run arrays example tests
|
256 |
| - run: cargo test --package arrays --features "pg$PG_VER" --no-default-features |
| 257 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/arrays/Cargo.toml --features "pg$PG_VER" --no-default-features |
257 | 258 |
|
258 | 259 | - name: Run bad_ideas example tests
|
259 |
| - run: cargo test --package bad_ideas --features "pg$PG_VER" --no-default-features |
| 260 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/bad_ideas/Cargo.toml --features "pg$PG_VER" --no-default-features |
260 | 261 |
|
261 | 262 | - name: Run bgworker example tests
|
262 |
| - run: cargo test --package bgworker --features "pg$PG_VER" --no-default-features |
| 263 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/bgworker/Cargo.toml --features "pg$PG_VER" --no-default-features |
263 | 264 |
|
264 | 265 | - name: Run bytea example tests
|
265 |
| - run: cargo test --package bytea --features "pg$PG_VER" --no-default-features |
| 266 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/bytea/Cargo.toml --features "pg$PG_VER" --no-default-features |
266 | 267 |
|
267 | 268 | - name: Run composite_type example tests
|
268 |
| - run: cargo test --package composite_type --features "pg$PG_VER" --no-default-features |
| 269 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/composite_type/Cargo.toml --features "pg$PG_VER" --no-default-features |
269 | 270 |
|
270 | 271 | - name: Run custom_libname example tests
|
271 |
| - run: cargo test --package custom_libname --features "pg$PG_VER" --no-default-features |
| 272 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/custom_libname/Cargo.toml --features "pg$PG_VER" --no-default-features |
272 | 273 |
|
273 | 274 | - name: Run custom_types example tests
|
274 |
| - run: cargo test --package custom_types --features "pg$PG_VER" --no-default-features |
| 275 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/custom_types/Cargo.toml --features "pg$PG_VER" --no-default-features |
275 | 276 |
|
276 | 277 | - name: Run custom_types without schema generation example tests
|
277 |
| - run: cargo test --package custom_types --features "pg$PG_VER no-schema-generation" --no-default-features |
| 278 | + 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 |
278 | 279 |
|
279 | 280 | - name: Run custom_sql example tests
|
280 |
| - run: cargo test --package custom_sql --features "pg$PG_VER" --no-default-features |
| 281 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/custom_sql/Cargo.toml --features "pg$PG_VER" --no-default-features |
281 | 282 |
|
282 | 283 | - name: Run datetime example tests
|
283 |
| - run: cargo test --package datetime --features "pg$PG_VER" --no-default-features |
| 284 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/datetime/Cargo.toml --features "pg$PG_VER" --no-default-features |
284 | 285 |
|
285 | 286 | - name: Run errors example tests
|
286 |
| - run: cargo test --package errors --features "pg$PG_VER" --no-default-features |
| 287 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/errors/Cargo.toml --features "pg$PG_VER" --no-default-features |
287 | 288 |
|
288 | 289 | - name: Run nostd example tests
|
289 |
| - run: cargo test --package nostd --features "pg$PG_VER" --no-default-features |
| 290 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/nostd/Cargo.toml --features "pg$PG_VER" --no-default-features |
290 | 291 |
|
291 | 292 | - name: Run numeric example tests
|
292 |
| - run: cargo test --package numeric --features "pg$PG_VER" --no-default-features |
| 293 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/numeric/Cargo.toml --features "pg$PG_VER" --no-default-features |
293 | 294 |
|
294 | 295 | - name: Run pgtrybuilder example tests
|
295 |
| - run: cargo test --package pgtrybuilder --features "pg$PG_VER" --no-default-features |
| 296 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/pgtrybuilder/Cargo.toml --features "pg$PG_VER" --no-default-features |
296 | 297 |
|
297 | 298 | - name: Run operators example tests
|
298 |
| - run: cargo test --package operators --features "pg$PG_VER" --no-default-features |
| 299 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/operators/Cargo.toml --features "pg$PG_VER" --no-default-features |
299 | 300 |
|
300 | 301 | - name: Run range example tests
|
301 |
| - run: cargo test --package range --features "pg$PG_VER" --no-default-features |
| 302 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/range/Cargo.toml --features "pg$PG_VER" --no-default-features |
302 | 303 |
|
303 | 304 | - name: Run schemas example tests
|
304 |
| - run: cargo test --package schemas --features "pg$PG_VER" --no-default-features |
| 305 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/schemas/Cargo.toml --features "pg$PG_VER" --no-default-features |
305 | 306 |
|
306 | 307 | - name: Run shmem example tests
|
307 |
| - run: cargo test --package shmem --features "pg$PG_VER" --no-default-features |
| 308 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/shmem/Cargo.toml --features "pg$PG_VER" --no-default-features |
308 | 309 |
|
309 | 310 | - name: Run spi example tests
|
310 |
| - run: cargo test --package spi --features "pg$PG_VER" --no-default-features |
| 311 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/spi/Cargo.toml --features "pg$PG_VER" --no-default-features |
311 | 312 |
|
312 | 313 | - name: Run spi_srf example tests
|
313 |
| - run: cargo test --package spi_srf --features "pg$PG_VER" --no-default-features |
| 314 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/spi_srf/Cargo.toml --features "pg$PG_VER" --no-default-features |
314 | 315 |
|
315 | 316 | - name: Run srf example tests
|
316 |
| - run: cargo test --package srf --features "pg$PG_VER" --no-default-features |
| 317 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/srf/Cargo.toml --features "pg$PG_VER" --no-default-features |
317 | 318 |
|
318 | 319 | - name: Run strings example tests
|
319 |
| - run: cargo test --package strings --features "pg$PG_VER" --no-default-features |
| 320 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/strings/Cargo.toml --features "pg$PG_VER" --no-default-features |
320 | 321 |
|
321 | 322 | - name: Run triggers example tests
|
322 |
| - run: cargo test --package triggers --features "pg$PG_VER" --no-default-features |
| 323 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/triggers/Cargo.toml --features "pg$PG_VER" --no-default-features |
323 | 324 |
|
324 | 325 | - name: Run versioned_custom_libname_so example tests
|
325 |
| - run: cargo test --package versioned_custom_libname_so --features "pg$PG_VER" --no-default-features |
| 326 | + 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 |
326 | 327 |
|
327 | 328 | - name: Run versioned_so example tests
|
328 |
| - run: cargo test --package versioned_so --features "pg$PG_VER" --no-default-features |
| 329 | + run: CARGO_TARGET_DIR="$(pwd)/target" cargo test --manifest-path=pgrx-examples/versioned_so/Cargo.toml --features "pg$PG_VER" --no-default-features |
329 | 330 |
|
330 | 331 | - name: Run `cargo pgrx schema` against the versioned_custom_libname_so example
|
331 |
| - run: cargo pgrx schema pg$PG_VER --package versioned_custom_libname_so |
| 332 | + run: cd pgrx-examples/versioned_custom_libname_so && cargo pgrx schema pg$PG_VER |
332 | 333 |
|
333 | 334 | - name: Test that version bumps work
|
334 |
| - run: ./update-versions.sh 0.0.999-rc.999 |
| 335 | + run: ./update-versions.sh 0.0.999-rc.999 && cargo +nightly package --workspace -Zpackage-workspace --allow-dirty --features "pg$PG_VER" |
335 | 336 |
|
336 | 337 | # Attempt to make the cache payload slightly smaller.
|
337 | 338 | - name: Clean up built PGRX files
|
@@ -401,7 +402,7 @@ jobs:
|
401 | 402 | zlib1g-dev
|
402 | 403 | echo ""
|
403 | 404 |
|
404 |
| - ./ci/rustup.sh |
| 405 | + "$TOOL_DIR"/rustup.sh |
405 | 406 |
|
406 | 407 | echo "----- Outputting env -----"
|
407 | 408 | env
|
@@ -528,7 +529,7 @@ jobs:
|
528 | 529 | # ls -lath `$(which pg_config) --pkglibdir` `$(which pg_config) --sharedir`/extension
|
529 | 530 | echo ""
|
530 | 531 |
|
531 |
| - ./ci/rustup.sh |
| 532 | + "$TOOL_DIR"/rustup.sh |
532 | 533 |
|
533 | 534 | echo "----- Outputting env -----"
|
534 | 535 | env
|
|
0 commit comments