From f68a625b1c6252dfdcb89ba847b5592a5b3e0f03 Mon Sep 17 00:00:00 2001 From: Andy Alt Date: Sun, 17 Mar 2024 20:00:18 -0500 Subject: [PATCH] CI: Minor update, workaround actions/runner-images#9491 (#28) * Fail-fast false, add gcc-9 and clang-13 * meson_options.txt: Add single quotes around boolean values * Modify concurrency These weird issues are probably related to https://github.com/actions/runner-images/issues/9524 * Configure meson with sanitize This was removed from the default options in https://github.com/andy5995/canfigger/commit/abb9da222a29bb43a7c7bd543615c4205d8f95b6 --- .cirrus.yml | 6 +++--- .github/workflows/c-cpp.yml | 21 ++++++++++++++++----- meson_options.txt | 4 ++-- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index f1675d5..f1d799d 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -18,7 +18,7 @@ freebsd13_task: - pkg install -y meson ninja setup_script: - - meson setup _build + - meson setup _build -Db_sanitize=address,undefined -Db_lundef=false build_script: - cd _build && ninja -v test_script: @@ -35,7 +35,7 @@ freebsd14_task: - pkg install -y meson ninja setup_script: - - meson setup _build + - meson setup _build -Db_sanitize=address,undefined -Db_lundef=false build_script: - cd _build && ninja -v test_script: @@ -50,7 +50,7 @@ macos_task: - brew update - brew install meson ninja setup_script: - - meson setup _build + - meson setup _build -Db_sanitize=address,undefined -Db_lundef=false build_script: - cd _build && ninja test_script: diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index fe38c76..6944ea6 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -1,6 +1,6 @@ name: C/C++ CI concurrency: - group: build-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: true on: @@ -24,20 +24,31 @@ on: jobs: linux: strategy: + fail-fast: false matrix: - cc: [gcc, clang] + cc: [gcc-9, gcc-11, clang-13, clang-14] runs-on: ubuntu-latest env: CC: ${{ matrix.cc }} steps: - uses: actions/checkout@v4 + - 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: Install dependencies - run: sudo apt update && sudo apt-get install -y meson $CC + run: | + # sudo apt remove -y firefox + sudo apt update + # sudo apt upgrade -y + sudo apt install -y meson ninja-build $CC - name: Build run: | - meson setup _build + meson setup _build -Db_sanitize=address,undefined -Db_lundef=false cd _build ninja - name: Test @@ -49,7 +60,7 @@ jobs: - uses: actions/checkout@v4 - run: brew install meson - run: | - meson setup _build + meson setup _build -Db_sanitize=address,undefined -Db_lundef=false cd _build ninja meson test -v diff --git a/meson_options.txt b/meson_options.txt index 01033ed..defc487 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -8,13 +8,13 @@ option( option( 'build_tests', type : 'boolean', - value : true, + value : 'true', description : 'Build tests' ) option( 'build_examples', type : 'boolean', - value : true, + value : 'true', description : 'Build examples' )