diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 717cbf13..2c0f6e73 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -222,13 +222,18 @@ jobs: fail-fast: false matrix: sanitizer: [undefined, address, thread] - compiler: [clang] + compiler: [clang, gcc] include: - compiler: clang cc: "clang" cxx: "clang++" install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 18 toolchain_root: "/usr/lib/llvm-18" + - compiler: gcc + cc: "gcc-13" + cxx: "g++-13" + install: sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt-get install -y gcc-13 g++-13 + toolchain_root: "/usr" steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 @@ -265,6 +270,13 @@ jobs: path: ~/cpm-cache key: ${{runner.os}}-${{env.cache-name}}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} + # https://github.com/actions/runner-images/issues/9524 + - name: Fix kernel mmap rnd bits + # Asan in llvm 14 provided in ubuntu 22.04 is incompatible with + # high-entropy ASLR in much newer kernels that GitHub runners are + # using leading to random crashes: https://reviews.llvm.org/D148280 + run: sudo sysctl vm.mmap_rnd_bits=28 + - name: Build Unit Tests run: cmake --build ${{github.workspace}}/build -t unit_tests @@ -274,7 +286,9 @@ jobs: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Install build tools - run: sudo apt update && sudo apt install -y gcc-${{env.DEFAULT_GCC_VERSION}} g++-${{env.DEFAULT_GCC_VERSION}} ninja-build valgrind + run: | + sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test + sudo apt update && sudo apt-get install -y gcc-${{env.DEFAULT_GCC_VERSION}} g++-${{env.DEFAULT_GCC_VERSION}} ninja-build valgrind - name: Restore CPM cache env: