forked from timescale/timescaledb
-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (104 loc) · 3.99 KB
/
linux-32bit-build-and-test.yaml
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Regression Linux i386
on:
schedule:
# run daily 20:00 on master branch
- cron: '0 20 * * *'
push:
branches:
- prerelease_test
pull_request:
jobs:
regress_linux_32bit:
name: PG${{ matrix.pg }} ${{ matrix.build_type }} linux-i386
runs-on: ubuntu-latest
container:
image: i386/debian:buster-slim
options: --privileged --ulimit core=-1
env:
DEBIAN_FRONTEND: noninteractive
strategy:
fail-fast: false
matrix:
pg: [ "12.7", "13.3" ]
build_type: [ Debug ]
include:
- pg: 12.7
ignores: append-12 chunk_adaptive continuous_aggs_bgw_drop_chunks remote_txn transparent_decompression-12 plan_skip_scan-12
pg_major: 12
- pg: 13.3
ignores: append-13 chunk_adaptive remote_txn transparent_decompression-13 vacuum_parallel plan_skip_scan-13
pg_major: 13
steps:
- name: Install build dependencies
run: |
echo '/tmp/core.%h.%e.%t' > /proc/sys/kernel/core_pattern
apt-get update
apt-get install -y gnupg postgresql-common
yes | /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
apt-get install -y gcc make cmake libssl-dev libkrb5-dev libipc-run-perl libtest-most-perl sudo gdb git wget
apt-get install -y postgresql-${{ matrix.pg_major }} postgresql-server-dev-${{ matrix.pg_major }}
- name: Build pg_isolation_regress
run: |
wget -q -O postgresql.tar.bz2 https://ftp.postgresql.org/pub/source/v${{ matrix.pg }}/postgresql-${{ matrix.pg }}.tar.bz2
mkdir -p ~/postgresql
tar --extract --file postgresql.tar.bz2 --directory ~/postgresql --strip-components 1
cd ~/postgresql
./configure --prefix=/usr/lib/postgresql/${{ matrix.pg_major }} --enable-debug --enable-cassert --with-openssl --without-readline --without-zlib
make -C src/test/isolation
chown -R postgres:postgres ~/postgresql
- name: Checkout TimescaleDB
uses: actions/checkout@v1
- name: Build TimescaleDB
run: |
./bootstrap -DCMAKE_BUILD_TYPE="${{ matrix.build_type }}" -DPG_SOURCE_DIR=~/postgresql
make -C build install
chown -R postgres:postgres .
- name: make installcheck
id: installcheck
shell: bash
run: |
set -o pipefail
export LANG=C.UTF-8
sudo -u postgres make -k -C build installcheck IGNORES="${{ matrix.ignores }}" | tee installcheck.log
- name: Show regression diffs
if: always()
id: collectlogs
shell: bash
run: |
find . -name regression.diffs -exec cat {} + > regression.log
find . -name postmaster.log -exec cat {} + > postgres.log
grep -e 'FAILED' -e 'failed (ignored)' installcheck.log || true
if [[ -s regression.log ]]; then echo "::set-output name=regression_diff::true"; fi
cat regression.log
- name: Coredumps
if: always()
id: coredumps
shell: bash
run: |
if compgen -G "/tmp/core*" > /dev/null; then
apt-get install postgresql-${{ matrix.pg_major }}-dbgsym >/dev/null
for file in /tmp/core*
do
gdb /usr/lib/postgresql/${{ matrix.pg_major }}/bin/postgres -c $file <<<'bt full' | tee -a stacktraces.log
done
echo "::set-output name=coredumps::true"
exit 1
fi
- name: Save regression diffs
if: always() && steps.collectlogs.outputs.regression_diff == 'true'
uses: actions/upload-artifact@v1
with:
name: Regression diff linux-i386 PG${{ matrix.pg }}
path: regression.log
- name: Save stacktraces
if: always() && steps.coredumps.outputs.coredumps == 'true'
uses: actions/upload-artifact@v1
with:
name: Stacktraces linux-i386 PG${{ matrix.pg }}
path: stacktraces.log
- name: Save postmaster.log
if: always()
uses: actions/upload-artifact@v1
with:
name: PostgreSQL log linux-i386 PG${{ matrix.pg }}
path: postgres.log