diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c517396..6582606 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,3 +58,42 @@ jobs: - name: print-test-log if: ${{ failure() }} run: cat _build/meson-logs/testlog.txt + + sanitizer: + runs-on: ubuntu-20.04 + steps: + - name: install-deps + run: | + sudo apt-get update + sudo apt-get -y install \ + gstreamer1.0-plugins-bad \ + gstreamer1.0-plugins-good \ + gstreamer1.0-tools \ + libgstreamer1.0-dev \ + libgtk-3-dev \ + meson + + - uses: actions/checkout@v2 + + - name: configure + run: | + meson _build \ + -Db_sanitize=address,undefined \ + -Dintrospection=false \ + -Dbocfel=false \ + -Dfrotz=false \ + -Dnitfol=false \ + -Dplayer=false + + - name: build + run: ASAN_OPTIONS=detect_leaks=0 ninja -C _build + + - name: test + run: | + ASAN_OPTIONS=fast_unwind_on_malloc=0 \ + LSAN_OPTIONS=suppressions=$(pwd)/tests/lsan.supp \ + xvfb-run -a meson test -C _build + + - name: print-test-log + if: ${{ failure() }} + run: cat _build/meson-logs/testlog.txt diff --git a/tests/lsan.supp b/tests/lsan.supp new file mode 100644 index 0000000..00f28f0 --- /dev/null +++ b/tests/lsan.supp @@ -0,0 +1,2 @@ +leak:g_quark_init +leak:libfontconfig.so