Skip to content

Commit b10c414

Browse files
committed
Added ASAN CI check
1 parent 32f82ba commit b10c414

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,33 @@ jobs:
3939
echo "***** MEMCHECK $test *****"; \
4040
valgrind ${{env.VALGRIND_ARGS}} .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \
4141
done
42-
arch_linux_debug:
42+
arch_linux_asan:
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[multilib-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
53+
- uses: actions/checkout@v3
54+
- name: Configure project
55+
run: make config TEST=1 STRICT=1 DEBUG=1 ASAN=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+
.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \
67+
done
68+
arch_linux_valgrind:
4369
runs-on: ubuntu-latest
4470
container:
4571
image: archlinux:latest

0 commit comments

Comments
 (0)