Skip to content

Commit

Permalink
Merge pull request #2 from cpunion/update-platform-names
Browse files Browse the repository at this point in the history
update github action platform names
  • Loading branch information
cpunion authored Dec 9, 2024
2 parents fec0a57 + 9072225 commit 2f0c772
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 23 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
18 changes: 13 additions & 5 deletions scripts/install-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;'
Expand Down
9 changes: 7 additions & 2 deletions scripts/install-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 14 additions & 8 deletions scripts/install-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2f0c772

Please sign in to comment.