From 78ca7865b0673ff58378f0ecfff15eb63d19898f Mon Sep 17 00:00:00 2001 From: vados Date: Tue, 19 Dec 2023 04:21:14 +0900 Subject: [PATCH] fix(infra): container generation and workflows 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 --- .github/workflows/build-and-test-gnu/action.yaml | 14 +++++++------- .github/workflows/build-rpm/action.yaml | 8 ++++---- .github/workflows/container.yaml | 10 ++++++++++ .github/workflows/release.yaml | 14 +++++++------- 4 files changed, 28 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-and-test-gnu/action.yaml b/.github/workflows/build-and-test-gnu/action.yaml index 66a8147..12afe3c 100644 --- a/.github/workflows/build-and-test-gnu/action.yaml +++ b/.github/workflows/build-and-test-gnu/action.yaml @@ -40,7 +40,7 @@ inputs: user: type: string default: idkit - pgrx-version: + pgrx-pg-version: type: string default: pg16 decription: | @@ -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 }} @@ -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 }} @@ -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 }} @@ -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 }} @@ -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 }} @@ -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 }} diff --git a/.github/workflows/build-rpm/action.yaml b/.github/workflows/build-rpm/action.yaml index 35c155d..7bf9fe7 100644 --- a/.github/workflows/build-rpm/action.yaml +++ b/.github/workflows/build-rpm/action.yaml @@ -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: | @@ -53,7 +53,7 @@ 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 @@ -61,7 +61,7 @@ runs: - 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 @@ -69,7 +69,7 @@ runs: 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 diff --git a/.github/workflows/container.yaml b/.github/workflows/container.yaml index b980b6c..50e979d 100644 --- a/.github/workflows/container.yaml +++ b/.github/workflows/container.yaml @@ -2,6 +2,8 @@ name: container on: push: + branches: + - fix/container-generation-and-workflows tags: - v[0-9]+\.[0-9]+\.[0-9]+ @@ -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 @@ -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 }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 02f8ebd..d8bff2a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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: @@ -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: @@ -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: @@ -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: