Skip to content

Commit

Permalink
#71 add postgres 16 to test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tomix26 committed Sep 15, 2023
1 parent 3cd8d04 commit 3cea577
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ jobs:
alpine-lite-arm32v6:
name: Alpine - arm32v6 (Lite)
runs-on: ubuntu-latest
if: ${{ !(startsWith(github.event.milestone.title, '16.')) }}
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -202,6 +203,7 @@ jobs:
alpine-lite-arm64v8:
name: Alpine - arm64v8 (Lite)
runs-on: ubuntu-latest
if: ${{ !(startsWith(github.event.milestone.title, '16.')) }}
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -230,6 +232,7 @@ jobs:
alpine-lite-ppc64le:
name: Alpine - ppc64le (Lite)
runs-on: ubuntu-latest
if: ${{ !(startsWith(github.event.milestone.title, '16.')) }}
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -310,16 +313,19 @@ jobs:
name: ppc64leAlpineBundle
path: alpine-platforms/build/tmp/buildPpc64leAlpineBundle/bundle
- name: Download bundle - arm32v6AlpineLite
if: ${{ !(startsWith(github.event.milestone.title, '16.')) }}
uses: actions/download-artifact@v2
with:
name: arm32v6AlpineLiteBundle
path: alpine-lite-platforms/build/tmp/buildArm32v6AlpineLiteBundle/bundle
- name: Download bundle - arm64v8AlpineLite
if: ${{ !(startsWith(github.event.milestone.title, '16.')) }}
uses: actions/download-artifact@v2
with:
name: arm64v8AlpineLiteBundle
path: alpine-lite-platforms/build/tmp/buildArm64v8AlpineLiteBundle/bundle
- name: Download bundle - ppc64leAlpineLite
if: ${{ !(startsWith(github.event.milestone.title, '16.')) }}
uses: actions/download-artifact@v2
with:
name: ppc64leAlpineLiteBundle
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
postgres: [15.4, 14.9, 13.12, 12.16, 11.21]
postgres: ["16.0", 15.4, 14.9, 13.12, 12.16, 11.21]
steps:
- name: Checkout project
uses: actions/checkout@v3
Expand All @@ -34,7 +34,7 @@ jobs:
strategy:
fail-fast: false
matrix:
postgres: [15.4, 14.9, 13.12, 12.16, 11.21]
postgres: ["16.0", 15.4, 14.9, 13.12, 12.16, 11.21]
steps:
- name: Checkout project
uses: actions/checkout@v3
Expand All @@ -47,7 +47,7 @@ jobs:
run: ./gradlew :alpine-platforms:testAmd64AlpineJar -Pversion=${{ matrix.postgres }}-TEST -PpgVersion=${{ matrix.postgres }}
timeout-minutes: 10
- name: Test PostgreSQL bundle (lite)
if: ${{ !(startsWith(matrix.postgres, '9.')) }}
if: ${{ !(startsWith(matrix.postgres, '9.')) && !(startsWith(matrix.postgres, '16.')) }}
run: ./gradlew :alpine-lite-platforms:testAmd64AlpineLiteJar -Pversion=${{ matrix.postgres }}-TEST -PpgVersion=${{ matrix.postgres }}
timeout-minutes: 10
macos:
Expand All @@ -56,7 +56,7 @@ jobs:
strategy:
fail-fast: false
matrix:
postgres: [15.4, 14.9, 13.12, 12.16, 11.21]
postgres: ["16.0", 15.4, 14.9, 13.12, 12.16, 11.21]
steps:
- name: Checkout project
uses: actions/checkout@v3
Expand All @@ -74,7 +74,7 @@ jobs:
strategy:
fail-fast: false
matrix:
postgres: [15.4, 14.9, 13.12, 12.16, 11.21]
postgres: ["16.0", 15.4, 14.9, 13.12, 12.16, 11.21]
steps:
- name: Checkout project
uses: actions/checkout@v3
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,26 @@ However, with a little effort, the embedded binaries can also be integrated with
* Embedded PostgreSQL 11+ binaries even for Linux platform
* Configurable version of PostgreSQL binaries

## Projects using embedded binaries
## Projects using the embedded binaries

* [zonkyio/embedded-database-spring-test](https://github.com/zonkyio/embedded-database-spring-test) (Java - Spring)
* [zonkyio/embedded-postgres](https://github.com/zonkyio/embedded-postgres) (Java)
* [hgschmie/pg-embedded](https://github.com/hgschmie/pg-embedded) (Java)
* [fergusstrange/embedded-postgres](https://github.com/fergusstrange/embedded-postgres) (Go)
* [offscale/postgres-version-manager-go](https://github.com/offscale/postgres-version-manager-go) (Go, also with CLI interface)
* [faokunega/pg-embed](https://github.com/faokunega/pg-embed) (Rust)
* [leinelissen/embedded-postgres](https://github.com/leinelissen/embedded-postgres) (NodeJS)

## Postgres version

The version of the postgres binaries can be managed by importing `embedded-postgres-binaries-bom` in a required version into your dependency management section.
The version of the postgres binaries can be managed by importing `embedded-postgres-binaries-bom` in a required version in your dependency management section.

```xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.zonky.test.postgres</groupId>
<artifactId>embedded-postgres-binaries-bom</artifactId>
<version>13.2.0</version>
<version>16.0.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -58,9 +57,7 @@ Support for other architectures can be enabled by adding the corresponding Maven
**Supported platforms:** `Darwin`, `Windows`, `Linux`, `Alpine Linux`
**Supported architectures:** `amd64`, `i386`, `arm32v6`, `arm32v7`, `arm64v8`, `ppc64le`

Note that not all architectures are supported by all platforms, look here for an exhaustive list of all available artifacts: https://mvnrepository.com/artifact/io.zonky.test.postgres

Since `PostgreSQL 10.0`, there are additional artifacts with `alpine-lite` suffix. These artifacts contain postgres binaries for Alpine Linux with disabled [ICU support](https://blog.2ndquadrant.com/icu-support-postgresql-10/) for further size reduction.
Note that not all architectures are supported by all platforms, you can find an exhaustive list of all available artifacts here: https://mvnrepository.com/artifact/io.zonky.test.postgres

## Building from Source
The project uses a [Gradle](http://gradle.org)-based build system. In the instructions
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def alpinePlatforms = [

def alpineVariants = [
['name':'', 'opt':'', 'enabled': true],
['name':'lite', 'opt':'-l', 'enabled': pgMajorVersionParam >= 10]
['name':'lite', 'opt':'-l', 'enabled': pgMajorVersionParam >= 10 && pgMajorVersionParam < 16]
]

project(':repacked-platforms') {
Expand Down
2 changes: 1 addition & 1 deletion scripts/repack-postgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ if [ "$PLATFORM_NAME" = "darwin" ] ; then
lib/libssl*.dylib \
lib/libcrypto*.dylib \
lib/libedit*.dylib \
$([ -f lib/postgresql/llvmjit_types.bc ] && echo lib/postgresql/*.so lib/postgresql/*.bc || echo lib/postgresql/*.so) \
lib/postgresql/*.* \
bin/initdb \
bin/pg_ctl \
bin/postgres
Expand Down

0 comments on commit 3cea577

Please sign in to comment.