Skip to content

Commit d0612e4

Browse files
committed
feat: 5th attempt at caching
1 parent bb761a8 commit d0612e4

File tree

1 file changed

+5
-19
lines changed

1 file changed

+5
-19
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,11 @@ jobs:
2020
matrix:
2121
os: [ "ubuntu-latest" ]
2222
pg: [ "12", "13", "14", "15", "16" ]
23-
include:
24-
- postgres: 16
25-
rust: "beta"
26-
23+
2724
runs-on: ${{ matrix.os }}
2825
env:
2926
RUSTC_WRAPPER: sccache
3027
SCCACHE_DIR: /home/runner/.cache/sccache
31-
PG_VER: ${{ matrix.postgres }}
3228
RUST_TOOLCHAIN: ${{ matrix.rust || 'stable' }}
3329
steps:
3430
- uses: actions/checkout@v4
@@ -50,10 +46,6 @@ jobs:
5046
cat $GITHUB_ENV
5147
echo ""
5248
53-
echo "----- Remove old postgres -----"
54-
sudo apt remove -y '^postgres.*' '^libpq.*' '^clang.*' '^llvm.*' '^libclang.*' '^libllvm.*' '^mono-llvm.*'
55-
echo ""
56-
5749
echo "----- Install system dependencies -----"
5850
sudo apt-get install -y \
5951
build-essential \
@@ -66,12 +58,6 @@ jobs:
6658
strace \
6759
zlib1g-dev
6860
echo ""
69-
echo "----- Set up cross compilation -----"
70-
sudo apt-get install -y --fix-missing crossbuild-essential-arm64
71-
echo 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc' >> $GITHUB_ENV
72-
# TODO: not all of these should be needed, but for now it's likely fine.
73-
echo 'BINDGEN_EXTRA_CLANG_ARGS_aarch64-unknown-linux-gnu=-target aarch64-unknown-linux-gnu -isystem /usr/aarch64-linux-gnu/include/ -ccc-gcc-name aarch64-linux-gnu-gcc' >> $GITHUB_ENV
74-
7561
echo "----- Print env -----"
7662
env
7763
echo ""
@@ -86,15 +72,15 @@ jobs:
8672
echo ""
8773
8874
sudo apt-get install -y \
89-
postgresql-$PG_VER \
90-
postgresql-server-dev-$PG_VER
75+
postgresql-${{ matrix.pg }} \
76+
postgresql-server-dev-${{ matrix.pg }}
9177
9278
echo ""
9379
echo "----- pg_config -----"
9480
pg_config
9581
echo ""
9682
- name: Set up PostgreSQL permissions
97-
run: sudo chmod a+rwx `/usr/lib/postgresql/$PG_VER/bin/pg_config --pkglibdir` `/usr/lib/postgresql/$PG_VER/bin/pg_config --sharedir`/extension /var/run/postgresql/
83+
run: sudo chmod a+rwx `/usr/lib/postgresql/${{ matrix.pg }}/bin/pg_config --pkglibdir` `/usr/lib/postgresql/${{ matrix.pg }}/bin/pg_config --sharedir`/extension /var/run/postgresql/
9884

9985
- name: Cache cargo registry
10086
uses: actions/cache@v4
@@ -122,7 +108,7 @@ jobs:
122108
run: |
123109
PGRX_VERSION=$(cargo metadata --format-version 1 | jq -r '.packages[]|select(.name=="pgrx")|.version')
124110
cargo install --locked --version=$PGRX_VERSION cargo-pgrx --debug --force
125-
cargo pgrx init --pg${{ matrix.pg }} /usr/lib/postgresql/$PG_VER/bin/pg_config
111+
cargo pgrx init --pg${{ matrix.pg }} /usr/lib/postgresql/${{ matrix.pg }}/bin/pg_config
126112
- name: Run tests
127113
run: echo "\q" | cargo pgrx run pg${{ matrix.pg }} && cargo test --no-default-features --features pg${{ matrix.pg }}
128114

0 commit comments

Comments
 (0)