Skip to content

Commit e46b6c8

Browse files
committed
fix: checks must run even on legacy to build and cache
1 parent 76ccfed commit e46b6c8

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

nix/checks.nix

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
let
8585
name = pkg.version;
8686
in
87-
if builtins.match "15.*" name != null then
87+
if builtins.match "15.*" name != null || builtins.match "14.*" name != null then
8888
"15"
8989
else if builtins.match "17.*" name != null then
9090
"17"
@@ -108,6 +108,8 @@
108108
builtins.match "z_orioledb-17_.*" name != null
109109
else if version == "17" then
110110
builtins.match "z_17_.*" name != null
111+
else if version == "14" then
112+
builtins.match "z_15_.*" name != null
111113
else
112114
builtins.match "z_15_.*" name != null
113115
else
@@ -123,11 +125,14 @@
123125
version = builtins.trace "pgpkg.version is: ${pgpkg.version}" pgpkg.version;
124126
isOrioledbMatch = builtins.match "^17_[0-9]+$" version != null;
125127
isSeventeenMatch = builtins.match "^17[.][0-9]+$" version != null;
128+
isFourteenMatch = builtins.match "^14[.][0-9]+$" version != null;
126129
result =
127130
if isOrioledbMatch then
128131
"orioledb-17"
129132
else if isSeventeenMatch then
130133
"17"
134+
else if isFourteenMatch then
135+
"14"
131136
else
132137
"15";
133138
in
@@ -141,6 +146,8 @@
141146
"5535"
142147
else if (majorVersion == "15") then
143148
"5536"
149+
else if (majorVersion == "14") then
150+
"5538"
144151
else
145152
"5537";
146153

@@ -222,6 +229,10 @@
222229
exit 1
223230
fi
224231
done
232+
233+
# Print PostgreSQL version
234+
echo "PostgreSQL version:"
235+
postgres --version
225236
createdb -p ${pgPort} -h ${self.supabase.defaults.host} --username=supabase_admin testing
226237
if ! psql -p ${pgPort} -h ${self.supabase.defaults.host} --username=supabase_admin -d testing -v ON_ERROR_STOP=1 -Xf ${./tests/prime.sql}; then
227238
echo "Error executing SQL file. PostgreSQL log content:"
@@ -291,6 +302,7 @@
291302
psql_15 = makeCheckHarness self'.packages."psql_15/bin";
292303
psql_17 = makeCheckHarness self'.packages."psql_17/bin";
293304
psql_orioledb-17 = makeCheckHarness self'.packages."psql_orioledb-17/bin";
305+
psql_legacy-14 = makeCheckHarness self'.packages."psql_legacy-14/bin";
294306
inherit (self'.packages)
295307
wal-g-2
296308
wal-g-3

nix/tests/prime.sql

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ create extension if not exists pg_surgery;
5353
create extension if not exists pg_tle;
5454
create extension if not exists pg_trgm;
5555
create extension if not exists pg_visibility;
56-
create extension if not exists pg_walinspect;
56+
DO $$
57+
BEGIN
58+
IF current_setting('server_version_num')::integer >= 150000 THEN
59+
CREATE EXTENSION IF NOT EXISTS pg_walinspect;
60+
END IF;
61+
END $$;
5762
create extension if not exists pgaudit;
5863
create extension if not exists pgcrypto;
5964
create extension if not exists pgtap;

0 commit comments

Comments
 (0)