@@ -401,6 +401,9 @@ jobs:
401
401
if : " !contains(github.event.head_commit.message, 'nogha')"
402
402
env :
403
403
RUSTC_WRAPPER : sccache
404
+ SCCACHE_CACHE_SIZE : 20G
405
+ SCCACHE_DIR : /Users/runner/Library/Caches/Mozilla.sccache
406
+ SCCACHE_IDLE_TIMEOUT : 0
404
407
405
408
strategy :
406
409
matrix :
@@ -414,9 +417,11 @@ jobs:
414
417
echo ""
415
418
416
419
echo "----- Install sccache -----"
417
- brew update
418
- brew install sccache
419
- mkdir -p /Users/runner/Library/Caches/Mozilla.sccache
420
+ curl -L https://github.com/mozilla/sccache/releases/download/v0.5.4/sccache-v0.5.4-x86_64-apple-darwin.tar.gz | tar xz
421
+ mv -f sccache-v0.5.4-x86_64-apple-darwin/sccache /usr/local/bin
422
+ chmod +x /usr/local/bin/sccache
423
+ mkdir -p $SCCACHE_DIR
424
+ sccache --version
420
425
421
426
# https://stackoverflow.com/questions/57968497/how-do-i-set-an-env-var-with-a-bash-expression-in-github-actions/57969570#57969570
422
427
echo "----- Getting pre-installed Postgres major version -----"
@@ -426,7 +431,7 @@ jobs:
426
431
427
432
echo "----- Set up Postgres permissions -----"
428
433
sudo chmod a+rwx `$(which pg_config) --pkglibdir` `$(which pg_config) --sharedir`/extension
429
- ls -lath `$(which pg_config) --pkglibdir` `$(which pg_config) --sharedir`/extension
434
+ # ls -lath `$(which pg_config) --pkglibdir` `$(which pg_config) --sharedir`/extension
430
435
echo ""
431
436
432
437
echo "----- Output Cargo version -----"
@@ -437,46 +442,43 @@ jobs:
437
442
env
438
443
echo ""
439
444
445
+
440
446
- name : Cache sccache directory
441
447
uses : actions/cache@v3
442
448
continue-on-error : false
443
449
with :
444
450
path : /Users/runner/Library/Caches/Mozilla.sccache
445
- key : pgrx-sccache-macos-11-${{ hashFiles('**/Cargo.lock', '.github/workflows/tests.yml') }}
451
+ key : pgrx-sccache-macos-11-${{ hashFiles('**/Cargo.lock', '.github/workflows/tests.yml', '.cargo/config.toml') }}
452
+
453
+ - name : Cache cargo directory
454
+ uses : actions/cache@v3
455
+ with :
456
+ path : |
457
+ ~/.cargo
458
+ key : pgrx-cargo-macos-11-tests-${{ hashFiles('**/Cargo.lock', '.github/workflows/tests.yml', '.cargo/config.toml') }}
446
459
447
460
- name : Start sccache server
448
461
run : sccache --start-server
449
462
450
463
- name : Print sccache stats
451
464
run : sccache --show-stats
452
465
453
- - name : Cache cargo directory
454
- uses : actions/cache@v3
455
- with :
456
- path : |
457
- ~/.cargo/registry
458
- ~/.cargo/git
459
- key : pgrx-macos-11-tests-${{ hashFiles('**/Cargo.lock', '.github/workflows/tests.yml') }}
460
-
461
466
- name : Install cargo-pgrx
462
467
run : cargo install --path cargo-pgrx/ --debug --force
463
468
469
+ - name : Print sccache stats
470
+ run : sccache --show-stats
471
+
464
472
- name : Run 'cargo pgrx init'
465
473
run : |
466
474
set -x
467
475
cargo pgrx init --pg$PG_VER $(which pg_config)
468
476
469
- - name : Run base-level tests
470
- run : |
471
- set -x
472
- cargo test \
473
- --features "pg$PG_VER" --no-default-features \
474
- --package cargo-pgrx \
475
- --package pgrx \
476
- --package pgrx-macros \
477
- --package pgrx-pg-sys \
478
- --package pgrx-tests \
479
- --package pgrx-sql-entity-graph
477
+ - name : Run tests
478
+ run : cargo test --all --features "pg$PG_VER pg_test cshim" --no-default-features
479
+
480
+ - name : Print sccache stats
481
+ run : sccache --show-stats
480
482
481
483
- name : Stop sccache server
482
484
run : sccache --stop-server || true
0 commit comments