diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..aa2f0e4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: pgcrypsi CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-20.04 + + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v2 + - name: Set permission to install_ubuntu_deps + run: chmod +x ./scripts/install_ubuntu_deps + - name: Install Ubuntu dependecies + run: bash ./scripts/install_ubuntu_deps + - name: Check Builder + run: | + cmake --version + gcc --version + openssl version -a + - name: Build Extension + run: | + cc -fPIC -c pgcrypsi.c -I /usr/include/postgresql/10/server/ + cc -shared -o pgcrypsi.so pgcrypsi.o + - name: Check libdir + run: | + pg_config --pkglibdir \ No newline at end of file diff --git a/scripts/install_ubuntu_deps b/scripts/install_ubuntu_deps new file mode 100755 index 0000000..004ce96 --- /dev/null +++ b/scripts/install_ubuntu_deps @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +sudo apt-get update +sudo apt-get install -y build-essential +#sudo apt-get install -y libprotobuf-dev protobuf-compiler && \ +sudo apt-get install -y cmake +sudo apt-get install -y git +sudo apt-get install -y gcc-multilib +sudo apt install libpq-dev +sudo apt-get install -y postgresql-server-dev-10 \ No newline at end of file