Skip to content

Merge pull request #14 from swetavooda/feature/remote_indexes #32

Merge pull request #14 from swetavooda/feature/remote_indexes

Merge pull request #14 from swetavooda/feature/remote_indexes #32

Workflow file for this run

name: build
on:
push:
branches:
- main
- feature/**
pull_request:
branches:
- main
- feature/**
workflow_dispatch:
jobs:
ubuntu:
runs-on: ${{ matrix.os }}
if: ${{ !startsWith(github.ref_name, 'mac') && !startsWith(github.ref_name, 'windows') }}
strategy:
fail-fast: false
matrix:
include:
- postgres: 16
os: ubuntu-22.04
- postgres: 15
os: ubuntu-22.04
- postgres: 14
os: ubuntu-22.04
- postgres: 13
os: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev
# set $USER to the current user
- uses: oscarlaird/setup-postgres@25c3e18a27eab3804a45758ae713bad1623b97c8
with:
postgres-version: ${{ matrix.postgres }}
dev-files: true
- if: ${{ failure() }}
# cat the hba file to see what's going on
run: sudo cat /etc/postgresql/${{ matrix.postgres }}/main/pg_hba.conf
- run: make
env:
PG_CFLAGS: -Wall -Wextra -Werror -Wno-unused-parameter -Wno-sign-compare
- run: |
export PG_CONFIG=`which pg_config`
sudo --preserve-env=PG_CONFIG make install
# create db test (initialize mock table and api key)
- run: createuser -U postgres -s $(whoami)
- run: createdb test
- run: psql test -c 'create extension vector'
- run: psql test -c 'select pinecone_create_mock_table()'
- run: psql test -c 'alter database test set pinecone.api_key = "fake"'
- run: psql test -c 'alter database test set pinecone.use_mock_response = true'
- run: psql test -c 'alter database test set enable_seqscan = off'
# setup the database for testing
- run: make installcheck REGRESS="pinecone_crud pinecone_medium_create pinecone_zero_vector_insert" REGRESS_OPTS="--dbname=test --inputdir=./test --use-existing"
- if: ${{ failure() }}
run: cat regression.diffs
# mac:
# runs-on: macos-latest
# if: ${{ !startsWith(github.ref_name, 'windows') }}
# steps:
# - uses: actions/checkout@v4
# - run: brew install curl
# - uses: ankane/setup-postgres@v1
# with:
# postgres-version: 15
# - run: make
# env:
# PG_CFLAGS: -Wall -Wextra -Werror -Wno-unused-parameter
# - run: make install
# - run: make installcheck REGRESS=btree
# - if: ${{ failure() }}
# run: cat regression.diffs
# - run: make clean && /usr/local/opt/llvm@15/bin/scan-build --status-bugs make PG_CFLAGS="-DUSE_ASSERT_CHECKING"
# windows:
# runs-on: windows-latest
# if: ${{ !startsWith(github.ref_name, 'mac') }}
# steps:
# - uses: actions/checkout@v4
# - uses: ankane/setup-postgres@v1
# with:
# postgres-version: 15
# - run: |
# call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" && ^
# nmake /NOLOGO /F Makefile.win && ^
# nmake /NOLOGO /F Makefile.win install && ^
# nmake /NOLOGO /F Makefile.win installcheck && ^
# nmake /NOLOGO /F Makefile.win clean && ^
# nmake /NOLOGO /F Makefile.win uninstall
# shell: cmd
# i386:
# if: ${{ !startsWith(github.ref_name, 'mac') && !startsWith(github.ref_name, 'windows') }}
# runs-on: ubuntu-latest
# container:
# image: debian:12
# options: --platform linux/386
# steps:
# - run: apt-get update && apt-get install -y build-essential git libipc-run-perl postgresql-15 postgresql-server-dev-15 sudo
# - run: service postgresql start
# - run: |
# git clone https://github.com/${{ github.repository }}.git pgvector
# cd pgvector
# git fetch origin ${{ github.ref }}
# git reset --hard FETCH_HEAD
# make
# make install
# chown -R postgres .
# sudo -u postgres make installcheck REGRESS=btree
# env:
# PG_CFLAGS: -Wall -Wextra -Werror -Wno-unused-parameter -Wno-sign-compare
# valgrind:
# if: ${{ !startsWith(github.ref_name, 'mac') && !startsWith(github.ref_name, 'windows') }}
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev
# - uses: ankane/setup-postgres-valgrind@v1
# with:
# postgres-version: 16
# - run: make
# - run: sudo --preserve-env=PG_CONFIG make install
# - run: make installcheck REGRESS=btree