-
Notifications
You must be signed in to change notification settings - Fork 977
83 lines (75 loc) · 2.98 KB
/
ci-maketest.yml
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
name: CI-maketest
on:
push:
branches: [ "v2.x" ]
paths-ignore:
- '.github/**'
- '**.md'
pull_request:
branches: [ "v2.x" ]
paths-ignore:
- '.github/**'
- '**.md'
# schedule:
# - cron: '15 13 * * 3'
workflow_dispatch:
jobs:
builds:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
repository: 'sysown/proxysql'
# ref: 'v2.x'
ref: ${{ github.head_ref }}
fetch-depth: 0
path: 'proxysql'
- name: hot-fixes
run: |
sed -i 's/-I$(CURL_IDIR) -I$(IDIR)/-I$(CURL_IDIR) -I${SQLITE3_DIR} -I$(IDIR)/' proxysql/test/tap/tests/Makefile
#sed -i '/#include "SpookyV2.h"/d' proxysql/test/tap/tests/aurora.cpp
#sed -i '/#include "SpookyV2.h"/d' proxysql/test/tap/tap/SQLite3_Server.cpp
#sed -i '/LDIRS=/a LDIRS+= -L$(DEPS_PATH)/coredumper/coredumper/src' proxysql/test/tap/tests/Makefile
#sed -i '/STATIC_LIBS=/a STATIC_LIBS+= $(DEPS_PATH)/coredumper/coredumper/src/libcoredumper.a' proxysql/test/tap/tests/Makefile
#sed -i '/#include "SpookyV2.h"/d' proxysql/test/tap/tests/galera_1_timeout_count.cpp
#sed -i 's/dump_table_mysql_servers()/dump_table_mysql("mysql_servers")/' proxysql/test/tap/tests/galera_1_timeout_count.cpp
#sed -i '/#include "SpookyV2.h"/d' proxysql/test/tap/tests/galera_2_timeout_no_count.cpp
#sed -i 's/dump_table_mysql_servers()/dump_table_mysql("mysql_servers")/' proxysql/test/tap/tests/galera_2_timeout_no_count.cpp
- name: Make-test
run: |
cd proxysql/
#git fetch --tags --force
GIT_VERSION=$(git describe --long --abbrev=7)
echo "GIT_VERSION=${GIT_VERSION}"
echo "GIT_VERSION=${GIT_VERSION}" >> $GITHUB_ENV
TARGETS=(testaurora testgalera testgrouprep testreadonly testreplicationlag testall)
for TARGET in ${TARGETS[@]}; do
echo "TARGET: ${TARGET}"
sed -i "/command/c \ command: bash -l -c 'cd /opt/proxysql && make cleanall && make -j$(nproc) ${TARGET}'" docker-compose.yml
make ubuntu22-dbg | tee ../build-$TARGET.log
done
- name: Check build
run: |
set +e
echo "================================================================================="
RCS=0
for LOG in $(ls -1 build-*.log); do
grep 'exited with code 0' $LOG >/dev/null
RC=$?
if [[ $RC -eq 0 ]]; then
echo "SUMMARY: PASS ${LOG} $RC"
else
echo "SUMMARY: FAIL ${LOG} $RC"
fi
RCS=$(( $RCS + $RC ))
done
echo "================================================================================="
exit $RCS
- name: Archive artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: ci-maketests-${{ env.GIT_VERSION }}-run#${{ github.run_number }}
path: |
./build-*.log