Skip to content

Commit 2f0c772

Browse files
authored
Merge pull request #2 from cpunion/update-platform-names
update github action platform names
2 parents fec0a57 + 9072225 commit 2f0c772

File tree

5 files changed

+40
-23
lines changed

5 files changed

+40
-23
lines changed

.github/workflows/ci.yml

-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ on:
88

99
jobs:
1010
test:
11-
continue-on-error: true
1211
strategy:
13-
fail-fast: false
1412
matrix:
1513
postgres-version: [14, 15, 16, 17]
1614
os: [ubuntu-latest, ubuntu-24.04, windows-latest, windows-2019, macos-latest, macos-13]

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ The following table shows the compatibility matrix for different PostgreSQL vers
1717

1818
| Platform | Architecture | PostgreSQL 14 | PostgreSQL 15 | PostgreSQL 16 | PostgreSQL 17 |
1919
|----------|-------------|:-------------:|:-------------:|:-------------:|:-------------:|
20-
| Ubuntu Latest | x86_64 |||||
21-
| Ubuntu 24.04 | x86_64 |||||
22-
| Windows Latest | x86_64 |||||
23-
| Windows 2019 | x86_64 |||||
24-
| macOS Latest | arm64 |||||
25-
| macOS 13 | x86_64 |||||
20+
| ubuntu-latest | x86_64 |||||
21+
| ubuntu-24.04 | x86_64 |||||
22+
| windows-latest | x86_64 |||||
23+
| windows-2019 | x86_64 |||||
24+
| macos-latest | arm64 |||||
25+
| macos-13 | x86_64 |||||
2626

2727
## Quick Start
2828

scripts/install-macos.sh

+13-5
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,20 @@ if [ "$PGDATABASE" != "postgres" ]; then
4949
fi
5050

5151
# Build and install pgvector
52-
git clone --branch "v$PGVECTOR_VERSION" https://github.com/pgvector/pgvector.git
52+
echo "Building pgvector from source..."
53+
brew install git
54+
55+
# Create and use temporary directory
56+
TEMP_DIR=$(mktemp -d)
57+
ORIG_DIR=$(pwd)
58+
cd "$TEMP_DIR"
59+
git clone --branch v${PGVECTOR_VERSION} https://github.com/pgvector/pgvector.git
5360
cd pgvector
54-
make
55-
make install
56-
cd ..
57-
rm -rf pgvector
61+
make clean
62+
PG_CONFIG="$PG_PATH/pg_config" make
63+
sudo PG_CONFIG="$PG_PATH/pg_config" make install
64+
cd "$ORIG_DIR"
65+
rm -rf "$TEMP_DIR"
5866

5967
# Create and configure pgvector extension
6068
psql -d $PGDATABASE -c 'CREATE EXTENSION IF NOT EXISTS vector;'

scripts/install-ubuntu.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,18 @@ echo "Installing pgvector..."
3838
# Always build from source to match PostgreSQL version
3939
echo "Building pgvector from source..."
4040
sudo apt-get install -y postgresql-server-dev-${PG_MAJOR_VERSION} build-essential git
41+
42+
# Create and use temporary directory
43+
TEMP_DIR=$(mktemp -d)
44+
ORIG_DIR=$(pwd)
45+
cd "$TEMP_DIR"
4146
git clone --branch v${PGVECTOR_VERSION} https://github.com/pgvector/pgvector.git
4247
cd pgvector
4348
make clean
4449
PG_CONFIG=/usr/lib/postgresql/${PG_MAJOR_VERSION}/bin/pg_config make
4550
sudo PG_CONFIG=/usr/lib/postgresql/${PG_MAJOR_VERSION}/bin/pg_config make install
46-
cd ..
47-
rm -rf pgvector
51+
cd "$ORIG_DIR"
52+
rm -rf "$TEMP_DIR"
4853

4954
# Configure PostgreSQL authentication for CI
5055
echo "local all postgres trust" | sudo tee /etc/postgresql/${PG_VERSION}/main/pg_hba.conf

scripts/install-windows.sh

+14-8
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,23 @@ fi
8383
export PATH="/mingw64/bin:$PATH"
8484
export PKG_CONFIG_PATH="/mingw64/lib/pkgconfig:$PKG_CONFIG_PATH"
8585

86-
# Build and install pgvector
87-
git clone --branch "v$PGVECTOR_VERSION" https://github.com/pgvector/pgvector.git
86+
# Install pgvector
87+
echo "Building pgvector from source..."
88+
pacman -S --noconfirm git make gcc
89+
90+
# Create and use temporary directory
91+
TEMP_DIR=$(mktemp -d)
92+
ORIG_DIR=$(pwd)
93+
cd "$TEMP_DIR"
94+
git clone --branch v${PGVECTOR_VERSION} https://github.com/pgvector/pgvector.git
8895
cd pgvector
8996
make clean
90-
PG_CONFIG=/mingw64/bin/pg_config make
91-
PG_CONFIG=/mingw64/bin/pg_config make install
92-
cd ..
93-
rm -rf pgvector
97+
PATH=$PATH:/mingw64/bin make USE_PGXS=1
98+
PATH=$PATH:/mingw64/bin make USE_PGXS=1 install
99+
cd "$ORIG_DIR"
100+
rm -rf "$TEMP_DIR"
94101

95-
# Create and configure pgvector extension
96-
echo "Creating pgvector extension..."
102+
# Create extension
97103
PGPASSWORD=$PGPASSWORD psql -h localhost -U $PGUSER -d $PGDATABASE -c "CREATE EXTENSION IF NOT EXISTS vector;"
98104

99105
# Verify installation

0 commit comments

Comments
 (0)