From 26844e4bcb15bec62515ede4f3b5424f260658ae Mon Sep 17 00:00:00 2001 From: sadko4u Date: Sun, 13 Aug 2023 22:33:21 +0300 Subject: [PATCH] Added ASAN CI check --- .github/workflows/build.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 99f29067..3d753ecb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,6 +39,32 @@ jobs: echo "***** MEMCHECK $test *****"; \ valgrind ${{env.VALGRIND_ARGS}} .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \ done + arch_linux_asan: + runs-on: ubuntu-latest + container: + image: archlinux:latest + steps: + - name: Add debug repositories + run: | + 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 + printf 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch\n%s\n' "$(cat /etc/pacman.d/mirrorlist)" > /etc/pacman.d/mirrorlist + - name: Install dependencies + run: pacman --noconfirm -Syu base-devel glibc-debug git + - uses: actions/checkout@v3 + - name: Configure project + run: make config TEST=1 STRICT=1 DEBUG=1 ASAN=1 + - name: Fetch project dependencies + run: make fetch + - name: Build project + run: make VERBOSE=1 + - name: Run unit tests + run: .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 + - name: Run unit tests with memcheck + run: | + for test in $(.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --list --suppress); do \ + echo "***** MEMCHECK $test *****"; \ + .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \ + done arch_linux_debug: runs-on: ubuntu-latest container: