Skip to content

Commit

Permalink
Store the PostgreSQL source code tags in the .pgtags file
Browse files Browse the repository at this point in the history
  • Loading branch information
akorotkov committed Aug 1, 2022
1 parent 38f5735 commit ce37bf7
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 19 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,20 @@ jobs:
CHECK_TYPE: ${{ matrix.check_type }}
COMPILER: ${{ matrix.compiler }}
steps:
- name: Checkout extension code into workspace directory
uses: actions/checkout@v2
with:
path: orioledb
- name: Get the required tag name
shell: bash
run: |
echo "PGTAG=$(grep '^${{ matrix.pg_version }}: ' orioledb/.pgtags | cut -d' ' -f2-)" >> $GITHUB_ENV
- name: Checkout PostgreSQL code into workspace directory
uses: actions/checkout@v2
with:
repository: orioledb/postgres
ref: patches${{ matrix.pg_version }}
ref: ${{ env.PGTAG }}
path: postgresql
- name: Checkout extension code into workspace directory
uses: actions/checkout@v2
with:
path: orioledb
- name: Setup prerequisites
run: bash ./orioledb/ci/prerequisites.sh
- name: Build
Expand Down Expand Up @@ -57,16 +61,20 @@ jobs:
CHECK_TYPE: static
COMPILER: ${{ matrix.compiler }}
steps:
- name: Checkout extension code into workspace directory
uses: actions/checkout@v2
with:
path: orioledb
- name: Get the required tag name
shell: bash
run: |
echo "PGTAG=$(grep '^${{ matrix.pg_version }}: ' orioledb/.pgtags | cut -d' ' -f2-)" >> $GITHUB_ENV
- name: Checkout PostgreSQL code into workspace directory
uses: actions/checkout@v2
with:
repository: orioledb/postgres
ref: patches${{ matrix.pg_version }}
ref: ${{ env.PGTAG }}
path: postgresql
- name: Checkout extension code into workspace directory
uses: actions/checkout@v2
with:
path: orioledb
- name: Setup prerequisites
run: bash ./orioledb/ci/prerequisites.sh
- name: Build
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v2

- name: Get the required tag name
shell: bash
run: |
echo "PGTAG=$(grep '^14: ' .pgtags | cut -d' ' -f2-)" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

Expand All @@ -38,3 +43,5 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
PGTAG=${{ env.PGTAG }}
17 changes: 11 additions & 6 deletions .github/workflows/rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,24 @@ jobs:
uses: actions/checkout@v2
with:
repository: orioledb/pgrpms
ref: orioledb-14
ref: orioledb
- name: Checkout extension code into workspace directory
uses: actions/checkout@v2
with:
path: orioledb
- name: Get the required tag name
shell: bash
run: |
echo "PGTAG=$(grep '^${{ github.event.inputs.version }}: ' orioledb/.pgtags | cut -d' ' -f2-)" >> $GITHUB_ENV
- name: Checkout PostgreSQL code into workspace directory
uses: actions/checkout@v2
with:
repository: orioledb/postgres
ref: patches${{ github.event.inputs.version }}
ref: ${{ env.PGTAG }}
path: rpm/redhat/${{ github.event.inputs.version }}/postgresql-${{ github.event.inputs.version }}/EL-7/pgsrc
- name: Checkout extension code into workspace directory
uses: actions/checkout@v2
with:
path: rpm/redhat/${{ github.event.inputs.version }}/postgresql-${{ github.event.inputs.version }}/EL-7/pgsrc/contrib/orioledb
- name: Archive sources
run: |
mv orioledb rpm/redhat/${{ github.event.inputs.version }}/postgresql-${{ github.event.inputs.version }}/EL-7/pgsrc/contrib
cd rpm/redhat/${{ github.event.inputs.version }}/postgresql-${{ github.event.inputs.version }}/EL-7
tar -czf orioledb.tar.gz -C pgsrc .
rm -rf pgsrc
Expand Down
3 changes: 3 additions & 0 deletions .pgtags
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
13: patches13_1
14: patches14_1
15: patches15_1
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

FROM alpine:3.15

ARG PGTAG
ENV PGTAG $PGTAG

# 70 is the standard uid/gid for "postgres" in Alpine
# https://git.alpinelinux.org/aports/tree/main/postgresql/postgresql.pre-install?h=3.12-stable
RUN set -eux; \
Expand Down Expand Up @@ -63,7 +66,7 @@ RUN set -eux; \
curl -o postgresql.tar.gz \
--header "Accept: application/vnd.github.v3.raw" \
--remote-name \
--location https://github.com/orioledb/postgres/tarball/patches14; \
--location https://github.com/orioledb/postgres/tarball/$PGTAG; \
mkdir -p /usr/src/postgresql; \
tar \
--extract \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ See [our dockerhub](https://hub.docker.com/r/orioledb/orioledb) for details.

Before building and installing OrioleDB, one should ensure to have the following:

* [PostgreSQL 13, 14 or 15 with extensibility patches](https://github.com/orioledb/postgres),
* Development package of libzstd,
* [PostgreSQL with extensibility patches](https://github.com/orioledb/postgres): [13 (tag: patches13_1)](https://github.com/orioledb/postgres/tree/patches13_1), [14 (tag: patches14_1)](https://github.com/orioledb/postgres/tree/patches14_1) or [15 (tag: patches15_1)](https://github.com/orioledb/postgres/tree/patches15_1);
* Development package of libzstd;
* python 3.5+ with testgres package.

Typical installation procedure may look like this:
Expand Down

0 comments on commit ce37bf7

Please sign in to comment.