Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release enterprise ci #613

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions .github/workflows/release_enterprise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ jobs:
binary:
strategy:
matrix:
version: [14, 15, 16, 17]
arch: ["x86_64", "aarch64"]
version: [14, 15, 16]
arch: ["x86_64"]
schema: ["vectors", "extensions", "public"]
runs-on: ubuntu-22.04
env:
Expand All @@ -61,7 +61,11 @@ jobs:
sudo apt-get update
sudo apt-get install -y build-essential crossbuild-essential-arm64
sudo apt-get install -y qemu-user-static
echo 'target.aarch64-unknown-linux-gnu.linker = "aarch64-linux-gnu-gcc"' | tee ~/.cargo/config.toml
touch ~/.cargo/config.toml
echo 'target.aarch64-unknown-linux-gnu.linker = "aarch64-linux-gnu-gcc"' >> ~/.cargo/config.toml
echo 'target.aarch64-unknown-linux-gnu.runner = ["qemu-aarch64-static", "-L", "/usr/aarch64-linux-gnu"]' >> ~/.cargo/config.toml
rustup target add x86_64-unknown-linux-gnu
rustup target add aarch64-unknown-linux-gnu
kemingy marked this conversation as resolved.
Show resolved Hide resolved
- name: Set up Sccache
uses: mozilla-actions/sccache-action@v0.0.4
- name: Set up Cache
Expand Down Expand Up @@ -110,8 +114,8 @@ jobs:
needs: ["binary", "semver"]
strategy:
matrix:
version: [14, 15, 16, 17]
platform: ["amd64", "arm64"]
version: [14, 15, 16]
platform: ["amd64"]
schema: ["vectors", "extensions", "public"]
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -144,9 +148,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
version: [14, 15, 16, 17]
version: [14, 15, 16] # https://github.com/tembo-io/trunk/issues/797, 17 not support yet
schema: ["vectors", "extensions", "public"]
platform: ["amd64", "arm64"]
platform: ["amd64"] # Only support x86-64 architecture, aarch64 not support yet
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -165,6 +169,15 @@ jobs:
with:
username: ${{ secrets.DOCKERIO_MODELZ_USERNAME }}
password: ${{ secrets.DOCKERIO_MODELZ_TOKEN }}
- name: Set Lib Dir
run: |
if [ "${{ matrix.platform }}" == "amd64" ]; then
echo "LIB_DIR=/usr/lib/x86_64-linux-gnu" >> $GITHUB_ENV
elif [ "${{ matrix.platform }}" == "arm64" ]; then
echo "LIB_DIR=/usr/lib/aarch64-linux-gnu" >> $GITHUB_ENV
else
echo "LIB_DIR=/usr/lib/unknown" >> $GITHUB_ENV
fi
- name: Push postgres with pgvecto.rs enterprise to Docker Registry
uses: docker/build-push-action@v4
with:
Expand All @@ -177,4 +190,5 @@ jobs:
FROM_TAG=pg${{ matrix.version }}-v${{ github.event.inputs.version }}
SCHEMA=${{ matrix.schema }}
TARGETARCH=${{ matrix.platform }}
LIB_DIR=${{ env.LIB_DIR }}
tags: ${{ steps.variables.outputs.tags }}
2 changes: 1 addition & 1 deletion .github/workflows/release_pg_slim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
file: ./docker/pg-slim/Dockerfile
build-args: |
PG_MAJOR=${{ matrix.version }}
tags: modelzai/pg-slim:${{ matrix.version }}
tags: modelzai/pg-slim:${{ matrix.version }}-${{ matrix.platform }}
4 changes: 2 additions & 2 deletions .github/workflows/trunk-install-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
- ubuntu-latest
strategy:
matrix:
version: [14, 15, 16, 17]
version: [14, 15, 16]
schema: ["vectors", "extensions", "public"]
platform: ["amd64", "arm64"]
platform: ["amd64"]
container:
image: modelzai/pgvecto-rs:${{ matrix.version }}-v${{ github.event.inputs.version }}-${{ matrix.schema }}
options: --user root
Expand Down
16 changes: 9 additions & 7 deletions docker/pg-cnpg/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ ARG PG_MAJOR
ARG FROM_TAG
ARG SCHEMA
ARG TARGETARCH
ARG LIB_DIR

FROM modelzai/pgvecto-rs-binary:${FROM_TAG}-${TARGETARCH}-${SCHEMA} as binary

Expand All @@ -10,8 +11,9 @@ ARG TRUNK_VER=0.12.25
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL sparse
RUN cargo install --version $TRUNK_VER pg-trunk

FROM modelzai/pg-slim:${PG_MAJOR}
FROM modelzai/pg-slim:${PG_MAJOR}-${TARGETARCH}
ARG PG_MAJOR
ARG LIB_DIR

USER root

Expand Down Expand Up @@ -91,12 +93,12 @@ RUN apt-get update && apt-get install -y \
libbson-dev \
libgsl-dev \
&& rm -rf /var/lib/apt/lists/*
RUN ln -s /usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so /usr/lib/x86_64-linux-gnu/libjvm.so
RUN ln -s /usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so ${LIB_DIR}/libjvm.so
RUN wget https://download.oracle.com/otn_software/linux/instantclient/1920000/instantclient-basiclite-linux.x64-19.20.0.0.0dbru.zip && \
unzip instantclient-basiclite-linux.x64-19.20.0.0.0dbru.zip && \
cp instantclient_19_20/libclntsh.so.19.1 /usr/lib/x86_64-linux-gnu/ && \
cp instantclient_19_20/libnnz19.so /usr/lib/x86_64-linux-gnu/ && \
cp instantclient_19_20/libclntshcore.so.19.1 /usr/lib/x86_64-linux-gnu/ && \
cp instantclient_19_20/libclntsh.so.19.1 ${LIB_DIR}/ && \
cp instantclient_19_20/libnnz19.so ${LIB_DIR}/ && \
cp instantclient_19_20/libclntshcore.so.19.1 ${LIB_DIR}/ && \
rm -rf instantclient_19_20 && \
rm instantclient-basiclite-linux.x64-19.20.0.0.0dbru.zip

Expand All @@ -108,12 +110,12 @@ RUN wget http://www.xunsearch.com/scws/down/scws-1.2.3.tar.bz2 && \
make install && \
cd .. && \
rm -rf scws-1.2.3.tar.bz2 scws-1.2.3 && \
ln -s /usr/local/lib/libscws.so /usr/lib/x86_64-linux-gnu/libscws.so
ln -s /usr/local/lib/libscws.so ${LIB_DIR}/libscws.so

# Install duckdb libs
RUN wget https://github.com/duckdb/duckdb/releases/download/v0.8.1/libduckdb-linux-amd64.zip && \
unzip libduckdb-linux-amd64.zip && \
cp libduckdb.so /usr/lib/x86_64-linux-gnu/ && \
cp libduckdb.so ${LIB_DIR}/ && \
rm -rf libduckdb-linux-amd64.zip libduckdb.so

# Install pg_stat_statements
Expand Down