Skip to content

Commit 739bc98

Browse files
committed
feat: multiple versions for the wrappers extension
Build multiple versions of the wrappers extension on different PostgreSQL versions. Add test for the extensions and their upgrade on PostgreSQL 15 and 17. Make sure we build cargo extension and cargo-pgrx with the specified Rust version.
1 parent 7adfd90 commit 739bc98

File tree

6 files changed

+424
-164
lines changed

6 files changed

+424
-164
lines changed

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,6 +1382,7 @@
13821382
psql_15 = makeCheckHarness basePackages.psql_15.bin;
13831383
psql_17 = makeCheckHarness basePackages.psql_17.bin;
13841384
psql_orioledb-17 = makeCheckHarness basePackages.psql_orioledb-17.bin;
1385+
wrappers = import ./nix/tests/wrappers.nix { inherit self; inherit pkgs; };
13851386
};
13861387

13871388
# Apps is a list of names of things that can be executed with 'nix run';

nix/cargo-pgrx/mkPgrxExtension.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ let
2626
let
2727
pgrx =
2828
versions.${pgrxVersion}
29-
or (throw "Unsupported pgrx version ${pgrxVersion}. Available versions: ${builtins.attrNames versions}. Change 'nix/cargo-pgrx/versions.json' to add support for new versions.");
29+
or (throw "Unsupported pgrx version ${pgrxVersion}. Available versions: ${builtins.toString (builtins.attrNames versions)}. Change 'nix/cargo-pgrx/versions.json' to add support for new versions.");
3030
mapping = {
3131
inherit (pgrx) hash;
3232
cargoHash =
3333
pgrx.rust."${rustVersion}".cargoHash
34-
or (throw "Unsupported rust version ${rustVersion} for pgrx version ${pgrxVersion}. Available Rust versions: ${builtins.attrNames pgrx.rust}. Change 'nix/cargo-pgrx/versions.json' to add support for new versions.");
34+
or (throw "Unsupported rust version ${rustVersion} for pgrx version ${pgrxVersion}. Available Rust versions: ${builtins.toString (builtins.attrNames pgrx.rust)}. Change 'nix/cargo-pgrx/versions.json' to add support for new versions.");
3535
};
3636
in
3737
mkCargoPgrx {

nix/cargo-pgrx/versions.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
"0.11.3": {
1414
"hash": "sha256-UHIfwOdXoJvR4Svha6ud0FxahP1wPwUtviUwUnTmLXU=",
1515
"rust": {
16+
"1.76.0": {
17+
"cargoHash": "sha256-j4HnD8Zt9uhlV5N7ldIy9564o9qFEqs5KfXHmnQ1WEw="
18+
},
1619
"1.85.1": {
1720
"cargoHash": "sha256-KBlT3FARjGcbtHIGDoC6ir3aNXXfDRmIoy990SOqoFg="
1821
}
@@ -21,6 +24,9 @@
2124
"0.12.6": {
2225
"hash": "sha256-7aQkrApALZe6EoQGVShGBj0UIATnfOy2DytFj9IWdEA=",
2326
"rust": {
27+
"1.80.0": {
28+
"cargoHash": "sha256-Di4UldQwAt3xVyvgQT1gUhdvYUVp7n/a72pnX45kP0w="
29+
},
2430
"1.81.0": {
2531
"cargoHash": "sha256-Di4UldQwAt3xVyvgQT1gUhdvYUVp7n/a72pnX45kP0w="
2632
}
@@ -31,6 +37,9 @@
3137
"rust": {
3238
"1.81.0": {
3339
"cargoHash": "sha256-53HKhvsKLTa2JCByLEcK3UzWXoM+LTatd98zvS1C9no="
40+
},
41+
"1.84.0": {
42+
"cargoHash": "sha256-KTKcol9qSNLQZGW32e6fBb6cPkUGItknyVpLdBYqrBY="
3443
}
3544
}
3645
}

nix/ext/versions.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"wrappers": {
3+
"0.4.2": {
4+
"postgresql": [
5+
"15"
6+
],
7+
"hash": "sha256-ut3IQED6ANXgabiHoEUdfSrwkuuYYSpRoeWdtBvSe64=",
8+
"pgrx": "0.11.3",
9+
"rust": "1.76.0"
10+
},
11+
"0.4.3": {
12+
"postgresql": [
13+
"15"
14+
],
15+
"hash": "sha256-CkoNMoh40zbQL4V49ZNYgv3JjoNWjODtTpHn+L8DdZA=",
16+
"pgrx": "0.12.6",
17+
"rust": "1.80.0"
18+
},
19+
"0.4.4": {
20+
"postgresql": [
21+
"15",
22+
"17"
23+
],
24+
"hash": "sha256-QoGFJpq8PuvMM8SS+VZd7MlNl56uFivRjs1tCtwX+oE=",
25+
"pgrx": "0.12.6",
26+
"rust": "1.80.0"
27+
},
28+
"0.4.5": {
29+
"postgresql": [
30+
"15",
31+
"17"
32+
],
33+
"hash": "sha256-IgDfVFROMCHYLZ/Iqj12MsQjPPCdRoH+3oi3Ki/iaRI=",
34+
"pgrx": "0.12.9",
35+
"rust": "1.81.0"
36+
},
37+
"0.4.6": {
38+
"postgresql": [
39+
"15",
40+
"17"
41+
],
42+
"hash": "sha256-hthb3qEXT1Kf4yPoq0udEbQzlyLtI5tug6sK4YAPFjU=",
43+
"pgrx": "0.12.9",
44+
"rust": "1.84.0"
45+
},
46+
"0.5.0": {
47+
"postgresql": [
48+
"15",
49+
"17"
50+
],
51+
"hash": "sha256-FbRTUcpEHBa5DI6dutvBeahYM0RZVAXIzIAZWIaxvn0=",
52+
"pgrx": "0.12.9",
53+
"rust": "1.84.0"
54+
}
55+
}
56+
}

0 commit comments

Comments
 (0)