MacOS CI workflows #28
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build on MacOS with make | |
on: [pull_request, workflow_dispatch] | |
jobs: | |
build: | |
name: build | |
runs-on: macos-12 | |
steps: | |
- name: Install dependencies | |
run: | | |
brew install make autoconf openssl@3 curl json-c gettext icu4c | |
- name: Clone postgres repository | |
uses: actions/checkout@v4 | |
with: | |
repository: 'postgres/postgres' | |
ref: 'a81e5516fa4bc53e332cb35eefe231147c0e1749' | |
path: 'src' | |
- name: Clone postgres-tde-ext repository | |
uses: actions/checkout@v2 | |
with: | |
path: 'src/contrib/postgres-tde-ext' | |
- name: Create pgsql dir | |
run: mkdir -p $HOME/pgsql | |
- name: Build postgres | |
run: | | |
export LDFLAGS="-L/usr/local/opt/icu4c/lib -L/usr/local/opt/openssl/lib" | |
export CPPFLAGS="-I/usr/local/opt/icu4c/include -I/usr/local/opt/openssl/include" | |
export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig" | |
./configure --with-openssl --enable-tap-tests=no --prefix=$HOME/postgres | |
make -j | |
sudo make install | |
working-directory: src | |
- name: Build postgres-tde-ext | |
run: | | |
./configure | |
make -j | |
sudo make install | |
working-directory: src/contrib/postgres-tde-ext | |
- name: Start postgresql cluster with pg_tde | |
run: | | |
export PATH="$HOME/postgres/bin:$PATH" | |
sudo cp $HOME/postgres/bin/pg_config /usr/bin | |
initdb -D $HOME/pgsql/data | |
echo "shared_preload_libraries = 'pg_tde'" >> \ | |
/$HOME/pgsql/data/postgresql.conf | |
echo "pg_tde.keyringConfigFile = '/tmp/keyring.json'" >> \ | |
$HOME/pgsql/data/postgresql.conf | |
cp src/contrib/postgres-tde-ext/keyring.json /tmp/keyring.json | |
pg_ctl -D $HOME/pgsql/data -l logfile start | |
- name: Run debug commands on failure | |
if: ${{ failure() }} | |
run: | | |
env | |
pwd | |
git status | |