8000 Update github actions file (c-cpp.yml): · postgrespro/aqo@2db27e1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2db27e1

Browse files
committed
Update github actions file (c-cpp.yml):
1. Enable TAP-tests 2. Add some useful options for configure and build stages. 3. Parameterize github CI, just to reduce code duplication. Authors: m.polyakova (mostly), and a.lepikhov.
1 parent a922248 commit 2db27e1

File tree

2 files changed

+20
-4
lines changed

.github/workflows/c-cpp.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ on:
44
push:
55
branches: [ stable13 ]
66
pull_request:
7+
78
branches: [ stable13 ]
89

10+
env:
11+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
12+
913
jobs:
1014
build:
1115

@@ -14,14 +18,26 @@ jobs:
1418
steps:
1519
- name: pg
1620
run: |
17-
echo "Deploying to production server on branch $GITHUB_REF"
21+
sudo apt install libipc-run-perl
22+
echo "Deploying to production server on branch" $BRANCH_NAME
1823
git config --global user.email "ci@postgrespro.ru"
1924
git config --global user.name "CI PgPro admin"
25+
export COPT=-Werror
26+
export CONFIGURE_OPTS="--prefix=`pwd`/tmp_install --enable-tap-tests --enable-cassert"
2027
git clone https://github.com/postgres/postgres.git pg
2128
cd pg
29+
2230
git checkout REL_13_STABLE
23-
./configure --prefix=`pwd`/tmp_install
24-
git subtree add --prefix=contrib/aqo https://github.com/postgrespro/aqo.git $GITHUB_REF
31+
./configure $CONFIGURE_OPTS CFLAGS="-O3"
32+
git clone https://github.com/postgrespro/aqo.git contrib/aqo
33+
git -C contrib/aqo checkout $BRANCH_NAME
2534
patch -p1 --no-backup-if-mismatch < contrib/aqo/aqo_pg13.patch
2635
make -j4 > /dev/null && make -j4 -C contrib > /dev/null
2736
env CLIENTS=50 THREADS=50 make -C contrib/aqo check
37+
38+
echo "Use AQO with debug code included"
39+
git clean -fdx
40+
git -C contrib/aqo clean -fdx
41+
./configure $CON 8E24 FIGURE_OPTS CFLAGS="-DAQO_DEBUG_PRINT -O0"
42+
make -j4 > /dev/null && make -j4 -C contrib > /dev/null
43+
env CLIENTS=50 THREADS=50 make -C contrib/aqo check

t/001_pgbench.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@
335335
"SELECT sum(executions_with_aqo) FROM test.aqo_query_stat");
336336

337337
# 25 trans * 10 clients * 4 query classes = 1000 + unique SELECT to pgbench_branches
338-
is($res, 1001, 'Each query should be logged in LEARN mode');
338+
is($res, $CLIENTS*100+1, 'Each query should be logged in LEARN mode');
339339
$res = $node->safe_psql('postgres',
340340
"SELECT sum(executions_without_aqo) FROM test.aqo_query_stat");
341341
is($res, 0, 'AQO has learned on the queries - 2');

0 commit comments

Comments
 (0)
0