Skip to content

Commit 7199c25

Browse files
committed
Added smoke tests
1 parent ecc6147 commit 7199c25

File tree

3 files changed

+160
-0
lines changed

3 files changed

+160
-0
lines changed

.github/FUNDING.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
liberapay: sadko4u
2+
patreon: sadko4u
3+
custom:
4+
- https://www.blockchain.com/btc/address/15X3AfDRF3EshSLBoK8UfHAsFr2TQsH8pk
5+
- https://etherscan.io/address/0x079b24da78d78302cd3cfbb80c728cd554606cc6
6+
- https://www.bountysource.com/teams/lsp-plugins
7+
- https://paypal.me/sadko4u

.github/workflows/build.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
3+
name: Build on various Operating Systems
4+
5+
on:
6+
push:
7+
branches: [devel, master]
8+
pull_request:
9+
branches: [devel, master]
10+
11+
env:
12+
ARTIFACT: lsp-r3d-base-lib
13+
VALGRIND_ARGS: --error-exitcode=255 --leak-check=full --track-origins=yes --keep-debuginfo=yes --suppressions=.github/workflows/valgrind.supp
14+
15+
jobs:
16+
arch_linux:
17+
runs-on: ubuntu-latest
18+
container:
19+
image: archlinux:latest
20+
steps:
21+
- name: Add debug repositories
22+
run: |
23+
printf "[core-debug]\nInclude = /etc/pacman.d/mirrorlist\n[extra-debug]\nInclude = /etc/pacman.d/mirrorlist\n[community-debug]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf
24+
printf 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch\n%s\n' "$(cat /etc/pacman.d/mirrorlist)" > /etc/pacman.d/mirrorlist
25+
- name: Install dependencies
26+
run: pacman --noconfirm -Syu base-devel glibc-debug git valgrind
27+
- uses: actions/checkout@v2
28+
- name: Configure project
29+
run: make config TEST=1
30+
- name: Fetch project dependencies
31+
run: make fetch
32+
- name: Build project
33+
run: make VERBOSE=1
34+
- name: Run unit tests
35+
run: .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1
36+
- name: Run unit tests with memcheck
37+
run: |
38+
for test in $(.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --list --suppress); do \
39+
echo "***** MEMCHECK $test *****"; \
40+
valgrind ${{env.VALGRIND_ARGS}} .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \
41+
done
42+
arch_linux_debug:
43+
runs-on: ubuntu-latest
44+
container:
45+
image: archlinux:latest
46+
steps:
47+
- name: Add debug repositories
48+
run: |
49+
printf "[core-debug]\nInclude = /etc/pacman.d/mirrorlist\n[extra-debug]\nInclude = /etc/pacman.d/mirrorlist\n[community-debug]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf
50+
printf 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch\n%s\n' "$(cat /etc/pacman.d/mirrorlist)" > /etc/pacman.d/mirrorlist
51+
- name: Install dependencies
52+
run: pacman --noconfirm -Syu base-devel glibc-debug git valgrind
53+
- uses: actions/checkout@v2
54+
- name: Configure project
55+
run: make config TEST=1 DEBUG=1
56+
- name: Fetch project dependencies
57+
run: make fetch
58+
- name: Build project
59+
run: make VERBOSE=1
60+
- name: Run unit tests
61+
run: .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1
62+
- name: Run unit tests with memcheck
63+
run: |
64+
for test in $(.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --list --suppress); do \
65+
echo "***** MEMCHECK $test *****"; \
66+
valgrind ${{env.VALGRIND_ARGS}} .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \
67+
done
68+
opensuse_leap:
69+
runs-on: ubuntu-latest
70+
container:
71+
image: opensuse/leap:latest
72+
steps:
73+
- name: Install dependencies
74+
run: zypper --non-interactive --no-gpg-checks in tar gzip git make valgrind gcc gcc-c++
75+
- uses: actions/checkout@v2
76+
- name: Configure project
77+
run: make config TEST=1
78+
- name: Fetch project dependencies
79+
run: make fetch
80+
- name: Build project
81+
run: make VERBOSE=1
82+
- name: Run unit tests
83+
run: .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1
84+
- name: Run unit tests with memcheck
85+
run: |
86+
for test in $(.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --list --suppress); do \
87+
echo "***** MEMCHECK $test *****"; \
88+
valgrind ${{env.VALGRIND_ARGS}} .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \
89+
done
90+
debian_stable:
91+
runs-on: ubuntu-latest
92+
container:
93+
image: debian:stable
94+
steps:
95+
- name: Update repositories
96+
run: apt-get update
97+
- name: Install dependencies
98+
run: apt-get -y install git make pkg-config valgrind gcc g++
99+
- uses: actions/checkout@v2
100+
- name: Configure project
101+
run: make config TEST=1
102+
- name: Fetch project dependencies
103+
run: make fetch
104+
- name: Build project
105+
run: make VERBOSE=1
106+
- name: Run unit tests
107+
run: .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1
108+
- name: Run unit tests with memcheck
109+
run: |
110+
for test in $(.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --list --suppress); do \
111+
echo "***** MEMCHECK $test *****"; \
112+
valgrind ${{env.VALGRIND_ARGS}} .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \
113+
done

.github/workflows/valgrind.supp

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
libdl is full of leaks
3+
Memcheck:Leak
4+
...
5+
fun:_dl_open
6+
...
7+
}
8+
{
9+
libdl is full of leaks
10+
Memcheck:Leak
11+
...
12+
fun:_dl_close
13+
...
14+
}
15+
{
16+
libdl is full of leaks
17+
Memcheck:Leak
18+
...
19+
fun:_dl_init
20+
}
21+
{
22+
libdl is full of leaks
23+
Memcheck:Leak
24+
...
25+
fun:_dl_allocate_tls
26+
...
27+
}
28+
{
29+
libdl is full of leaks
30+
Memcheck:Leak
31+
...
32+
fun:call_init.part.0
33+
}
34+
{
35+
ignore XInitThreads
36+
Memcheck:Leak
37+
...
38+
fun:XInitThreads
39+
...
40+
}

0 commit comments

Comments
 (0)