Skip to content

Commit 040aad4

Browse files
committed
release: pg_idkit 0.2.0
Signed-off-by: GitHub <noreply@github.com>
1 parent e92d22d commit 040aad4

File tree

11 files changed

+146
-51
lines changed

11 files changed

+146
-51
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Explain the issue you have encountered while using `pg_idkit`. Under what condit
1515
| Context | Value |
1616
|--------------------|---------------|
1717
| Postgres version | (ex. `14.5`) |
18-
| `pg_idkit` version | (ex. `0.1.0`) |
18+
| `pg_idkit` version | (ex. `0.2.0`) |
1919

2020
Please explain as much context as possible around the bug in addition to the information above.
2121

.github/workflows/build-and-test/action.yaml renamed to .github/workflows/build-and-test-gnu/action.yaml

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ inputs:
66
default: false
77
description: |
88
Desired artifact name (will replace the natural name)
9+
artifact-tarball-suffix:
10+
type: string
11+
default: "gnu"
12+
description: |
13+
Suffix that will be used on the tarball artifact (ex. '-gnu')
914
rust-container-version:
1015
type: string
1116
default: 1.73
@@ -35,6 +40,16 @@ inputs:
3540
user:
3641
type: string
3742
default: idkit
43+
pgrx-version:
44+
type: string
45+
default: pg16
46+
decription: |
47+
PGRX version (ex. 'pg15', 'pg16')
48+
pg-version:
49+
type: string
50+
default: 16.1
51+
decription: |
52+
Postgres version (ex. '15.5, '16.1')
3853
outputs: {}
3954
runs:
4055
using: "composite"
@@ -101,14 +116,16 @@ runs:
101116
if: ${{ inputs.artifact-upload }}
102117
shell: bash
103118
env:
104-
CARGO_HOME: ${{ inputs.cargo-home-dir }}
105-
CARGO_TARGET_DIR: ${{ inputs.cargo-target-dir }}
106-
SCCACHE_DIR: ${{ inputs.sccache-dir }}
107119
CARGO_BUILD_RUSTC_WRAPPER: ${{ inputs.cargo-build-rustc-wrapper }}
120+
CARGO_HOME: ${{ inputs.cargo-home-dir }}
108121
CARGO_INCREMENTAL: ${{ inputs.cargo-env-incrmental }}
109122
CARGO_PROFILE: ${{ inputs.cargo-profile }}
110-
USER: ${{ inputs.user }}
123+
CARGO_TARGET_DIR: ${{ inputs.cargo-target-dir }}
124+
PGRX_PG_VERSION: ${{ inputs.pgrx-version }}
111125
PGRX_PKG_PATH_PREFIX: ${{ inputs.cargo-target-dir }}
126+
PKG_PG_VERSION: ${{ inputs.pg-version }}
127+
SCCACHE_DIR: ${{ inputs.sccache-dir }}
128+
USER: ${{ inputs.user }}
112129
run: |
113130
su idkit -c "cargo install --force cargo-get cargo-edit"
114131
@@ -125,7 +142,9 @@ runs:
125142
CARGO_INCREMENTAL: ${{ inputs.cargo-env-incrmental }}
126143
CARGO_PROFILE: ${{ inputs.cargo-profile }}
127144
CARGO_TARGET_DIR: ${{ inputs.cargo-target-dir }}
145+
PGRX_PG_VERSION: ${{ inputs.pgrx-version }}
128146
PGRX_PKG_PATH_PREFIX: ${{ inputs.cargo-target-dir }}
147+
PKG_PG_VERSION: ${{ inputs.pg-version }}
129148
SCCACHE_DIR: ${{ inputs.sccache-dir }}
130149
USER: ${{ inputs.user }}
131150
run: |
@@ -140,7 +159,9 @@ runs:
140159
CARGO_INCREMENTAL: ${{ inputs.cargo-env-incrmental }}
141160
CARGO_PROFILE: ${{ inputs.cargo-profile }}
142161
CARGO_TARGET_DIR: ${{ inputs.cargo-target-dir }}
162+
PGRX_PG_VERSION: ${{ inputs.pgrx-version }}
143163
PGRX_PKG_PATH_PREFIX: ${{ inputs.cargo-target-dir }}
164+
PKG_PG_VERSION: ${{ inputs.pg-version }}
144165
SCCACHE_DIR: ${{ inputs.sccache-dir }}
145166
USER: ${{ inputs.user }}
146167
run: |
@@ -155,7 +176,9 @@ runs:
155176
CARGO_INCREMENTAL: ${{ inputs.cargo-env-incrmental }}
156177
CARGO_PROFILE: ${{ inputs.cargo-profile }}
157178
CARGO_TARGET_DIR: ${{ inputs.cargo-target-dir }}
179+
PGRX_PG_VERSION: ${{ inputs.pgrx-version }}
158180
PGRX_PKG_PATH_PREFIX: ${{ inputs.cargo-target-dir }}
181+
PKG_PG_VERSION: ${{ inputs.pg-version }}
159182
SCCACHE_DIR: ${{ inputs.sccache-dir }}
160183
USER: ${{ inputs.user }}
161184
run: |
@@ -165,12 +188,14 @@ runs:
165188
- name: Run cargo test
166189
shell: bash
167190
env:
168-
CARGO_HOME: ${{ inputs.cargo-home-dir }}
169-
CARGO_TARGET_DIR: ${{ inputs.cargo-target-dir }}
170-
SCCACHE_DIR: ${{ inputs.sccache-dir }}
171191
CARGO_BUILD_RUSTC_WRAPPER: ${{ inputs.cargo-build-rustc-wrapper }}
192+
CARGO_HOME: ${{ inputs.cargo-home-dir }}
172193
CARGO_INCREMENTAL: ${{ inputs.cargo-env-incrmental }}
173194
CARGO_PROFILE: ${{ inputs.cargo-profile }}
195+
CARGO_TARGET_DIR: ${{ inputs.cargo-target-dir }}
196+
PGRX_PG_VERSION: ${{ inputs.pgrx-version }}
197+
PKG_PG_VERSION: ${{ inputs.pg-version }}
198+
SCCACHE_DIR: ${{ inputs.sccache-dir }}
174199
USER: ${{ inputs.user }}
175200
run: |
176201
su idkit -c "cargo test"
@@ -189,7 +214,10 @@ runs:
189214
CARGO_INCREMENTAL: ${{ inputs.cargo-env-incrmental }}
190215
CARGO_PROFILE: ${{ inputs.cargo-profile }}
191216
CARGO_TARGET_DIR: ${{ inputs.cargo-target-dir }}
217+
PGRX_PG_VERSION: ${{ inputs.pgrx-version }}
192218
PGRX_PKG_PATH_PREFIX: ${{ inputs.cargo-target-dir }}
219+
PKG_PG_VERSION: ${{ inputs.pg-version }}
220+
PKG_TARBALL_SUFFIX: ${{ inputs.artifact-tarball-suffix }}
193221
SCCACHE_DIR: ${{ inputs.sccache-dir }}
194222
USER: ${{ inputs.user }}
195223
run: |

.github/workflows/build-rpm/action.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: build-rpm
1+
name: build-rpm
22
description: Build an RPM for pg_idkit
33
inputs:
44
artifact-upload:
@@ -24,6 +24,11 @@ inputs:
2424
default: pg16
2525
decription: |
2626
PGRX version (ex. 'pg15', 'pg16')
27+
pg-version:
28+
type: string
29+
default: 16.1
30+
decription: |
31+
Postgres version (ex. '15.5, '16.1')
2732
outputs: {}
2833
runs:
2934
using: "composite"
@@ -47,16 +52,25 @@ runs:
4752

4853
- name: Initialize cargo-pgrx
4954
shell: bash
55+
env:
56+
PGRX_PG_VERSION: ${{ inputs.pgrx-version }}
57+
PKG_PG_VERSION: ${{ inputs.pg-version }}
5058
run: |
5159
[[ -d /home/runner/.pgrx ]] || cargo pgrx init
5260
5361
- name: Build RPM
5462
shell: bash
63+
env:
64+
PGRX_PG_VERSION: ${{ inputs.pgrx-version }}
65+
PKG_PG_VERSION: ${{ inputs.pg-version }}
5566
run: just package build-rpm
5667

5768
- name: Get RPM output path
5869
id: rpm-output
5970
shell: bash
71+
env:
72+
PGRX_PG_VERSION: ${{ inputs.pgrx-version }}
73+
PKG_PG_VERSION: ${{ inputs.pg-version }}
6074
run: |
6175
echo path=$(just print-rpm-output-path) >> $GITHUB_OUTPUT
6276
echo filename=$(just print-rpm-output-file-name) >> $GITHUB_OUTPUT

.github/workflows/release.yaml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,60 @@ on:
1212
jobs:
1313
build-rpm:
1414
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
config:
18+
- pgrx:
19+
version: pg15
20+
pg:
21+
version: 15.5
22+
- pgrx:
23+
version: pg16
24+
pg:
25+
version: 16.1
1526
steps:
1627
- uses: actions/checkout@v3
1728

1829
- name: Build the RPM (reuse workflow)
1930
uses: ./.github/workflows/build-rpm
2031
with:
2132
artifact-upload: true
33+
pgrx-version: ${{ matrix.config.pgrx.version }}
34+
pg-version: ${{ matrix.config.pg.version }}
2235

23-
build-zip:
36+
build-zip-gnu:
2437
runs-on: ubuntu-latest
2538
container:
26-
image: ghcr.io/vadosware/pg_idkit/builder:0.1.x
39+
image: ghcr.io/vadosware/pg_idkit/builder-gnu:0.1.x
40+
strategy:
41+
matrix:
42+
config:
43+
- pgrx:
44+
version: pg15
45+
pg:
46+
version: 15.5
47+
- pgrx:
48+
version: pg16
49+
pg:
50+
version: 16.1
2751
steps:
2852
- uses: actions/checkout@v3
2953

3054
- name: Build the package (reuse workflow)
31-
uses: ./.github/workflows/build-and-test
55+
uses: ./.github/workflows/build-and-test-gnu
3256
with:
3357
artifact-upload: true
58+
artifact-tarball-suffix: "-${{ matrix.config.pgrx.version }}-gnu"
59+
pgrx-version: ${{ matrix.config.pgrx.version }}
60+
pg-version: ${{ matrix.config.pg.version }}
3461

3562
release:
3663
runs-on: ubuntu-latest
3764
permissions:
3865
contents: write
3966
needs:
4067
- build-rpm
41-
- build-zip
68+
- build-zip-gnu
4269
steps:
4370
# Checkout the repository
4471
- uses: actions/checkout@v3
@@ -52,9 +79,10 @@ jobs:
5279
- name: Create release
5380
uses: softprops/action-gh-release@v1
5481
with:
55-
body_path: CHANGELOG
5682
prerelease: ${{ startsWith(github.ref, 'refs/heads/prep-release') }}
5783
draft: true
84+
# NOTE: while we have the CHANGELOG file, it always contains *all* changes,
85+
# so we will use the generated GitHub commits for now
5886
generate_release_notes: true
5987
files: |
6088
./artifacts/*/*

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ jobs:
2323
- uses: actions/checkout@v3
2424

2525
- name: Build & test the project
26-
uses: ./.github/workflows/build-and-test
26+
uses: ./.github/workflows/build-and-test-gnu

CHANGELOG

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [0.2.0] - 2023-12-12
5+
6+
### Bug Fixes
7+
8+
- Test workflow matrix
9+
- Dockerfile creation
10+
- Dockerfile path for pg_idkit build
11+
- Build & test args
12+
- Run in container for basic testing
13+
- Add GNU coreutils to base-pkg image
14+
15+
### Features
16+
17+
- Support pg16
18+
419
## [0.1.0] - 2023-12-09
520

621
### Bug Fixes

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pg_idkit"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
edition = "2021"
55
authors = ["Victor Adossi <vados@vadosware.io>"]
66
license = "MIT"
@@ -65,7 +65,7 @@ assets = []
6565
[package.metadata.generate-rpm.variants.pg11]
6666
assets = [
6767
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/lib/postgresql/pg_idkit.so", dest = "/usr/lib64/pgsql/pg_idkit.so", mode = "755" },
68-
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/share/postgresql/extension/pg_idkit--0.1.0.sql", dest = "/usr/share/pgsql/extension/pg_idkit--0.1.0.sql", mode = "755" },
68+
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/share/postgresql/extension/pg_idkit--0.2.0.sql", dest = "/usr/share/pgsql/extension/pg_idkit--0.2.0.sql", mode = "755" },
6969
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/share/postgresql/extension/pg_idkit.control", dest = "/usr/share/pgsql/extension/pg_idkit.control", mode = "755" },
7070
]
7171
requires = { postgresql-server = "> 11", glibc = "*" }
@@ -74,7 +74,7 @@ release = "pg11"
7474
[package.metadata.generate-rpm.variants.pg12]
7575
assets = [
7676
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/lib/postgresql/pg_idkit.so", dest = "/usr/lib64/pgsql/pg_idkit.so", mode = "755" },
77-
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/share/postgresql/extension/pg_idkit--0.1.0.sql", dest = "/usr/share/pgsql/extension/pg_idkit--0.1.0.sql", mode = "755" },
77+
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/share/postgresql/extension/pg_idkit--0.2.0.sql", dest = "/usr/share/pgsql/extension/pg_idkit--0.2.0.sql", mode = "755" },
7878
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/share/postgresql/extension/pg_idkit.control", dest = "/usr/share/pgsql/extension/pg_idkit.control", mode = "755" },
7979
]
8080
requires = { postgresql-server = "> 12", glibc = "*" }
@@ -83,7 +83,7 @@ release = "pg12"
8383
[package.metadata.generate-rpm.variants.pg13]
8484
assets = [
8585
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/lib/postgresql/pg_idkit.so", dest = "/usr/lib64/pgsql/pg_idkit.so", mode = "755" },
86-
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/share/postgresql/extension/pg_idkit--0.1.0.sql", dest = "/usr/share/pgsql/extension/pg_idkit--0.1.0.sql", mode = "755" },
86+
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/share/postgresql/extension/pg_idkit--0.2.0.sql", dest = "/usr/share/pgsql/extension/pg_idkit--0.2.0.sql", mode = "755" },
8787
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/share/postgresql/extension/pg_idkit.control", dest = "/usr/share/pgsql/extension/pg_idkit.control", mode = "755" },
8888
]
8989
requires = { postgresql-server = "> 13", glibc = "*" }
@@ -92,7 +92,7 @@ release = "pg13"
9292
[package.metadata.generate-rpm.variants.pg14]
9393
assets = [
9494
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/lib/postgresql/pg_idkit.so", dest = "/usr/lib64/pgsql/pg_idkit.so", mode = "755" },
95-
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/share/postgresql/extension/pg_idkit--0.1.0.sql", dest = "/usr/share/pgsql/extension/pg_idkit--0.1.0.sql", mode = "755" },
95+
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/share/postgresql/extension/pg_idkit--0.2.0.sql", dest = "/usr/share/pgsql/extension/pg_idkit--0.2.0.sql", mode = "755" },
9696
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/share/postgresql/extension/pg_idkit.control", dest = "/usr/share/pgsql/extension/pg_idkit.control", mode = "755" },
9797
]
9898
requires = { postgresql-server = "> 14", glibc = "*" }
@@ -101,7 +101,7 @@ release = "pg14"
101101
[package.metadata.generate-rpm.variants.pg15]
102102
assets = [
103103
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/lib/postgresql/pg_idkit.so", dest = "/usr/lib64/pgsql/pg_idkit.so", mode = "755" },
104-
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/share/postgresql/extension/pg_idkit--0.1.0.sql", dest = "/usr/share/pgsql/extension/pg_idkit--0.1.0.sql", mode = "755" },
104+
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/share/postgresql/extension/pg_idkit--0.2.0.sql", dest = "/usr/share/pgsql/extension/pg_idkit--0.2.0.sql", mode = "755" },
105105
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/share/postgresql/extension/pg_idkit.control", dest = "/usr/share/pgsql/extension/pg_idkit.control", mode = "755" },
106106
]
107107
requires = { postgresql-server = "> 15", glibc = "*" }
@@ -110,8 +110,8 @@ release = "pg15"
110110
[package.metadata.generate-rpm.variants.pg16]
111111
assets = [
112112
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/lib/postgresql/pg_idkit.so", dest = "/usr/lib64/pgsql/pg_idkit.so", mode = "755" },
113-
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/share/postgresql/extension/pg_idkit--0.1.0.sql", dest = "/usr/share/pgsql/extension/pg_idkit--0.1.0.sql", mode = "755" },
113+
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/share/postgresql/extension/pg_idkit--0.2.0.sql", dest = "/usr/share/pgsql/extension/pg_idkit--0.2.0.sql", mode = "755" },
114114
{ source = "/tmp/pg_idkit/rpm/scratch/pgrx-install/share/postgresql/extension/pg_idkit.control", dest = "/usr/share/pgsql/extension/pg_idkit.control", mode = "755" },
115115
]
116-
requires = { postgresql-server = "> 15", glibc = "*" }
116+
requires = { postgresql-server = "> 16", glibc = "*" }
117117
release = "pg16"

0 commit comments

Comments
 (0)