Skip to content

Commit

Permalink
add github ci workflow for postgres 17 (#11)
Browse files Browse the repository at this point in the history
* add github ci workflow for postgres 17

* update README

---------

Co-authored-by: Jimmy Huang <[email protected]>
  • Loading branch information
jimmy-shaojun and huangjimmy authored Sep 30, 2024
1 parent 9131134 commit c896f18
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 7 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/postgress12_16.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,31 @@ jobs:
name: Run bash script to verify image postgres:16-dev
run: docker pull localhost:5000/postgres:16-dev && docker tag localhost:5000/postgres:16-dev postgres:16-dev && chmod +x ./postgres-16.sh && ./postgres-16.sh

PostgreSQL-17:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
-
name: Build and push
uses: docker/build-push-action@v5
with:
push: true
build-args: POSTGRES_VERSION=17
file: Dockerfile_alpine
tags: localhost:5000/postgres:dev
-
name: Run bash script to verify image postgres:dev
run: docker pull localhost:5000/postgres:dev && docker tag localhost:5000/postgres:dev postgres:dev && chmod +x ./postgres-1x.sh && ./postgres-1x.sh
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*.o
*.so
.vscode
.cache
10 changes: 5 additions & 5 deletions Dockerfile_alpine
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

ARG POSTGRES_VERSION=16
FROM postgres:$POSTGRES_VERSION-alpine3.18 as build
FROM postgres:$POSTGRES_VERSION-alpine as build
ARG POSTGRES_VERSION=16
RUN apk update && apk add musl-dev icu-dev llvm15-dev clang15 make

Expand All @@ -13,8 +13,8 @@ COPY pg_cjk_parser--0.0.1.sql /root/parser/
COPY zht2zhs.h /root/parser/
RUN make clean && make install

FROM postgres:$POSTGRES_VERSION-alpine3.18
FROM postgres:$POSTGRES_VERSION-alpine
COPY --from=build /root/parser/pg_cjk_parser.bc /usr/local/lib/postgresql/bitcode
COPY --from=build /root/parser/pg_cjk_parser.so /usr/local/lib/postgresql
COPY --from=build /root/parser/pg_cjk_parser--0.0.1.sql /usr/local/share/postgresql/extension
COPY --from=build /root/parser/pg_cjk_parser.control /usr/local/share/postgresql/extension
COPY --from=build /root/parser/pg_cjk_parser.so /usr/local/lib/postgresql/
COPY --from=build /root/parser/pg_cjk_parser--0.0.1.sql /usr/local/share/postgresql/extension/
COPY --from=build /root/parser/pg_cjk_parser.control /usr/local/share/postgresql/extension/
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Postgres CJK Parser pg_cjk_parser is a fts (full text search) parser derived from the default parser in PostgreSQL. When a postgres database uses utf-8 encoding, this parser supports all the features of the default parser while splitting CJK (Chinese, Japanese, Korean) characters into 2-gram tokens. If the database's encoding is not utf-8, the parser behaves just like the default parser.

Now pg_cjk_parser supports PostgreSQL 12 to 16.
Now pg_cjk_parser supports PostgreSQL 11 to 17.

## Introduction

Expand Down
2 changes: 1 addition & 1 deletion pg_cjk_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -3006,4 +3006,4 @@ prsd2_zht2zhs(PG_FUNCTION_ARGS)
}

PG_RETURN_TEXT_P(zhs_text);
}
}

0 comments on commit c896f18

Please sign in to comment.