-
Notifications
You must be signed in to change notification settings - Fork 19
97 lines (84 loc) · 3.43 KB
/
postgresql-17-src-make.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: postgresql-17-src-make
on: [pull_request, workflow_dispatch]
jobs:
build:
name: pg-17-src-make-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 libcurl4-openssl-dev libhttp-server-simple-perl
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@v4
with:
repository: 'postgres/postgres'
ref: 'REL_17_STABLE'
path: 'src'
- name: Clone pg_tde repository
uses: actions/checkout@v4
with:
path: 'src/contrib/pg_tde'
- name: Create pgsql dir
run: mkdir -p /opt/pgsql
- name: Build postgres
run: |
./configure --with-openssl --enable-tap-tests=no --enable-cassert
make -j
sudo make install
working-directory: src
- name: Build pg_tde
run: |
./configure
make -j MAJORVERSION=17
sudo make install
working-directory: src/contrib/pg_tde
- name: Start postgresql cluster with pg_tde
run: |
export PATH="/usr/local/pgsql/bin:$PATH"
sudo cp /usr/local/pgsql/bin/pg_config /usr/bin
initdb -D /opt/pgsql/data
echo "shared_preload_libraries = 'pg_tde'" >> \
/opt/pgsql/data/postgresql.conf
pg_ctl -D /opt/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
logfile
retention-days: 3
- name: Report on test fail 2
if: ${{ failure() }}
run: |
cat src/contrib/pg_tde/regression.diffs