From 059101cda7b804f374c9da13acd24f8e3e135152 Mon Sep 17 00:00:00 2001 From: Vijay Swamidass Date: Wed, 1 May 2024 14:34:58 -0700 Subject: [PATCH] pgvector --- .github/workflows/rubyonrails.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rubyonrails.yml b/.github/workflows/rubyonrails.yml index b61293b..8736261 100644 --- a/.github/workflows/rubyonrails.yml +++ b/.github/workflows/rubyonrails.yml @@ -34,11 +34,26 @@ jobs: with: bundler-cache: true # Add or replace database setup steps here - - name: Install PostgreSQL Extension + + - name: Install dependencies run: | sudo apt-get update - sudo apt install postgresql-16-pgvector - psql -c 'CREATE EXTENSION vector;' -U rails -d rails_test + sudo apt-get install -y postgresql-server-dev-all git make gcc + + - name: Clone pgvector + run: git clone https://github.com/pgvector/pgvector.git + + - name: Build and install pgvector + run: | + cd pgvector + make + sudo make install + + - name: Configure PostgreSQL and Create pgvector Extension + run: | + sudo service postgresql start + sudo -u postgres psql -c "CREATE EXTENSION vector;" + - name: Set up database schema run: bin/rails db:schema:load - name: Run tests