diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 833d890..e1cf853 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,9 +8,7 @@ on: jobs: test: - continue-on-error: true strategy: - fail-fast: false matrix: postgres-version: [14, 15, 16, 17] os: [ubuntu-latest, ubuntu-24.04, windows-latest, windows-2019, macos-latest, macos-13] diff --git a/README.md b/README.md index b314c3f..c823ee9 100644 --- a/README.md +++ b/README.md @@ -17,12 +17,12 @@ The following table shows the compatibility matrix for different PostgreSQL vers | Platform | Architecture | PostgreSQL 14 | PostgreSQL 15 | PostgreSQL 16 | PostgreSQL 17 | |----------|-------------|:-------------:|:-------------:|:-------------:|:-------------:| -| Ubuntu Latest | x86_64 | ✅ | ✅ | ✅ | ✅ | -| Ubuntu 24.04 | x86_64 | ✅ | ✅ | ✅ | ✅ | -| Windows Latest | x86_64 | ✅ | ✅ | ✅ | ✅ | -| Windows 2019 | x86_64 | ✅ | ✅ | ✅ | ✅ | -| macOS Latest | arm64 | ✅ | ✅ | ✅ | ✅ | -| macOS 13 | x86_64 | ✅ | ✅ | ✅ | ✅ | +| ubuntu-latest | x86_64 | ✅ | ✅ | ✅ | ✅ | +| ubuntu-24.04 | x86_64 | ✅ | ✅ | ✅ | ✅ | +| windows-latest | x86_64 | ✅ | ✅ | ✅ | ✅ | +| windows-2019 | x86_64 | ✅ | ✅ | ✅ | ✅ | +| macos-latest | arm64 | ✅ | ✅ | ✅ | ✅ | +| macos-13 | x86_64 | ✅ | ✅ | ✅ | ✅ | ## Quick Start diff --git a/scripts/install-macos.sh b/scripts/install-macos.sh index dcb9d16..ccdfe80 100644 --- a/scripts/install-macos.sh +++ b/scripts/install-macos.sh @@ -49,12 +49,20 @@ if [ "$PGDATABASE" != "postgres" ]; then fi # Build and install pgvector -git clone --branch "v$PGVECTOR_VERSION" https://github.com/pgvector/pgvector.git +echo "Building pgvector from source..." +brew install git + +# Create and use temporary directory +TEMP_DIR=$(mktemp -d) +ORIG_DIR=$(pwd) +cd "$TEMP_DIR" +git clone --branch v${PGVECTOR_VERSION} https://github.com/pgvector/pgvector.git cd pgvector -make -make install -cd .. -rm -rf pgvector +make clean +PG_CONFIG="$PG_PATH/pg_config" make +sudo PG_CONFIG="$PG_PATH/pg_config" make install +cd "$ORIG_DIR" +rm -rf "$TEMP_DIR" # Create and configure pgvector extension psql -d $PGDATABASE -c 'CREATE EXTENSION IF NOT EXISTS vector;' diff --git a/scripts/install-ubuntu.sh b/scripts/install-ubuntu.sh index e0c6a4c..63dc518 100644 --- a/scripts/install-ubuntu.sh +++ b/scripts/install-ubuntu.sh @@ -38,13 +38,18 @@ echo "Installing pgvector..." # Always build from source to match PostgreSQL version echo "Building pgvector from source..." sudo apt-get install -y postgresql-server-dev-${PG_MAJOR_VERSION} build-essential git + +# Create and use temporary directory +TEMP_DIR=$(mktemp -d) +ORIG_DIR=$(pwd) +cd "$TEMP_DIR" git clone --branch v${PGVECTOR_VERSION} https://github.com/pgvector/pgvector.git cd pgvector make clean PG_CONFIG=/usr/lib/postgresql/${PG_MAJOR_VERSION}/bin/pg_config make sudo PG_CONFIG=/usr/lib/postgresql/${PG_MAJOR_VERSION}/bin/pg_config make install -cd .. -rm -rf pgvector +cd "$ORIG_DIR" +rm -rf "$TEMP_DIR" # Configure PostgreSQL authentication for CI echo "local all postgres trust" | sudo tee /etc/postgresql/${PG_VERSION}/main/pg_hba.conf diff --git a/scripts/install-windows.sh b/scripts/install-windows.sh index 1b66e30..5a0cc8e 100644 --- a/scripts/install-windows.sh +++ b/scripts/install-windows.sh @@ -83,17 +83,23 @@ fi export PATH="/mingw64/bin:$PATH" export PKG_CONFIG_PATH="/mingw64/lib/pkgconfig:$PKG_CONFIG_PATH" -# Build and install pgvector -git clone --branch "v$PGVECTOR_VERSION" https://github.com/pgvector/pgvector.git +# Install pgvector +echo "Building pgvector from source..." +pacman -S --noconfirm git make gcc + +# Create and use temporary directory +TEMP_DIR=$(mktemp -d) +ORIG_DIR=$(pwd) +cd "$TEMP_DIR" +git clone --branch v${PGVECTOR_VERSION} https://github.com/pgvector/pgvector.git cd pgvector make clean -PG_CONFIG=/mingw64/bin/pg_config make -PG_CONFIG=/mingw64/bin/pg_config make install -cd .. -rm -rf pgvector +PATH=$PATH:/mingw64/bin make USE_PGXS=1 +PATH=$PATH:/mingw64/bin make USE_PGXS=1 install +cd "$ORIG_DIR" +rm -rf "$TEMP_DIR" -# Create and configure pgvector extension -echo "Creating pgvector extension..." +# Create extension PGPASSWORD=$PGPASSWORD psql -h localhost -U $PGUSER -d $PGDATABASE -c "CREATE EXTENSION IF NOT EXISTS vector;" # Verify installation