Add MacOS specific linker flags to meson tests build step for MacOS #206
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: postgresql-16-src-meson | |
on: [pull_request, workflow_dispatch] | |
jobs: | |
build: | |
name: pg-16-src-meson-test | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Remove old postgres | |
run: | | |
sudo apt purge postgresql-client-common postgresql-common \ | |
postgresql postgresql* | |
sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ | |
/usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ | |
/etc/postgresql | |
sudo rm -f /usr/bin/pg_config | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ | |
zlib1g-dev libssl-dev libpam0g-dev bison flex \ | |
libipc-run-perl -y docbook-xsl docbook-xsl libxml2 libxml2-utils \ | |
libxml2-dev libxslt-dev xsltproc libkrb5-dev libldap2-dev \ | |
libsystemd-dev gettext tcl-dev libperl-dev pkg-config clang-11 \ | |
llvm-11 llvm-11-dev libselinux1-dev python3-dev \ | |
uuid-dev liblz4-dev meson ninja-build libjson-c-dev \ | |
gpg wget libcurl4-openssl-dev | |
sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' | |
sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' | |
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg | |
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list | |
sudo apt update && sudo apt install -y vault | |
- name: Clone postgres repository | |
uses: actions/checkout@v2 | |
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: Include postgres-tde-ext in meson build | |
run: | | |
echo "subdir('postgres-tde-ext')" >> src/contrib/meson.build | |
- name: Build postgres | |
run: | | |
meson setup build --prefix `pwd`/../inst --buildtype=debug -Dcassert=true | |
cd build && ninja && ninja install | |
working-directory: src | |
- name: Test postgres-tde-ext with keyring_file | |
run: | | |
cp ../contrib/postgres-tde-ext/keyring.json /tmp/keyring.json | |
meson test --suite setup -v | |
meson test --suite postgres-tde-ext -v --num-processes 1 | |
working-directory: src/build | |
- name: Report on test fail | |
uses: actions/upload-artifact@v2 | |
if: ${{ failure() }} | |
with: | |
name: Regressions diff and postgresql log | |
path: | | |
src/build/testrun/postgres-tde-ext/regress/ | |
retention-days: 3 | |
- name: Test postgres-tde-ext with keyring_vault | |
run: | | |
TV=$(mktemp) | |
{ exec >$TV; vault server -dev; } & | |
sleep 10 | |
ROOT_TOKEN=$(cat $TV | grep "Root Token" | cut -d ":" -f 2 | xargs echo -n) | |
echo "Root token: $ROOT_TOKEN" | |
cp ../contrib/postgres-tde-ext/keyring-vault.json /tmp/keyring.json | |
sed -i "s/ROOT_TOKEN/$ROOT_TOKEN/g" /tmp/keyring.json | |
cat /tmp/keyring.json | |
meson test --suite setup -v | |
meson test --suite postgres-tde-ext -v --num-processes 1 | |
working-directory: src/build | |
- name: Report on test fail | |
uses: actions/upload-artifact@v2 | |
if: ${{ failure() }} | |
with: | |
name: Regressions diff and postgresql log | |
path: | | |
src/build/testrun/postgres-tde-ext/regress/ | |
retention-days: 3 | |