From c5085ffc414caaba7a10e029039ed46f6972d610 Mon Sep 17 00:00:00 2001 From: firewave Date: Mon, 30 Sep 2024 17:00:07 +0200 Subject: [PATCH 1/4] added `ubuntu-24.04` to CI and made it the primary platform --- .github/workflows/CI-unixish.yml | 16 ++++++++-------- .github/workflows/clang-tidy.yml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/CI-unixish.yml b/.github/workflows/CI-unixish.yml index 64fc6ca5..f492b5dd 100644 --- a/.github/workflows/CI-unixish.yml +++ b/.github/workflows/CI-unixish.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: compiler: [clang++, g++] - os: [ubuntu-20.04, ubuntu-22.04, macos-13, macos-14] + os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, macos-13, macos-14] fail-fast: false runs-on: ${{ matrix.os }} @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v4 - name: Install missing software on ubuntu - if: matrix.os == 'ubuntu-22.04' + if: matrix.os == 'ubuntu-24.04' run: | sudo apt-get update sudo apt-get install valgrind @@ -49,7 +49,7 @@ jobs: ./cmake.output/testrunner - name: Run valgrind - if: matrix.os == 'ubuntu-22.04' + if: matrix.os == 'ubuntu-24.04' run: | make clean # this valgrind version doesn't support DWARF 5 yet @@ -58,20 +58,20 @@ jobs: valgrind --leak-check=full --num-callers=50 --show-reachable=yes --track-origins=yes --gen-suppressions=all --error-exitcode=42 ./simplecpp simplecpp.cpp -e - name: Run with libstdc++ debug mode - if: matrix.os == 'ubuntu-22.04' && matrix.compiler == 'g++' + if: matrix.os == 'ubuntu-24.04' && matrix.compiler == 'g++' run: | make clean make -j$(nproc) test selfcheck CXXFLAGS="-g3 -D_GLIBCXX_DEBUG" # TODO: change it to -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG when the compiler is at least Clang 18 - name: Run with libc++ debug mode - if: matrix.os == 'ubuntu-22.04' && matrix.compiler == 'clang++' + if: matrix.os == 'ubuntu-24.04' && matrix.compiler == 'clang++' run: | make clean make -j$(nproc) test selfcheck CXXFLAGS="-stdlib=libc++ -g3 -D_LIBCPP_ENABLE_ASSERTIONS=1" LDFLAGS="-lc++" - name: Run AddressSanitizer - if: matrix.os == 'ubuntu-22.04' + if: matrix.os == 'ubuntu-24.04' run: | make clean make -j$(nproc) test selfcheck CXXFLAGS="-O2 -g3 -fsanitize=address" LDFLAGS="-fsanitize=address" @@ -79,14 +79,14 @@ jobs: ASAN_OPTIONS: detect_stack_use_after_return=1 - name: Run UndefinedBehaviorSanitizer - if: matrix.os == 'ubuntu-22.04' + if: matrix.os == 'ubuntu-24.04' run: | make clean make -j$(nproc) test selfcheck CXXFLAGS="-O2 -g3 -fsanitize=undefined -fno-sanitize=signed-integer-overflow" LDFLAGS="-fsanitize=undefined -fno-sanitize=signed-integer-overflow" # TODO: requires instrumented libc++ - name: Run MemorySanitizer - if: false && matrix.os == 'ubuntu-22.04' && matrix.compiler == 'clang++' + if: false && matrix.os == 'ubuntu-24.04' && matrix.compiler == 'clang++' run: | make clean make -j$(nproc) test selfcheck CXXFLAGS="-O2 -g3 -stdlib=libc++ -fsanitize=memory" LDFLAGS="-lc++ -fsanitize=memory" diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml index 2c67e10e..22602075 100644 --- a/.github/workflows/clang-tidy.yml +++ b/.github/workflows/clang-tidy.yml @@ -7,7 +7,7 @@ on: [push, pull_request] jobs: build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 From 74c6696769b2f206e609de71e400d78d16bb1e22 Mon Sep 17 00:00:00 2001 From: firewave Date: Mon, 30 Sep 2024 17:01:00 +0200 Subject: [PATCH 2/4] CI-unixish.yml: added missing dependency for Clang hardening mode --- .github/workflows/CI-unixish.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/CI-unixish.yml b/.github/workflows/CI-unixish.yml index f492b5dd..4a38b1fc 100644 --- a/.github/workflows/CI-unixish.yml +++ b/.github/workflows/CI-unixish.yml @@ -24,6 +24,12 @@ jobs: run: | sudo apt-get update sudo apt-get install valgrind + + - name: Install missing software on ubuntu (clang++) + if: matrix.os == 'ubuntu-24.04' && matrix.compiler == 'clang++' + run: | + sudo apt-get update + sudo apt-get install libc++-18-dev - name: make simplecpp run: make -j$(nproc) From b40f3c53cc8f5bbb08e1bc35e407199af929719c Mon Sep 17 00:00:00 2001 From: firewave Date: Mon, 30 Sep 2024 15:56:03 +0200 Subject: [PATCH 3/4] CI-unixish.yml: removed DWARF workaround for valgrind --- .github/workflows/CI-unixish.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/CI-unixish.yml b/.github/workflows/CI-unixish.yml index 4a38b1fc..8c280493 100644 --- a/.github/workflows/CI-unixish.yml +++ b/.github/workflows/CI-unixish.yml @@ -58,8 +58,7 @@ jobs: if: matrix.os == 'ubuntu-24.04' run: | make clean - # this valgrind version doesn't support DWARF 5 yet - make -j$(nproc) CXXFLAGS="-gdwarf-4" + make -j$(nproc) valgrind --leak-check=full --num-callers=50 --show-reachable=yes --track-origins=yes --gen-suppressions=all --error-exitcode=42 ./testrunner valgrind --leak-check=full --num-callers=50 --show-reachable=yes --track-origins=yes --gen-suppressions=all --error-exitcode=42 ./simplecpp simplecpp.cpp -e From 71abff9169cbf2b4b1a310428b5b13e96b3147bd Mon Sep 17 00:00:00 2001 From: firewave Date: Mon, 30 Sep 2024 16:04:56 +0200 Subject: [PATCH 4/4] CI-unixish.yml: use hardening mode for libc++ --- .github/workflows/CI-unixish.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI-unixish.yml b/.github/workflows/CI-unixish.yml index 8c280493..050e1d74 100644 --- a/.github/workflows/CI-unixish.yml +++ b/.github/workflows/CI-unixish.yml @@ -68,12 +68,11 @@ jobs: make clean make -j$(nproc) test selfcheck CXXFLAGS="-g3 -D_GLIBCXX_DEBUG" - # TODO: change it to -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG when the compiler is at least Clang 18 - - name: Run with libc++ debug mode + - name: Run with libc++ hardening mode if: matrix.os == 'ubuntu-24.04' && matrix.compiler == 'clang++' run: | make clean - make -j$(nproc) test selfcheck CXXFLAGS="-stdlib=libc++ -g3 -D_LIBCPP_ENABLE_ASSERTIONS=1" LDFLAGS="-lc++" + make -j$(nproc) test selfcheck CXXFLAGS="-stdlib=libc++ -g3 -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG" LDFLAGS="-lc++" - name: Run AddressSanitizer if: matrix.os == 'ubuntu-24.04'