Skip to content

Add pull request template #585

Add pull request template

Add pull request template #585

name: postgresql-16-src-make-macos
on: [pull_request, workflow_dispatch]
jobs:
build:
name: pg-16-src-make-test
runs-on: macos-14
steps:
- name: Install dependencies
run: |
brew tap hashicorp/tap
brew install gnu-sed icu4c hashicorp/tap/vault
sudo /usr/bin/perl -MCPAN -e 'install HTTP::Server::Simple'
sudo /usr/bin/perl -MCPAN -e 'install IPC::Run'
sudo /usr/bin/perl -MCPAN -e 'install Text::Trim'
- name: Clone postgres repository
uses: actions/checkout@v4
with:
repository: 'postgres/postgres'
ref: 'a81e5516fa4bc53e332cb35eefe231147c0e1749'
path: 'src'
- name: Clone pg_tde repository
uses: actions/checkout@v4
with:
path: 'src/contrib/pg_tde'
- name: Create pgsql dir
run: mkdir -p $HOME/pgsql
- name: Build postgres
run: |
export LDFLAGS="-L/opt/homebrew/opt/openssl/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/icu4c/lib/pkgconfig"
./configure --with-openssl --enable-tap-tests=no --prefix=$HOME/postgres
make -j 4
sudo make install
working-directory: src
- name: Build pg_tde
run: |
./configure
make -j 4 MAJORVERSION=16
sudo make install
working-directory: src/contrib/pg_tde
- name: Start postgresql cluster with pg_tde
run: |
export PATH="$HOME/postgres/bin:$PATH"
initdb -D $HOME/pgsql/data
echo "shared_preload_libraries = 'pg_tde'" >> \
/$HOME/pgsql/data/postgresql.conf
pg_ctl -D $HOME/pgsql/data -l logfile start
- name: Test pg_tde
run: |
TV=$(mktemp)
{ exec >$TV; vault server -dev; } &
sleep 10
export ROOT_TOKEN=$(cat $TV | grep "Root Token" | cut -d ":" -f 2 | xargs echo -n)
echo "Root token: $ROOT_TOKEN"
make installcheck
working-directory: src/contrib/pg_tde
- name: Report on test fail
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: Regressions diff and postgresql log
path: |
src/contrib/pg_tde/regression.diffs
retention-days: 3
- name: Run debug commands on failure
if: ${{ failure() }}
run: |
env
pwd