Skip to content

Commit a93e07a

Browse files
authored
Merge pull request #39 from SparkiDev/rsyslog_workflow
Add rsyslog workflow
2 parents dc15ebf + edde577 commit a93e07a

1 file changed

Lines changed: 125 additions & 0 deletions

File tree

.github/workflows/rsyslog.yml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
name: rsyslog Test
2+
3+
# START OF COMMON SECTION
4+
on:
5+
push:
6+
branches: [ 'master', 'main', 'release/**' ]
7+
pull_request:
8+
branches: [ '*' ]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
# END OF COMMON SECTION
14+
15+
jobs:
16+
build_gnutls:
17+
name: Build wolfSSL, GnuTLS and provider
18+
timeout-minutes: 40
19+
strategy:
20+
matrix:
21+
os: [ ubuntu-latest ]
22+
rsyslog_ref: [ 'master', 'v8.2302.0' ]
23+
fail-fast: false
24+
runs-on: ${{ matrix.os }}
25+
26+
steps:
27+
- name: Checkout gnutls-wolfssl repository
28+
uses: actions/checkout@v4
29+
30+
- name: Ensure make available (Ubuntu only)
31+
if: matrix.os == 'ubuntu-latest'
32+
run: |
33+
sudo apt-get update
34+
sudo apt-get install -y build-essential
35+
36+
- name: Install GnuTLS dependencies (Ubuntu only)
37+
if: matrix.os == 'ubuntu-latest'
38+
run: |
39+
sudo apt-get install -y gnulib autopoint gperf gtk-doc-tools nettle-dev clang libtasn1-bin libtasn1-6-dev libunistring-dev libp11-kit-dev libunbound-dev
40+
41+
- name: Install rsyslog dependencies (Ubuntu only)
42+
if: matrix.os == 'ubuntu-latest'
43+
run: |
44+
sudo apt-get install -y build-essential pkg-config libestr-dev libfastjson-dev zlib1g-dev uuid-dev libhiredis-dev uuid-dev flex bison
45+
sudo apt-get install -y libdbi-dev libmysqlclient-dev postgresql-client libpq-dev libnet-dev librdkafka-dev libpcre3-dev libtokyocabinet-dev libglib2.0-dev libmongo-client-dev
46+
sudo apt-get install -y libcurl4-gnutls-dev
47+
sudo pip install docutils
48+
49+
- name: Install build and test dependencies (Ubuntu only)
50+
if: matrix.os == 'ubuntu-latest'
51+
run: |
52+
sudo apt-get install -y autoconf libtool valgrind
53+
54+
- name: Build GnuTLS with wolfSSL provider using setup.sh script
55+
run: |
56+
echo "Running setup.sh..."
57+
BUILD_RESULT=0
58+
GNUTLS_INSTALL=/opt/gnutls WOLFSSL_INSTALL=/opt/wolfssl ./setup.sh
59+
if [ $? -ne 0 ]; then
60+
echo "Build failed"
61+
exit 1
62+
fi
63+
64+
- name: Check setup.sh output directories
65+
run: |
66+
echo "Check for wolfSSL installation..."
67+
if [ ! -d /opt/wolfssl ]; then
68+
echo "/opt/wolfssl not found after setup"
69+
exit 1
70+
fi
71+
echo "Check for GnuTLS installation..."
72+
if [ ! -d /opt/gnutls ]; then
73+
echo "/opt/gnutls not found after setup"
74+
exit 1
75+
fi
76+
echo "Check for wrapper installation..."
77+
if [ ! -d /opt/wolfssl-gnutls-wrapper/lib ]; then
78+
echo "/opt/wolfssl-gnutls-wrapper/lib not found after setup"
79+
exit 1
80+
fi
81+
82+
- name: Build rsyslog at ${{ matrix.rsyslog_ref }}
83+
uses: actions/checkout@v4
84+
with:
85+
repository: rsyslog/rsyslog
86+
ref: ${{ matrix.rsyslog_ref }}
87+
path: rsyslog
88+
89+
- name: Configure rsyslog
90+
working-directory: rsyslog
91+
run: |
92+
./autogen.sh --enable-gnutls --disable-libgcrypt --enable-testbench --enable-imdiag --enable-omstdout PKG_CONFIG_PATH=/opt/gnutls/lib/pkgconfig
93+
94+
- name: Make rsyslog
95+
working-directory: rsyslog
96+
run: |
97+
make -j $(nproc)
98+
99+
- name: Test rsyslog
100+
working-directory: rsyslog
101+
run: |
102+
cat <<EOF >> tests/valgrind.supp
103+
{
104+
pselect_cancel
105+
Memcheck:Param
106+
pselect6(sig)
107+
fun:__syscall_cancel_arch
108+
fun:__internal_syscall_cancel
109+
fun:__syscall_cancel
110+
fun:pselect64_syscall
111+
fun:pselect
112+
fun:wait_timeout
113+
fun:mainloop
114+
fun:main
115+
}
116+
EOF
117+
export VALGRINDFLAGS=--suppressions=valgrind.supp
118+
export LD_LIBRARY_PATH=/opt/gnutls/lib:/opt/wolfssl/lib:/opt/wolfssl-gnutls-wrapper/lib
119+
make check 2>&1 | tee test.log
120+
awk '/^FAIL:/ {gsub(/\.sh$/, ".log", $2); print "==== " $2 " ===="; system("cat tests/" $2 "\n")}' test.log
121+
echo "Check for failures but exclude: rscript_http_request-vg.sh"
122+
EC=0
123+
grep -v rscript_http_request-vg.sh test.log | grep '^FAIL:' && EC=1
124+
exit $EC
125+

0 commit comments

Comments
 (0)