1
- name : ' C/C++ CI for the stable13 '
1
+ name : ' AQO basic CI '
2
2
3
3
on :
4
4
push :
5
- branches : [ stable13 ]
6
5
pull_request :
7
- branches : [ stable13 ]
8
6
9
7
env :
10
8
BRANCH_NAME : ${{ github.head_ref || github.ref_name }}
@@ -15,45 +13,70 @@ jobs:
15
13
runs-on : ubuntu-latest
16
14
17
15
steps :
18
- - name : pg
16
+ - uses : actions/checkout@v3
17
+ - name : " Define PostreSQL major version"
19
18
run : |
20
- sudo apt install libipc-run-perl
19
+ echo "$(ls -la)"
20
+ patch_name=$(ls aqo_*.patch|tail -1)
21
+ echo "CORE_PATCH_NAME=$patch_name" >> $GITHUB_ENV
22
+
23
+ # we can get number, otherwise set up master
24
+ vers_number=$(echo "$patch_name"|tr -d -c 0-9)
25
+ echo "PG_MAJOR_VERSION=$vers_number" >> $GITHUB_ENV
26
+
27
+ branch_name="REL_${vers_number}_STABLE"
28
+ echo "PG_BRANCH=$branch_name" >> $GITHUB_ENV
29
+
30
+ echo "COPT=-Werror" >> $GITHUB_ENV
31
+ echo "CONFIGURE_OPTS=--prefix=`pwd`/tmp_install --enable-tap-tests --enable-cassert" >> $GITHUB_ENV
32
+
33
+ - name : " Set master branch name, if needed"
34
+ if : env.PG_MAJOR_VERSION == ''
35
+ run : |
36
+ branch_name="master"
37
+ echo "PG_BRANCH=$branch_name" >> $GITHUB_ENV
21
38
22
- echo "Deploying to production server on branch" $BRANCH_NAME
39
+ - name : " Environment (debug output)"
40
+ if : ${{ always() }}
41
+ run : |
42
+ echo "Use PostgreSQL branch $PG_BRANCH (patch: $CORE_PATCH_NAME)"
43
+ echo "COPT: $COPT"
44
+ echo "CONFIGURE_OPTS: $CONFIGURE_OPTS"
45
+ echo "Deploying to production server on branch" $BRANCH_NAME "(PG $PG_BRANCH)"
23
46
git config --global user.email "[email protected] "
24
47
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"
27
- git clone https://github.com/postgres/postgres.git pg
28
- cd pg
29
-
30
- git checkout REL_13_STABLE
31
- git clone https://github.com/postgrespro/aqo.git contrib/aqo
32
- git -C contrib/aqo checkout $BRANCH_NAME
33
- patch -p1 --no-backup-if-mismatch < contrib/aqo/aqo_pg13.patch
34
- ./configure $CONFIGURE_OPTS CFLAGS="-O2"
48
+
49
+ - name : " Prepare PG directory"
50
+ run : |
51
+ git clone -b $PG_BRANCH --depth=1 --single-branch https://github.com/postgres/postgres.git $GITHUB_WORKSPACE/../pg
52
+ cd $GITHUB_WORKSPACE/../pg
53
+ ls -la
54
+ cp -r ../aqo contrib/aqo
55
+ patch -p1 --no-backup-if-mismatch < contrib/aqo/$CORE_PATCH_NAME
56
+
57
+ - name : " make check"
58
+ run : |
59
+ sudo apt install libipc-run-perl
60
+
61
+ cd $GITHUB_WORKSPACE/../pg
62
+ ./configure $CONFIGURE_OPTS CFLAGS="-O2" > /dev/null
35
63
make -j4 > /dev/null && make -j4 -C contrib > /dev/null
36
64
env CLIENTS=50 THREADS=50 make -C contrib/aqo check
37
65
38
66
echo "Use AQO with debug code included"
39
67
git clean -fdx
40
68
git -C contrib/aqo clean -fdx
41
- ./configure $CONFIGURE_OPTS CFLAGS="-DAQO_DEBUG_PRINT -O0"
69
+ ./configure $CONFIGURE_OPTS CFLAGS="-DAQO_DEBUG_PRINT -O0" > /dev/null
42
70
make -j4 > /dev/null && make -j4 -C contrib > /dev/null
43
71
env CLIENTS=50 THREADS=50 make -C contrib/aqo check
44
- - name : Archive regression.diffs
45
- if : ${{ always() }}
46
- uses : actions/upload-artifact@v3
47
- with :
48
- name : regression_diffs
49
- path : /home/runner/work/aqo/aqo/pg/contrib/aqo/regression.diffs
50
- retention-days : 1
51
- - name : Archive TAP tests log files
72
+
73
+ - name : Archive artifacts
52
74
if : ${{ always() }}
53
75
uses : actions/upload-artifact@v3
54
76
with :
55
- name : tap_logs
77
+ name : make_check_logs
56
78
path : |
57
- log
58
- retention-days : 1
59
-
79
+ /home/runner/work/aqo/pg/contrib/aqo/regression.diffs
80
+ /home/runner/work/aqo/pg/contrib/aqo/log
81
+ /home/runner/work/aqo/pg/contrib/aqo/tmp_check/log
82
+ retention-days : 7
0 commit comments