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