From 3b46f7311cffd4f1eac2cd82f4488197c06f610f Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Thu, 14 Mar 2024 21:45:00 +0100 Subject: [PATCH] workflows: Fix sanitizers on Ubuntu 22.04 --- .github/workflows/ci.yml | 9 +++++++++ scripts/ci/build.sh | 3 +++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 690abd56e..6c522d5d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -256,6 +256,11 @@ jobs: with: persist-credentials: false show-progress: false + - name: Fix mmap_rnd_bits + if: ${{ matrix.os.dist == 'ubuntu-22.04' }} + # FIXME https://github.com/actions/runner-images/issues/9491 + run: | + sudo sysctl vm.mmap_rnd_bits=28 - name: Clean up system packages # We need to remove glib-network, otherwise libproxy might cause crashes. run: | @@ -395,6 +400,10 @@ jobs: with: persist-credentials: false show-progress: false + - name: Fix mmap_rnd_bits + # FIXME https://github.com/actions/runner-images/issues/9491 + run: | + sudo sysctl vm.mmap_rnd_bits=28 - name: Cache dependencies id: cache uses: actions/cache@v4 diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh index 179d8685e..0639f2b1a 100755 --- a/scripts/ci/build.sh +++ b/scripts/ci/build.sh @@ -32,6 +32,7 @@ fi case "${MODE}" in release) + # shellcheck disable=SC2086 meson setup --prefix="${GITHUB_WORKSPACE}/julea-install" --buildtype=release --werror ${GDBM_PREFIX} bld ninja -C bld ninja -C bld install @@ -42,10 +43,12 @@ case "${MODE}" in then CLANG_LUNDEF='-Db_lundef=false' fi + # shellcheck disable=SC2086 meson setup -Db_sanitize=address,undefined ${CLANG_LUNDEF} ${GDBM_PREFIX} bld ninja -C bld ;; coverage) + # shellcheck disable=SC2086 meson setup -Db_coverage=true -Db_sanitize=address,undefined ${GDBM_PREFIX} bld ninja -C bld ;;