Skip to content

Commit

Permalink
fix(infra): container generation and workflows
Browse files Browse the repository at this point in the history
During release v0.2.0, the container generation flow failed due to the
new addition of pg16.

This commit fixes that failure and makes the pg version in use by pgrx
more explicit in GHA workflow configuration

Signed-off-by: vados <[email protected]>
  • Loading branch information
t3hmrman committed Dec 18, 2023
1 parent 8125d62 commit 78ca786
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 18 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build-and-test-gnu/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ inputs:
user:
type: string
default: idkit
pgrx-version:
pgrx-pg-version:
type: string
default: pg16
decription: |
Expand Down Expand Up @@ -121,7 +121,7 @@ runs:
CARGO_INCREMENTAL: ${{ inputs.cargo-env-incrmental }}
CARGO_PROFILE: ${{ inputs.cargo-profile }}
CARGO_TARGET_DIR: ${{ inputs.cargo-target-dir }}
PGRX_PG_VERSION: ${{ inputs.pgrx-version }}
PGRX_PG_VERSION: ${{ inputs.pgrx-pg-version }}
PGRX_PKG_PATH_PREFIX: ${{ inputs.cargo-target-dir }}
PKG_PG_VERSION: ${{ inputs.pg-version }}
SCCACHE_DIR: ${{ inputs.sccache-dir }}
Expand All @@ -142,7 +142,7 @@ runs:
CARGO_INCREMENTAL: ${{ inputs.cargo-env-incrmental }}
CARGO_PROFILE: ${{ inputs.cargo-profile }}
CARGO_TARGET_DIR: ${{ inputs.cargo-target-dir }}
PGRX_PG_VERSION: ${{ inputs.pgrx-version }}
PGRX_PG_VERSION: ${{ inputs.pgrx-pg-version }}
PGRX_PKG_PATH_PREFIX: ${{ inputs.cargo-target-dir }}
PKG_PG_VERSION: ${{ inputs.pg-version }}
SCCACHE_DIR: ${{ inputs.sccache-dir }}
Expand All @@ -159,7 +159,7 @@ runs:
CARGO_INCREMENTAL: ${{ inputs.cargo-env-incrmental }}
CARGO_PROFILE: ${{ inputs.cargo-profile }}
CARGO_TARGET_DIR: ${{ inputs.cargo-target-dir }}
PGRX_PG_VERSION: ${{ inputs.pgrx-version }}
PGRX_PG_VERSION: ${{ inputs.pgrx-pg-version }}
PGRX_PKG_PATH_PREFIX: ${{ inputs.cargo-target-dir }}
PKG_PG_VERSION: ${{ inputs.pg-version }}
SCCACHE_DIR: ${{ inputs.sccache-dir }}
Expand All @@ -176,7 +176,7 @@ runs:
CARGO_INCREMENTAL: ${{ inputs.cargo-env-incrmental }}
CARGO_PROFILE: ${{ inputs.cargo-profile }}
CARGO_TARGET_DIR: ${{ inputs.cargo-target-dir }}
PGRX_PG_VERSION: ${{ inputs.pgrx-version }}
PGRX_PG_VERSION: ${{ inputs.pgrx-pg-version }}
PGRX_PKG_PATH_PREFIX: ${{ inputs.cargo-target-dir }}
PKG_PG_VERSION: ${{ inputs.pg-version }}
SCCACHE_DIR: ${{ inputs.sccache-dir }}
Expand All @@ -193,7 +193,7 @@ runs:
CARGO_INCREMENTAL: ${{ inputs.cargo-env-incrmental }}
CARGO_PROFILE: ${{ inputs.cargo-profile }}
CARGO_TARGET_DIR: ${{ inputs.cargo-target-dir }}
PGRX_PG_VERSION: ${{ inputs.pgrx-version }}
PGRX_PG_VERSION: ${{ inputs.pgrx-pg-version }}
PKG_PG_VERSION: ${{ inputs.pg-version }}
SCCACHE_DIR: ${{ inputs.sccache-dir }}
USER: ${{ inputs.user }}
Expand All @@ -214,7 +214,7 @@ runs:
CARGO_INCREMENTAL: ${{ inputs.cargo-env-incrmental }}
CARGO_PROFILE: ${{ inputs.cargo-profile }}
CARGO_TARGET_DIR: ${{ inputs.cargo-target-dir }}
PGRX_PG_VERSION: ${{ inputs.pgrx-version }}
PGRX_PG_VERSION: ${{ inputs.pgrx-pg-version }}
PGRX_PKG_PATH_PREFIX: ${{ inputs.cargo-target-dir }}
PKG_PG_VERSION: ${{ inputs.pg-version }}
PKG_TARBALL_SUFFIX: ${{ inputs.artifact-tarball-suffix }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-rpm/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ inputs:
default: x86_64
decription: |
Architecture to use while building the RPM
pgrx-version:
pgrx-pg-version:
type: string
default: pg16
decription: |
Expand Down Expand Up @@ -53,23 +53,23 @@ runs:
- name: Initialize cargo-pgrx
shell: bash
env:
PGRX_PG_VERSION: ${{ inputs.pgrx-version }}
PGRX_PG_VERSION: ${{ inputs.pgrx-pg-version }}
PKG_PG_VERSION: ${{ inputs.pg-version }}
run: |
[[ -d /home/runner/.pgrx ]] || cargo pgrx init
- name: Build RPM
shell: bash
env:
PGRX_PG_VERSION: ${{ inputs.pgrx-version }}
PGRX_PG_VERSION: ${{ inputs.pgrx-pg-version }}
PKG_PG_VERSION: ${{ inputs.pg-version }}
run: just package build-rpm

- name: Get RPM output path
id: rpm-output
shell: bash
env:
PGRX_PG_VERSION: ${{ inputs.pgrx-version }}
PGRX_PG_VERSION: ${{ inputs.pgrx-pg-version }}
PKG_PG_VERSION: ${{ inputs.pg-version }}
run: |
echo path=$(just print-rpm-output-path) >> $GITHUB_OUTPUT
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: container

on:
push:
branches:
- fix/container-generation-and-workflows
tags:
- v[0-9]+\.[0-9]+\.[0-9]+

Expand All @@ -21,6 +23,13 @@ jobs:
arch: amd64
pg_version: 15.5
os_version: alpine3.18
- triple: x86_64-unknown-linux-musl
gh:
runner: ubuntu-22.04
container:
arch: amd64
pg_version: 16.1
os_version: alpine3.18
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v3
Expand All @@ -39,5 +48,6 @@ jobs:
run: just build-image push-image
env:
CONTAINER_IMAGE_ARCH: ${{ matrix.config.container.arch }}
PGRX_PG_VERSION: ${{ matrix.config.container.pg_version }}
POSTGRES_IMAGE_VERSION: ${{ matrix.config.container.pg_version }}
POSTGRES_OS_IMAGE_VERSION: ${{ matrix.config.container.os_version }}
14 changes: 7 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
matrix:
config:
- pgrx:
version: pg15
pg-version: pg15
pg:
version: 15.5
- pgrx:
version: pg16
pg-version: pg16
pg:
version: 16.1
steps:
Expand All @@ -30,7 +30,7 @@ jobs:
uses: ./.github/workflows/build-rpm
with:
artifact-upload: true
pgrx-version: ${{ matrix.config.pgrx.version }}
pgrx-pg-version: ${{ matrix.config.pgrx.pg-version }}
pg-version: ${{ matrix.config.pg.version }}

build-zip-gnu:
Expand All @@ -41,11 +41,11 @@ jobs:
matrix:
config:
- pgrx:
version: pg15
pg-version: pg15
pg:
version: 15.5
- pgrx:
version: pg16
pg-version: pg16
pg:
version: 16.1
steps:
Expand All @@ -55,8 +55,8 @@ jobs:
uses: ./.github/workflows/build-and-test-gnu
with:
artifact-upload: true
artifact-tarball-suffix: "-${{ matrix.config.pgrx.version }}-gnu"
pgrx-version: ${{ matrix.config.pgrx.version }}
artifact-tarball-suffix: "-${{ matrix.config.pgrx.pg-version }}-gnu"
pgrx-pg-version: ${{ matrix.config.pgrx.pg-version }}
pg-version: ${{ matrix.config.pg.version }}

release:
Expand Down

0 comments on commit 78ca786

Please sign in to comment.