diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de2e2d4f96..64d3f60653 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -222,8 +222,15 @@ jobs: if: matrix.skip_testing != true && matrix.skip_gui != true && matrix.use_xvfb run: | if [ ${{ matrix.use_asan }} ]; then - export LSAN_OPTIONS=suppressions=$(pwd)/misc/suppressions/lsan - export ASAN_OPTIONS=fast_unwind_on_malloc=0 + # Leak suppression only works if we have debug symbols available, + # otherwise we disable it to avoid tons of reports about leaks in + # libfontconfig etc. + if [ -f wx_dbgsym_available ]; then + export LSAN_OPTIONS=suppressions=$(pwd)/misc/suppressions/lsan + else + ASAN_OPTIONS=detect_leaks=0 + fi + export ASAN_OPTIONS="$ASAN_OPTIONS fast_unwind_on_malloc=0" fi pushd tests xvfb-run -a -s '-screen 0 1600x1200x24' ./test_gui diff --git a/build/tools/before_install.sh b/build/tools/before_install.sh index e207adcc7c..b85a98fe2e 100755 --- a/build/tools/before_install.sh +++ b/build/tools/before_install.sh @@ -43,7 +43,7 @@ case $(uname -s) in wget -O - http://ddebs.ubuntu.com/dbgsym-release-key.asc | $SUDO apt-key add - # Install the symbols to allow LSAN suppression list to work. - pkg_install='libfontconfig1-dbgsym libglib2.0-0-dbgsym libgtk-3-0-dbgsym libatk-bridge2.0-0-dbgsym' + dbgsym_pkgs='libfontconfig1-dbgsym libglib2.0-0-dbgsym libgtk-3-0-dbgsym libatk-bridge2.0-0-dbgsym' fi run_apt update @@ -85,7 +85,18 @@ case $(uname -s) in fi done - run_apt install -y $pkg_install + if ! run_apt install -y $pkg_install $dbgsym_pkgs; then + if [ -z "$dbgsym_pkgs" ]; then + exit $? + fi + + # Retry without dbgsym packages that currently fail to install + # under Ubuntu Focal (20.04). + echo 'Installing with dbgsym packages failed, retrying without...' + run_apt install -y $pkg_install + else + touch wx_dbgsym_available + fi fi ;;