Skip to content

Commit

Permalink
added ubuntu-24.04 to CI and made it the primary platform (#372)
Browse files Browse the repository at this point in the history
* added `ubuntu-24.04` to CI and made it the primary platform

* CI-unixish.yml: added missing dependency for Clang hardening mode

* CI-unixish.yml: removed DWARF workaround for valgrind

* CI-unixish.yml: use hardening mode for libc++
  • Loading branch information
firewave authored Oct 3, 2024
1 parent 3588ca8 commit 6aa3ea1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
30 changes: 17 additions & 13 deletions .github/workflows/CI-unixish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -20,10 +20,16 @@ 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
- 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)
Expand All @@ -49,44 +55,42 @@ 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
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
- 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++'
- 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-22.04'
if: matrix.os == 'ubuntu-24.04'
run: |
make clean
make -j$(nproc) test selfcheck CXXFLAGS="-O2 -g3 -fsanitize=address" LDFLAGS="-fsanitize=address"
env:
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"
2 changes: 1 addition & 1 deletion .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6aa3ea1

Please sign in to comment.