diff --git a/.github/workflows/extension_ci.yml b/.github/workflows/extension_ci.yml index 6b94d326..4156c6ab 100644 --- a/.github/workflows/extension_ci.yml +++ b/.github/workflows/extension_ci.yml @@ -3,21 +3,21 @@ name: PGMQ Extension defaults: run: shell: bash - working-directory: ./ + working-directory: ./pgmq-extension on: pull_request: branches: - main - paths-ignore: - - "pgmq-rs/**" - - "tembo-pgmq-python/**" + paths: + - "pgmq-extension/**" + - ".github/workflows/extension_ci.yml" push: branches: - main - paths-ignore: - - "pgmq-rs/**" - - "tembo-pgmq-python/**" + paths: + - "pgmq-extension/**" + - ".github/workflows/extension_ci.yml" release: types: - created @@ -33,6 +33,7 @@ jobs: container: pgxn/pgxn-tools steps: - run: pg-start ${{ matrix.pg }} + working-directory: ./ - uses: actions/checkout@v4 - run: pgxn install 'pg_partman=4.7.3' - run: pg-build-test @@ -53,7 +54,7 @@ jobs: with: prefix-key: "pgmq-extension-test" workspaces: | - pgmq/extension + pgmq/pgmq-extension - name: Install stoml and pg-trunk shell: bash run: | @@ -66,12 +67,10 @@ jobs: - name: Make trunk run: make Trunk.toml - name: trunk build - working-directory: ./ run: trunk build --pg-version ${{ matrix.pg-version }} - name: trunk publish # only publish release events if: github.event_name == 'release' - working-directory: ./ env: TRUNK_API_TOKEN: ${{ secrets.TRUNK_AUTH_TOKEN }} run: | @@ -81,8 +80,6 @@ jobs: trunk publish pgmq --version ${pgmq_ver} --description "A lightweight message queue. Like AWS SQS and RSMQ, on Postgres." --homepage "https://github.com/tembo-io/pgmq" --repository "https://github.com/tembo-io/pgmq" --license "PostgreSQL" --category featured --category orchestration build_and_push: name: Build and push images - # needs: - # - publish runs-on: - self-hosted - dind @@ -123,6 +120,7 @@ jobs: password: ${{ secrets.QUAY_PASSWORD_TEMBO }} - name: Generate dockerfile from template file + working-directory: ./ run: ./images/pgmq-pg/replace-pg-version.sh ${{ matrix.pg }} ./images/pgmq-pg/Dockerfile.in ./images/pgmq-pg/Dockerfile - name: Build and push -- Commit @@ -130,6 +128,7 @@ jobs: if: github.event_name != 'release' uses: docker/build-push-action@v5 with: + working-directory: ./ file: ./images/pgmq-pg/Dockerfile context: . platforms: linux/amd64, linux/arm64 @@ -142,6 +141,7 @@ jobs: if: github.event_name == 'release' uses: docker/build-push-action@v5 with: + working-directory: ./ file: ./images/pgmq-pg/Dockerfile context: . platforms: linux/amd64, linux/arm64 diff --git a/.github/workflows/extension_upgrade.yml b/.github/workflows/extension_upgrade.yml index 2cc9e39f..d59db8de 100644 --- a/.github/workflows/extension_upgrade.yml +++ b/.github/workflows/extension_upgrade.yml @@ -3,21 +3,21 @@ name: PGMQ Extension Upgrade defaults: run: shell: bash - working-directory: ./ + working-directory: ./pgmq-extension on: pull_request: branches: - main - paths-ignore: - - "pgmq-rs/**" - - "tembo-pgmq-python/**" + paths: + - "pgmq-extension/**" + - ".github/workflows/extension_upgrade.yml" push: branches: - main - paths-ignore: - - "pgmq-rs/**" - - "tembo-pgmq-python/**" + paths: + - "pgmq-extension/**" + - ".github/workflows/extension_upgrade.yml" release: types: - created diff --git a/UPDATING.md b/UPDATING.md index 33b6e883..3b7d0253 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -28,7 +28,7 @@ Now, connect to postgres and run: ALTER EXTENSION pgmq UPDATE ``` -If successfull, pgmq is updated! +If successful, pgmq is updated! #### When building from source (pre-1.3.0) @@ -55,4 +55,4 @@ Now, connect to postgres and run: ALTER EXTENSION pgmq UPDATE ``` -If successfull, pgmq is updated! +If successful, pgmq is updated! diff --git a/images/pgmq-pg/Dockerfile.in b/images/pgmq-pg/Dockerfile.in index 61e29f6f..1159301f 100644 --- a/images/pgmq-pg/Dockerfile.in +++ b/images/pgmq-pg/Dockerfile.in @@ -12,15 +12,13 @@ RUN apt-get update \ pkg-config \ postgresql-server-dev-@@PG_VERSION@@ + # Install pgmq -COPY . pgmq -RUN cd pgmq && make && make install -RUN cd .. +COPY ./pgmq-extension pgmq-extension +RUN cd pgmq-extension && make && make install # install pg_partman -RUN git clone https://github.com/pgpartman/pg_partman.git && \ - cd pg_partman && \ - git checkout v4.7.4 && make && make install +RUN cd pgmq-extension && make install-pg-partman FROM postgres:@@PG_VERSION@@-bookworm diff --git a/META.json.in b/pgmq-extension/META.json.in similarity index 100% rename from META.json.in rename to pgmq-extension/META.json.in diff --git a/Makefile b/pgmq-extension/Makefile similarity index 100% rename from Makefile rename to pgmq-extension/Makefile diff --git a/Trunk.toml.in b/pgmq-extension/Trunk.toml.in similarity index 100% rename from Trunk.toml.in rename to pgmq-extension/Trunk.toml.in diff --git a/pgmq.control b/pgmq-extension/pgmq.control similarity index 100% rename from pgmq.control rename to pgmq-extension/pgmq.control diff --git a/sql/pgmq--0.10.2--0.11.1.sql b/pgmq-extension/sql/pgmq--0.10.2--0.11.1.sql similarity index 100% rename from sql/pgmq--0.10.2--0.11.1.sql rename to pgmq-extension/sql/pgmq--0.10.2--0.11.1.sql diff --git a/sql/pgmq--0.11.1--0.11.2.sql b/pgmq-extension/sql/pgmq--0.11.1--0.11.2.sql similarity index 100% rename from sql/pgmq--0.11.1--0.11.2.sql rename to pgmq-extension/sql/pgmq--0.11.1--0.11.2.sql diff --git a/sql/pgmq--0.11.2--0.12.0.sql b/pgmq-extension/sql/pgmq--0.11.2--0.12.0.sql similarity index 100% rename from sql/pgmq--0.11.2--0.12.0.sql rename to pgmq-extension/sql/pgmq--0.11.2--0.12.0.sql diff --git a/sql/pgmq--0.12.0--0.12.1.sql b/pgmq-extension/sql/pgmq--0.12.0--0.12.1.sql similarity index 100% rename from sql/pgmq--0.12.0--0.12.1.sql rename to pgmq-extension/sql/pgmq--0.12.0--0.12.1.sql diff --git a/sql/pgmq--0.12.1--0.13.0.sql b/pgmq-extension/sql/pgmq--0.12.1--0.13.0.sql similarity index 100% rename from sql/pgmq--0.12.1--0.13.0.sql rename to pgmq-extension/sql/pgmq--0.12.1--0.13.0.sql diff --git a/sql/pgmq--0.13.0--0.13.1.sql b/pgmq-extension/sql/pgmq--0.13.0--0.13.1.sql similarity index 100% rename from sql/pgmq--0.13.0--0.13.1.sql rename to pgmq-extension/sql/pgmq--0.13.0--0.13.1.sql diff --git a/sql/pgmq--0.13.1--0.14.0.sql b/pgmq-extension/sql/pgmq--0.13.1--0.14.0.sql similarity index 100% rename from sql/pgmq--0.13.1--0.14.0.sql rename to pgmq-extension/sql/pgmq--0.13.1--0.14.0.sql diff --git a/sql/pgmq--0.14.0--0.14.1.sql b/pgmq-extension/sql/pgmq--0.14.0--0.14.1.sql similarity index 100% rename from sql/pgmq--0.14.0--0.14.1.sql rename to pgmq-extension/sql/pgmq--0.14.0--0.14.1.sql diff --git a/sql/pgmq--0.14.1--0.14.2.sql b/pgmq-extension/sql/pgmq--0.14.1--0.14.2.sql similarity index 100% rename from sql/pgmq--0.14.1--0.14.2.sql rename to pgmq-extension/sql/pgmq--0.14.1--0.14.2.sql diff --git a/sql/pgmq--0.14.2--0.14.3.sql b/pgmq-extension/sql/pgmq--0.14.2--0.14.3.sql similarity index 100% rename from sql/pgmq--0.14.2--0.14.3.sql rename to pgmq-extension/sql/pgmq--0.14.2--0.14.3.sql diff --git a/sql/pgmq--0.14.3--0.15.0.sql b/pgmq-extension/sql/pgmq--0.14.3--0.15.0.sql similarity index 100% rename from sql/pgmq--0.14.3--0.15.0.sql rename to pgmq-extension/sql/pgmq--0.14.3--0.15.0.sql diff --git a/sql/pgmq--0.15.0--0.15.1.sql b/pgmq-extension/sql/pgmq--0.15.0--0.15.1.sql similarity index 100% rename from sql/pgmq--0.15.0--0.15.1.sql rename to pgmq-extension/sql/pgmq--0.15.0--0.15.1.sql diff --git a/sql/pgmq--0.15.1--0.16.0.sql b/pgmq-extension/sql/pgmq--0.15.1--0.16.0.sql similarity index 100% rename from sql/pgmq--0.15.1--0.16.0.sql rename to pgmq-extension/sql/pgmq--0.15.1--0.16.0.sql diff --git a/sql/pgmq--0.16.0--0.17.0.sql b/pgmq-extension/sql/pgmq--0.16.0--0.17.0.sql similarity index 100% rename from sql/pgmq--0.16.0--0.17.0.sql rename to pgmq-extension/sql/pgmq--0.16.0--0.17.0.sql diff --git a/sql/pgmq--0.17.0--0.18.0.sql b/pgmq-extension/sql/pgmq--0.17.0--0.18.0.sql similarity index 100% rename from sql/pgmq--0.17.0--0.18.0.sql rename to pgmq-extension/sql/pgmq--0.17.0--0.18.0.sql diff --git a/sql/pgmq--0.18.0--0.19.0.sql b/pgmq-extension/sql/pgmq--0.18.0--0.19.0.sql similarity index 100% rename from sql/pgmq--0.18.0--0.19.0.sql rename to pgmq-extension/sql/pgmq--0.18.0--0.19.0.sql diff --git a/sql/pgmq--0.19.0--0.20.0.sql b/pgmq-extension/sql/pgmq--0.19.0--0.20.0.sql similarity index 100% rename from sql/pgmq--0.19.0--0.20.0.sql rename to pgmq-extension/sql/pgmq--0.19.0--0.20.0.sql diff --git a/sql/pgmq--0.20.0--0.21.0.sql b/pgmq-extension/sql/pgmq--0.20.0--0.21.0.sql similarity index 100% rename from sql/pgmq--0.20.0--0.21.0.sql rename to pgmq-extension/sql/pgmq--0.20.0--0.21.0.sql diff --git a/sql/pgmq--0.21.0--0.22.0.sql b/pgmq-extension/sql/pgmq--0.21.0--0.22.0.sql similarity index 100% rename from sql/pgmq--0.21.0--0.22.0.sql rename to pgmq-extension/sql/pgmq--0.21.0--0.22.0.sql diff --git a/sql/pgmq--0.22.0--0.23.0.sql b/pgmq-extension/sql/pgmq--0.22.0--0.23.0.sql similarity index 100% rename from sql/pgmq--0.22.0--0.23.0.sql rename to pgmq-extension/sql/pgmq--0.22.0--0.23.0.sql diff --git a/sql/pgmq--0.23.0--0.24.0.sql b/pgmq-extension/sql/pgmq--0.23.0--0.24.0.sql similarity index 100% rename from sql/pgmq--0.23.0--0.24.0.sql rename to pgmq-extension/sql/pgmq--0.23.0--0.24.0.sql diff --git a/sql/pgmq--0.24.0--0.25.0.sql b/pgmq-extension/sql/pgmq--0.24.0--0.25.0.sql similarity index 100% rename from sql/pgmq--0.24.0--0.25.0.sql rename to pgmq-extension/sql/pgmq--0.24.0--0.25.0.sql diff --git a/sql/pgmq--0.25.0--0.26.0.sql b/pgmq-extension/sql/pgmq--0.25.0--0.26.0.sql similarity index 100% rename from sql/pgmq--0.25.0--0.26.0.sql rename to pgmq-extension/sql/pgmq--0.25.0--0.26.0.sql diff --git a/sql/pgmq--0.26.0--0.27.0.sql b/pgmq-extension/sql/pgmq--0.26.0--0.27.0.sql similarity index 100% rename from sql/pgmq--0.26.0--0.27.0.sql rename to pgmq-extension/sql/pgmq--0.26.0--0.27.0.sql diff --git a/sql/pgmq--0.27.0--0.28.0.sql b/pgmq-extension/sql/pgmq--0.27.0--0.28.0.sql similarity index 100% rename from sql/pgmq--0.27.0--0.28.0.sql rename to pgmq-extension/sql/pgmq--0.27.0--0.28.0.sql diff --git a/sql/pgmq--0.28.0--0.29.0.sql b/pgmq-extension/sql/pgmq--0.28.0--0.29.0.sql similarity index 100% rename from sql/pgmq--0.28.0--0.29.0.sql rename to pgmq-extension/sql/pgmq--0.28.0--0.29.0.sql diff --git a/sql/pgmq--0.29.0--0.30.0.sql b/pgmq-extension/sql/pgmq--0.29.0--0.30.0.sql similarity index 100% rename from sql/pgmq--0.29.0--0.30.0.sql rename to pgmq-extension/sql/pgmq--0.29.0--0.30.0.sql diff --git a/sql/pgmq--0.30.0--0.31.0.sql b/pgmq-extension/sql/pgmq--0.30.0--0.31.0.sql similarity index 100% rename from sql/pgmq--0.30.0--0.31.0.sql rename to pgmq-extension/sql/pgmq--0.30.0--0.31.0.sql diff --git a/sql/pgmq--0.31.0--0.31.1.sql b/pgmq-extension/sql/pgmq--0.31.0--0.31.1.sql similarity index 100% rename from sql/pgmq--0.31.0--0.31.1.sql rename to pgmq-extension/sql/pgmq--0.31.0--0.31.1.sql diff --git a/sql/pgmq--0.31.1--0.32.0.sql b/pgmq-extension/sql/pgmq--0.31.1--0.32.0.sql similarity index 100% rename from sql/pgmq--0.31.1--0.32.0.sql rename to pgmq-extension/sql/pgmq--0.31.1--0.32.0.sql diff --git a/sql/pgmq--0.32.0--0.32.1.sql b/pgmq-extension/sql/pgmq--0.32.0--0.32.1.sql similarity index 100% rename from sql/pgmq--0.32.0--0.32.1.sql rename to pgmq-extension/sql/pgmq--0.32.0--0.32.1.sql diff --git a/sql/pgmq--0.32.1--0.32.2.sql b/pgmq-extension/sql/pgmq--0.32.1--0.32.2.sql similarity index 100% rename from sql/pgmq--0.32.1--0.32.2.sql rename to pgmq-extension/sql/pgmq--0.32.1--0.32.2.sql diff --git a/sql/pgmq--0.32.2--0.32.3.sql b/pgmq-extension/sql/pgmq--0.32.2--0.32.3.sql similarity index 100% rename from sql/pgmq--0.32.2--0.32.3.sql rename to pgmq-extension/sql/pgmq--0.32.2--0.32.3.sql diff --git a/sql/pgmq--0.32.3--0.33.0.sql b/pgmq-extension/sql/pgmq--0.32.3--0.33.0.sql similarity index 100% rename from sql/pgmq--0.32.3--0.33.0.sql rename to pgmq-extension/sql/pgmq--0.32.3--0.33.0.sql diff --git a/sql/pgmq--0.33.0--0.33.1.sql b/pgmq-extension/sql/pgmq--0.33.0--0.33.1.sql similarity index 100% rename from sql/pgmq--0.33.0--0.33.1.sql rename to pgmq-extension/sql/pgmq--0.33.0--0.33.1.sql diff --git a/sql/pgmq--0.33.1--0.33.2.sql b/pgmq-extension/sql/pgmq--0.33.1--0.33.2.sql similarity index 100% rename from sql/pgmq--0.33.1--0.33.2.sql rename to pgmq-extension/sql/pgmq--0.33.1--0.33.2.sql diff --git a/sql/pgmq--0.33.2--0.33.3.sql b/pgmq-extension/sql/pgmq--0.33.2--0.33.3.sql similarity index 100% rename from sql/pgmq--0.33.2--0.33.3.sql rename to pgmq-extension/sql/pgmq--0.33.2--0.33.3.sql diff --git a/sql/pgmq--0.33.3--1.0.0.sql b/pgmq-extension/sql/pgmq--0.33.3--1.0.0.sql similarity index 100% rename from sql/pgmq--0.33.3--1.0.0.sql rename to pgmq-extension/sql/pgmq--0.33.3--1.0.0.sql diff --git a/sql/pgmq--0.7.3--0.7.4.sql b/pgmq-extension/sql/pgmq--0.7.3--0.7.4.sql similarity index 100% rename from sql/pgmq--0.7.3--0.7.4.sql rename to pgmq-extension/sql/pgmq--0.7.3--0.7.4.sql diff --git a/sql/pgmq--0.7.4--0.7.5.sql b/pgmq-extension/sql/pgmq--0.7.4--0.7.5.sql similarity index 100% rename from sql/pgmq--0.7.4--0.7.5.sql rename to pgmq-extension/sql/pgmq--0.7.4--0.7.5.sql diff --git a/sql/pgmq--0.7.5--0.8.0.sql b/pgmq-extension/sql/pgmq--0.7.5--0.8.0.sql similarity index 100% rename from sql/pgmq--0.7.5--0.8.0.sql rename to pgmq-extension/sql/pgmq--0.7.5--0.8.0.sql diff --git a/sql/pgmq--0.8.0--0.8.1.sql b/pgmq-extension/sql/pgmq--0.8.0--0.8.1.sql similarity index 100% rename from sql/pgmq--0.8.0--0.8.1.sql rename to pgmq-extension/sql/pgmq--0.8.0--0.8.1.sql diff --git a/sql/pgmq--0.8.1--0.9.0.sql b/pgmq-extension/sql/pgmq--0.8.1--0.9.0.sql similarity index 100% rename from sql/pgmq--0.8.1--0.9.0.sql rename to pgmq-extension/sql/pgmq--0.8.1--0.9.0.sql diff --git a/sql/pgmq--0.9.0--0.10.2.sql b/pgmq-extension/sql/pgmq--0.9.0--0.10.2.sql similarity index 100% rename from sql/pgmq--0.9.0--0.10.2.sql rename to pgmq-extension/sql/pgmq--0.9.0--0.10.2.sql diff --git a/sql/pgmq--1.0.0--1.1.0.sql b/pgmq-extension/sql/pgmq--1.0.0--1.1.0.sql similarity index 100% rename from sql/pgmq--1.0.0--1.1.0.sql rename to pgmq-extension/sql/pgmq--1.0.0--1.1.0.sql diff --git a/sql/pgmq--1.1.0--1.1.1.sql b/pgmq-extension/sql/pgmq--1.1.0--1.1.1.sql similarity index 100% rename from sql/pgmq--1.1.0--1.1.1.sql rename to pgmq-extension/sql/pgmq--1.1.0--1.1.1.sql diff --git a/sql/pgmq--1.1.1--1.2.0.sql b/pgmq-extension/sql/pgmq--1.1.1--1.2.0.sql similarity index 100% rename from sql/pgmq--1.1.1--1.2.0.sql rename to pgmq-extension/sql/pgmq--1.1.1--1.2.0.sql diff --git a/sql/pgmq--1.2.0--1.2.1.sql b/pgmq-extension/sql/pgmq--1.2.0--1.2.1.sql similarity index 100% rename from sql/pgmq--1.2.0--1.2.1.sql rename to pgmq-extension/sql/pgmq--1.2.0--1.2.1.sql diff --git a/sql/pgmq--1.2.1--1.3.0.sql b/pgmq-extension/sql/pgmq--1.2.1--1.3.0.sql similarity index 100% rename from sql/pgmq--1.2.1--1.3.0.sql rename to pgmq-extension/sql/pgmq--1.2.1--1.3.0.sql diff --git a/sql/pgmq--1.3.0--1.3.1.sql b/pgmq-extension/sql/pgmq--1.3.0--1.3.1.sql similarity index 100% rename from sql/pgmq--1.3.0--1.3.1.sql rename to pgmq-extension/sql/pgmq--1.3.0--1.3.1.sql diff --git a/sql/pgmq--1.3.1--1.3.2.sql b/pgmq-extension/sql/pgmq--1.3.1--1.3.2.sql similarity index 100% rename from sql/pgmq--1.3.1--1.3.2.sql rename to pgmq-extension/sql/pgmq--1.3.1--1.3.2.sql diff --git a/sql/pgmq--1.3.2--1.3.3.sql b/pgmq-extension/sql/pgmq--1.3.2--1.3.3.sql similarity index 100% rename from sql/pgmq--1.3.2--1.3.3.sql rename to pgmq-extension/sql/pgmq--1.3.2--1.3.3.sql diff --git a/sql/pgmq.sql b/pgmq-extension/sql/pgmq.sql similarity index 100% rename from sql/pgmq.sql rename to pgmq-extension/sql/pgmq.sql