Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/base-pkg-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
cargo-pgrx-version:
required: false
type: string
default: "0.13.1"
default: "0.14.1"
description: |
version of cargo-pgrx to download (inside image build)

Expand Down
91 changes: 39 additions & 52 deletions .github/workflows/build-and-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,6 @@ inputs:
cargo-home-dir:
type: string
default: /usr/local/cargo
cargo-target-dir:
type: string
default: /usr/local/build/target
sccache-dir:
type: string
default: /usr/local/sccache
cargo-build-rustc-wrapper:
type: string
default: /usr/local/cargo/bin/sccache
cargo-env-incremental:
type: string
default: "0"
Expand All @@ -47,19 +38,19 @@ inputs:
default: idkit
cargo-pgrx-version:
type: string
default: 0.13.1
default: 0.14.1
decription: |
cargo-pgrx version (ex. '0.13.1')
cargo-pgrx version (ex. '0.14.1')
pgrx-pg-version:
type: string
default: pg17
decription: |
PGRX version (ex. 'pg17')
pkg-pg-version:
type: string
default: 17.4
default: 17.5
decription: |
Postgres version (ex. '17.4') used for packaging
Postgres version (ex. '17.5') used for packaging
libc:
type: string
required: true
Expand All @@ -75,6 +66,16 @@ runs:
# Checkout the repo
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: install utils for alpine
if: ${{ inputs.libc == 'musl' }} # musl ~= alpine
shell: sh
# formerly: clang clang-dev clang-libs \
run: |
apk add --no-cache musl-dev openssl-dev util-linux-dev \
clang clang-dev clang-libs \
llvm \
git coreutils bash curl gcc make tar

#########
# Cache #
#########
Expand Down Expand Up @@ -105,13 +106,8 @@ runs:
path: |
${{ inputs.apk-cache-dir }}

- name: Cache sccache
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
continue-on-error: false
with:
key: pg_idkit-tests-sccache-${{ inputs.rust-container-version }}-cargo-${{ runner.os }}-${{ inputs.artifact-tarball-suffix }}
path: |
${{ inputs.sccache-dir }}
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.9

- name: Cache pgrx init
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
Expand All @@ -132,17 +128,6 @@ runs:
chgrp -R idkit /__w/pg_idkit &&
chmod g+w -R /__w/pg_idkit

# Add directory used by worker as safe dir for git
- name: install utils for alpine
if: ${{ inputs.libc == 'musl' }} # musl ~= alpine
shell: sh
# formerly: clang clang-dev clang-libs \
run: |
apk add --no-cache musl-dev openssl-dev util-linux-dev \
clang clang-dev clang-libs \
llvm \
git coreutils bash curl gcc make

# Add directory used by worker as safe dir for git
- name: Add git safe dir
shell: sh
Expand All @@ -158,33 +143,28 @@ runs:
- name: Initialize cargo-pgrx
shell: sh
env:
CARGO_BUILD_RUSTC_WRAPPER: ${{ inputs.cargo-build-rustc-wrapper }}
CARGO_HOME: ${{ inputs.cargo-home-dir }}
CARGO_INCREMENTAL: ${{ inputs.cargo-env-incrmental }}
CARGO_PROFILE: ${{ inputs.cargo-profile }}
CARGO_TARGET_DIR: ${{ inputs.cargo-target-dir }}
PGRX_PG_VERSION: ${{ inputs.pgrx-pg-version }}
PGRX_PKG_PATH_PREFIX: ${{ inputs.cargo-target-dir }}
PKG_PG_VERSION: ${{ inputs.pkg-pg-version }}
SCCACHE_DIR: ${{ inputs.sccache-dir }}
DOCKER_BUILD_USER: ${{ inputs.user }}
# We must build w/out static when on alpine
# (this fixes the libclang dynamic loading not supported error)
RUSTFLAGS: ${{ inputs.libc == 'musl' && '-Ctarget-feature=-crt-static' || '' }}
run: |
cargo pgrx --version
su idkit -c "cargo install cargo-pgrx@${{ inputs.cargo-pgrx-version }}"
su idkit -c "just pgrx-init"

# Run cargo check
- name: Run cargo check
shell: sh
env:
CARGO_BUILD_RUSTC_WRAPPER: ${{ inputs.cargo-build-rustc-wrapper }}
CARGO_HOME: ${{ inputs.cargo-home-dir }}
CARGO_INCREMENTAL: ${{ inputs.cargo-env-incrmental }}
CARGO_PROFILE: ${{ inputs.cargo-profile }}
CARGO_TARGET_DIR: ${{ inputs.cargo-target-dir }}
PGRX_PG_VERSION: ${{ inputs.pgrx-pg-version }}
PGRX_PKG_PATH_PREFIX: ${{ inputs.cargo-target-dir }}
PKG_PG_VERSION: ${{ inputs.pkg-pg-version }}
SCCACHE_DIR: ${{ inputs.sccache-dir }}
DOCKER_BUILD_USER: ${{ inputs.user }}
# We must build w/out static when on alpine
# (this fixes the libclang dynamic loading not supported error)
Expand All @@ -196,15 +176,11 @@ runs:
- name: Run cargo test
shell: sh
env:
CARGO_BUILD_RUSTC_WRAPPER: ${{ inputs.cargo-build-rustc-wrapper }}
CARGO_HOME: ${{ inputs.cargo-home-dir }}
CARGO_INCREMENTAL: ${{ inputs.cargo-env-incrmental }}
CARGO_PROFILE: ${{ inputs.cargo-profile }}
CARGO_TARGET_DIR: ${{ inputs.cargo-target-dir }}
PGRX_PG_VERSION: ${{ inputs.pgrx-pg-version }}
PGRX_PKG_PATH_PREFIX: ${{ inputs.cargo-target-dir }}
PKG_PG_VERSION: ${{ inputs.pkg-pg-version }}
SCCACHE_DIR: ${{ inputs.sccache-dir }}
DOCKER_BUILD_USER: ${{ inputs.user }}
# We must build w/out static when on alpine
# (this fixes the libclang dynamic loading not supported error)
Expand All @@ -216,14 +192,11 @@ runs:
- name: Run cargo test
shell: sh
env:
CARGO_BUILD_RUSTC_WRAPPER: ${{ inputs.cargo-build-rustc-wrapper }}
CARGO_HOME: ${{ inputs.cargo-home-dir }}
CARGO_INCREMENTAL: ${{ inputs.cargo-env-incrmental }}
CARGO_PROFILE: ${{ inputs.cargo-profile }}
CARGO_TARGET_DIR: ${{ inputs.cargo-target-dir }}
PGRX_PG_VERSION: ${{ inputs.pgrx-pg-version }}
PKG_PG_VERSION: ${{ inputs.pkg-pg-version }}
SCCACHE_DIR: ${{ inputs.sccache-dir }}
DOCKER_BUILD_USER: ${{ inputs.user }}
# We must build w/out static when on alpine
# (this fixes the libclang dynamic loading not supported error)
Expand All @@ -235,21 +208,34 @@ runs:
# Artifacts #
#############

# Get some metadata about the artifact
- name: Run cargo test
id: artifact-meta
shell: sh
env:
CARGO_HOME: ${{ inputs.cargo-home-dir }}
CARGO_INCREMENTAL: ${{ inputs.cargo-env-incrmental }}
CARGO_PROFILE: ${{ inputs.cargo-profile }}
PGRX_PG_VERSION: ${{ inputs.pgrx-pg-version }}
PKG_PG_VERSION: ${{ inputs.pkg-pg-version }}
DOCKER_BUILD_USER: ${{ inputs.user }}
# We must build w/out static when on alpine
# (this fixes the libclang dynamic loading not supported error)
RUSTFLAGS: ${{ inputs.libc == 'musl' && '-Ctarget-feature=-crt-static' || '' }}
run: |
echo release-version=$(su idkit -c "just print-version") >> $GITHUB_OUTPUT

