-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (36 loc) · 1.2 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: ankane/setup-postgres@v1
with:
database: pgvector_cpp_test
dev-files: true
- run: |
cd /tmp
git clone --branch v0.8.0 https://github.com/pgvector/pgvector.git
cd pgvector
make
sudo make install
- run: |
git clone --branch 7.10.0 https://github.com/jtv/libpqxx.git
cd libpqxx
CXXFLAGS=-std=c++17 ./configure
make
sudo make install
- run: g++ -std=c++17 -Wall -Wextra -Werror -o test/main test/main.cpp test/pqxx_test.cpp -lpqxx -lpq
- run: test/main
- run: g++ -std=c++20 -Wall -Wextra -Werror -o test/main test/main.cpp test/pqxx_test.cpp -lpqxx -lpq
- run: test/main
- run: g++ -std=c++23 -Wall -Wextra -Werror -o test/main test/main.cpp test/pqxx_test.cpp -lpqxx -lpq
- run: test/main
- run: |
sudo apt-get install valgrind
valgrind --leak-check=yes test/main
# test install
- run: cmake -S . -B build
- run: cmake --build build
- run: sudo cmake --install build