blob: e4825cde69c0fcf01de6752e48939669005574b2 [file] [log] [blame]
name: C/C++ CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: checkout datasketches-cpp
uses: actions/checkout@v3
with:
repository: apache/datasketches-cpp
path: datasketches-cpp
- name: download Boost
run: make boost
- name: install PostgreSQL
run: |
sudo apt update
sudo apt -y install postgresql-14 postgresql-client-14 postgresql-server-dev-14 libpq-dev
- name: make
run: make
- name: install
run: sudo make install
- name: start server
run: |
sudo systemctl start postgresql.service
pg_isready
- name: create test database
run: sudo -u postgres createdb test
- name: copy tests
run: cp -r test /tmp
- name: run tests
run: sudo -u postgres bash -c "cd; for t in /tmp/test/*.sql; do psql test -f \$t; done"