# Run cargo test
- name: Build a package
if: ${{ inputs.artifact-upload == 'true' }}
shell: sh
env:
CARGO_BUILD_RUSTC_WRAPPER: ${{ inputs.cargo-build-rustc-wrapper }}
CARGO_HOME: ${{ inputs.cargo-home-dir }}
CARGO_INCREMENTAL: ${{ inputs.cargo-env-incrmental }}
CARGO_PROFILE: ${{ inputs.cargo-profile }}
CARGO_TARGET_DIR: ${{ inputs.cargo-target-dir }}
PGRX_PG_VERSION: ${{ inputs.pgrx-pg-version }}
PGRX_PKG_PATH_PREFIX: ${{ inputs.cargo-target-dir }}
PKG_PG_VERSION: ${{ inputs.pkg-pg-version }}
PKG_TARBALL_SUFFIX: ${{ inputs.artifact-tarball-suffix }}
SCCACHE_DIR: ${{ inputs.sccache-dir }}
DOCKER_BUILD_USER: ${{ inputs.user }}
# We must build w/out static when on alpine
# (this fixes the libclang dynamic loading not supported error)
Expand All @@ -262,4 +248,5 @@ runs:
if: ${{ inputs.artifact-upload == 'true' }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
path: pg_idkit-*.tar.gz
path: pg_idkit-${{ steps.artifact-meta.outputs.release-version }}-${{ inputs.pgrx-pg-version }}-${{ inputs.libc }}.tar.gz
name: pg_idkit-${{ steps.artifact-meta.outputs.release-version }}-${{ inputs.pgrx-pg-version }}-${{ inputs.libc }}.tar.gz
8 changes: 4 additions & 4 deletions .github/workflows/build-rpm/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ inputs:
PGRX version (ex. 'pg17')
pg-version:
type: string
default: 17.4
default: 17.5
decription: |
Postgres version (ex. '17.4')
Postgres version (ex. '17.5')
cargo-pgrx-version:
type: string
default: 0.13.1
default: 0.14.1
decription: |
cargo-pgrx version (ex. '0.13.1)
cargo-pgrx version (ex. '0.14.1)
user:
type: string
default: runner
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-builder-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
cargo-pgrx-version:
required: false
type: string
default: "0.13.1"
default: "0.14.1"
description: |
version of cargo-pgrx to download (inside image build)

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ jobs:
container:
arch: amd64
pgrx_pg_version: pg15
pg_version: "15.12"
pg_version: "15.13"
os_version: alpine3.21.3
- triple: x86_64-unknown-linux-musl
gh:
runner: ubuntu-22.04
container:
arch: amd64
pgrx_pg_version: pg16
pg_version: "16.8"
pg_version: "16.9"
os_version: alpine3.21.3
- triple: x86_64-unknown-linux-musl
gh:
runner: ubuntu-22.04
container:
arch: amd64
pgrx_pg_version: pg17
pg_version: "17.4"
pg_version: "17.5"
os_version: alpine3.21.3
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
- [ ] Update `README.md` to use the newest version of Postgres, if it has changed (ex. `16.2` -> `17.0`)
- [ ] Update `README.md` to soon-to-be-released pg_idkit (ex. `pg_idkit-0.2.0` -> `pg_idkit-0.2.1`)
- [ ] Update `generate-rpm` configuration in `Cargo.toml` version references (ex. `--0.2.0.sql` -> `--0.2.1.sql`)
- [ ] Update default version in `justfile
- [ ] Update default version in `justfile`

See CHANGELOG for changes made to this release before it goes out.
labels: |
Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ on:
# Run on released tags (created by automated post-merge release-tagging), to generate the actual release
- v[0-9]+\.[0-9]+\.[0-9]+

concurrency:
group: release

jobs:
build-rpm:
runs-on: ubuntu-latest
Expand All @@ -29,22 +32,22 @@ jobs:
- pgrx:
pg-version: pg15
pg:
version: "15.12"
version: "15.13"
- pgrx:
pg-version: pg16
pg:
version: "16.8"
version: "16.9"
- pgrx:
pg-version: pg17
pg:
version: "17.4"
version: "17.5"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Build the RPM (reuse workflow)
uses: ./.github/workflows/build-rpm
with:
artifact-upload: ${{ startsWith(github.ref, 'refs/tags/v') }}
artifact-upload: true
pgrx-pg-version: ${{ matrix.config.pgrx.pg-version }}
pg-version: ${{ matrix.config.pg.version }}

Expand All @@ -62,23 +65,23 @@ jobs:
- pgrx:
pg-version: pg15
pg:
version: "15.12"
version: "15.13"
- pgrx:
pg-version: pg16
pg:
version: "16.8"
version: "16.9"
- pgrx:
pg-version: pg17
pg:
version: "17.4"
version: "17.5"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Build and test
uses: ./.github/workflows/build-and-test
with:
libc: ${{ matrix.libc }}
artifact-upload: ${{ startsWith(github.ref, 'refs/tags/v') }}
artifact-upload: true
artifact-tarball-suffix: "-${{ matrix.config.pgrx.pg-version }}-${{ matrix.libc }}"
pgrx-pg-version: ${{ matrix.config.pgrx.pg-version }}
pkg-pg-version: ${{ matrix.config.pg.version }}
Expand All @@ -96,13 +99,13 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

# Download all artifacts
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
- uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
path: artifacts

# Create release (pre-release if we're prepping)
- name: Create release
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
with:
prerelease: ${{ startsWith(github.ref, 'refs/heads/prep-release') }}
draft: ${{ startsWith(github.ref, 'refs/heads/prep-release') }}
Expand Down
Loading
Loading