-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ea569e
commit c94dac4
Showing
23 changed files
with
1,743 additions
and
1,738 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,121 +1,121 @@ | ||
name: postgresql-11-build | ||
on: [push] | ||
# name: postgresql-11-build | ||
# on: [push] | ||
|
||
jobs: | ||
build: | ||
name: pg-11-build-test | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Clone postgres repository | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: 'postgres/postgres' | ||
ref: 'REL_11_STABLE' | ||
# jobs: | ||
# build: | ||
# name: pg-11-build-test | ||
# runs-on: ubuntu-22.04 | ||
# steps: | ||
# - name: Clone postgres repository | ||
# uses: actions/checkout@v2 | ||
# with: | ||
# repository: 'postgres/postgres' | ||
# ref: 'REL_11_STABLE' | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt purge postgresql-client-common postgresql-common \ | ||
postgresql postgresql* | ||
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 | ||
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 purge postgresql-client-common postgresql-common \ | ||
# postgresql postgresql* | ||
# 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 | ||
# 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: Create pgsql dir | ||
run: mkdir -p /opt/pgsql | ||
# - name: Create pgsql dir | ||
# run: mkdir -p /opt/pgsql | ||
|
||
- name: Build postgres | ||
run: | | ||
export PATH="/opt/pgsql/bin:$PATH" | ||
./configure '--build=x86_64-linux-gnu' '--prefix=/usr' \ | ||
'--includedir=/usr/include' '--mandir=/usr/share/man' \ | ||
'--infodir=/usr/share/info' '--sysconfdir=/etc' '--enable-nls' \ | ||
'--localstatedir=/var' '--libdir=/usr/lib/x86_64-linux-gnu' \ | ||
'runstatedir=/run' '--with-icu' '--with-tcl' '--with-perl' \ | ||
'--with-python' '--with-pam' '--with-openssl' '--with-libxml' \ | ||
'--with-libxslt' 'PYTHON=/usr/bin/python3' 'MKDIR_P=/bin/mkdir -p' \ | ||
'--mandir=/usr/share/postgresql/11/man' '--enable-dtrace' \ | ||
'--docdir=/usr/share/doc/postgresql-doc-11' '--enable-debug' \ | ||
'--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share' \ | ||
'--datadir=/usr/share/postgresql/11' '--enable-thread-safety' \ | ||
'--bindir=/usr/lib/postgresql/11/bin' '--enable-tap-tests' \ | ||
'--libdir=/usr/lib/x86_64-linux-gnu' '--disable-rpath' \ | ||
'--libexecdir=/usr/lib/postgresql' '--with-uuid=e2fs' \ | ||
'--includedir=/usr/include/postgresql' '--with-gnu-ld' \ | ||
'--with-pgport=5432' '--with-system-tzdata=/usr/share/zoneinfo' \ | ||
'--with-llvm' 'LLVM_CONFIG=/usr/bin/llvm-config-11' \ | ||
'CLANG=/usr/bin/clang-11' '--with-systemd' '--with-selinux' \ | ||
'PROVE=/usr/bin/prove' 'TAR=/bin/tar' '--with-gssapi' '--with-ldap' \ | ||
'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' \ | ||
'--with-includes=/usr/include/mit-krb5' '--with-libs=/usr/lib/mit-krb5' \ | ||
'--with-libs=/usr/lib/x86_64-linux-gnu/mit-krb5' \ | ||
'build_alias=x86_64-linux-gnu' \ | ||
'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' \ | ||
'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer' \ | ||
'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security' | ||
make world | ||
sudo make install-world | ||
# - name: Build postgres | ||
# run: | | ||
# export PATH="/opt/pgsql/bin:$PATH" | ||
# ./configure '--build=x86_64-linux-gnu' '--prefix=/usr' \ | ||
# '--includedir=/usr/include' '--mandir=/usr/share/man' \ | ||
# '--infodir=/usr/share/info' '--sysconfdir=/etc' '--enable-nls' \ | ||
# '--localstatedir=/var' '--libdir=/usr/lib/x86_64-linux-gnu' \ | ||
# 'runstatedir=/run' '--with-icu' '--with-tcl' '--with-perl' \ | ||
# '--with-python' '--with-pam' '--with-openssl' '--with-libxml' \ | ||
# '--with-libxslt' 'PYTHON=/usr/bin/python3' 'MKDIR_P=/bin/mkdir -p' \ | ||
# '--mandir=/usr/share/postgresql/11/man' '--enable-dtrace' \ | ||
# '--docdir=/usr/share/doc/postgresql-doc-11' '--enable-debug' \ | ||
# '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share' \ | ||
# '--datadir=/usr/share/postgresql/11' '--enable-thread-safety' \ | ||
# '--bindir=/usr/lib/postgresql/11/bin' '--enable-tap-tests' \ | ||
# '--libdir=/usr/lib/x86_64-linux-gnu' '--disable-rpath' \ | ||
# '--libexecdir=/usr/lib/postgresql' '--with-uuid=e2fs' \ | ||
# '--includedir=/usr/include/postgresql' '--with-gnu-ld' \ | ||
# '--with-pgport=5432' '--with-system-tzdata=/usr/share/zoneinfo' \ | ||
# '--with-llvm' 'LLVM_CONFIG=/usr/bin/llvm-config-11' \ | ||
# 'CLANG=/usr/bin/clang-11' '--with-systemd' '--with-selinux' \ | ||
# 'PROVE=/usr/bin/prove' 'TAR=/bin/tar' '--with-gssapi' '--with-ldap' \ | ||
# 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' \ | ||
# '--with-includes=/usr/include/mit-krb5' '--with-libs=/usr/lib/mit-krb5' \ | ||
# '--with-libs=/usr/lib/x86_64-linux-gnu/mit-krb5' \ | ||
# 'build_alias=x86_64-linux-gnu' \ | ||
# 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' \ | ||
# 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer' \ | ||
# 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security' | ||
# make world | ||
# sudo make install-world | ||
|
||
- name: Start postgresql cluster | ||
run: | | ||
export PATH="/usr/lib/postgresql/11/bin:$PATH" | ||
sudo cp /usr/lib/postgresql/11/bin/pg_config /usr/bin | ||
initdb -D /opt/pgsql/data | ||
pg_ctl -D /opt/pgsql/data -l logfile start | ||
# - name: Start postgresql cluster | ||
# run: | | ||
# export PATH="/usr/lib/postgresql/11/bin:$PATH" | ||
# sudo cp /usr/lib/postgresql/11/bin/pg_config /usr/bin | ||
# initdb -D /opt/pgsql/data | ||
# pg_ctl -D /opt/pgsql/data -l logfile start | ||
|
||
- name: Clone pg_stat_monitor repository | ||
uses: actions/checkout@v2 | ||
with: | ||
path: 'src/pg_stat_monitor' | ||
# - name: Clone pg_stat_monitor repository | ||
# uses: actions/checkout@v2 | ||
# with: | ||
# path: 'src/pg_stat_monitor' | ||
|
||
- name: Build pg_stat_monitor | ||
run: | | ||
make USE_PGXS=1 | ||
sudo make USE_PGXS=1 install | ||
working-directory: src/pg_stat_monitor/ | ||
# - name: Build pg_stat_monitor | ||
# run: | | ||
# make USE_PGXS=1 | ||
# sudo make USE_PGXS=1 install | ||
# working-directory: src/pg_stat_monitor/ | ||
|
||
- name: Load pg_stat_monitor library and Restart Server | ||
run: | | ||
export PATH="/usr/lib/postgresql/11/bin:$PATH" | ||
pg_ctl -D /opt/pgsql/data -l logfile stop | ||
echo "shared_preload_libraries = 'pg_stat_monitor'" >> \ | ||
/opt/pgsql/data/postgresql.conf | ||
pg_ctl -D /opt/pgsql/data -l logfile start | ||
working-directory: src/pg_stat_monitor | ||
# - name: Load pg_stat_monitor library and Restart Server | ||
# run: | | ||
# export PATH="/usr/lib/postgresql/11/bin:$PATH" | ||
# pg_ctl -D /opt/pgsql/data -l logfile stop | ||
# echo "shared_preload_libraries = 'pg_stat_monitor'" >> \ | ||
# /opt/pgsql/data/postgresql.conf | ||
# pg_ctl -D /opt/pgsql/data -l logfile start | ||
# working-directory: src/pg_stat_monitor | ||
|
||
- name: Start pg_stat_monitor_tests | ||
run: | | ||
make installcheck | ||
working-directory: src/pg_stat_monitor | ||
# - name: Start pg_stat_monitor_tests | ||
# run: | | ||
# make installcheck | ||
# working-directory: src/pg_stat_monitor | ||
|
||
- name: Report on pg_stat_monitor test fail | ||
uses: actions/upload-artifact@v2 | ||
if: ${{ failure() }} | ||
with: | ||
name: Regressions diff and postgresql log | ||
path: | | ||
src/pg_stat_monitor/regression.diffs | ||
src/pg_stat_monitor/logfile | ||
retention-days: 1 | ||
# - name: Report on pg_stat_monitor test fail | ||
# uses: actions/upload-artifact@v2 | ||
# if: ${{ failure() }} | ||
# with: | ||
# name: Regressions diff and postgresql log | ||
# path: | | ||
# src/pg_stat_monitor/regression.diffs | ||
# src/pg_stat_monitor/logfile | ||
# retention-days: 1 | ||
|
||
- name: Start Server installcheck-world tests | ||
run: | | ||
make installcheck-world | ||
# - name: Start Server installcheck-world tests | ||
# run: | | ||
# make installcheck-world | ||
|
||
- name: Report on installcheck-world test suites fail | ||
uses: actions/upload-artifact@v2 | ||
if: ${{ failure() }} | ||
with: | ||
name: Regressions output files of failed testsuite, and pg log | ||
path: | | ||
**/regression.diffs | ||
**/regression.out | ||
src/pg_stat_monitor/logfile | ||
retention-days: 3 | ||
# - name: Report on installcheck-world test suites fail | ||
# uses: actions/upload-artifact@v2 | ||
# if: ${{ failure() }} | ||
# with: | ||
# name: Regressions output files of failed testsuite, and pg log | ||
# path: | | ||
# **/regression.diffs | ||
# **/regression.out | ||
# src/pg_stat_monitor/logfile | ||
# retention-days: 3 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,63 @@ | ||
name: postgresql-11-pgdg-package | ||
on: [pull_request] | ||
# name: postgresql-11-pgdg-package | ||
# on: [pull_request] | ||
|
||
jobs: | ||
build: | ||
name: pg-11-pgdg-package-test | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Clone pg_stat_monitor repository | ||
uses: actions/checkout@v2 | ||
with: | ||
path: 'src/pg_stat_monitor' | ||
# jobs: | ||
# build: | ||
# name: pg-11-pgdg-package-test | ||
# runs-on: ubuntu-20.04 | ||
# steps: | ||
# - name: Clone pg_stat_monitor repository | ||
# uses: actions/checkout@v2 | ||
# with: | ||
# path: 'src/pg_stat_monitor' | ||
|
||
- name: Delete old postgresql files | ||
run: | | ||
sudo apt-get update | ||
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: Delete old postgresql files | ||
# run: | | ||
# sudo apt-get update | ||
# 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 PG Distribution Postgresql 11 | ||
run: | | ||
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt \ | ||
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' | ||
sudo wget --quiet -O - \ | ||
https://www.postgresql.org/media/keys/ACCC4CF8.asc | | ||
sudo apt-key add - | ||
sudo apt-get -y update | ||
sudo apt-get -y install postgresql-11 postgresql-server-dev-11 | ||
# - name: Install PG Distribution Postgresql 11 | ||
# run: | | ||
# sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt \ | ||
# $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' | ||
# sudo wget --quiet -O - \ | ||
# https://www.postgresql.org/media/keys/ACCC4CF8.asc | | ||
# sudo apt-key add - | ||
# sudo apt-get -y update | ||
# sudo apt-get -y install postgresql-11 postgresql-server-dev-11 | ||
|
||
- name: Change src owner to postgres | ||
run: | | ||
sudo chown -R postgres:postgres src | ||
# - name: Change src owner to postgres | ||
# run: | | ||
# sudo chown -R postgres:postgres src | ||
|
||
- name: Build pg_stat_monitor | ||
run: | | ||
sudo -u postgres bash -c 'make USE_PGXS=1' | ||
sudo make USE_PGXS=1 install | ||
working-directory: src/pg_stat_monitor | ||
# - name: Build pg_stat_monitor | ||
# run: | | ||
# sudo -u postgres bash -c 'make USE_PGXS=1' | ||
# sudo make USE_PGXS=1 install | ||
# working-directory: src/pg_stat_monitor | ||
|
||
- name: Start pg_stat_monitor_tests | ||
run: | | ||
sudo service postgresql stop | ||
echo "shared_preload_libraries = 'pg_stat_monitor'" | | ||
sudo tee -a /etc/postgresql/11/main/postgresql.conf | ||
sudo service postgresql start | ||
sudo psql -V | ||
export PG_TEST_PORT_DIR=/home/postgres | ||
sudo -u postgres bash -c 'make installcheck USE_PGXS=1' | ||
working-directory: src/pg_stat_monitor | ||
# - name: Start pg_stat_monitor_tests | ||
# run: | | ||
# sudo service postgresql stop | ||
# echo "shared_preload_libraries = 'pg_stat_monitor'" | | ||
# sudo tee -a /etc/postgresql/11/main/postgresql.conf | ||
# sudo service postgresql start | ||
# sudo psql -V | ||
# export PG_TEST_PORT_DIR=/home/postgres | ||
# sudo -u postgres bash -c 'make installcheck USE_PGXS=1' | ||
# working-directory: src/pg_stat_monitor | ||
|
||
- name: Report on test fail | ||
uses: actions/upload-artifact@v2 | ||
if: ${{ failure() }} | ||
with: | ||
name: Regressions diff and postgresql log | ||
path: | | ||
src/pg_stat_monitor/regression.diffs | ||
src/pg_stat_monitor/logfile | ||
retention-days: 3 | ||
# - name: Report on test fail | ||
# uses: actions/upload-artifact@v2 | ||
# if: ${{ failure() }} | ||
# with: | ||
# name: Regressions diff and postgresql log | ||
# path: | | ||
# src/pg_stat_monitor/regression.diffs | ||
# src/pg_stat_monitor/logfile | ||
# retention-days: 3 |
Oops, something went wrong.