commit 3f5df5c96550fa2866018bee66e5b6a8dc8731bb
parent fd02a9dc5152f894522937b54345806102c7fde5
Author: MTRNord <mtrnord1@gmail.com>
Date: Mon, 14 Apr 2025 16:51:27 +0200
Possibly fix some CI issues
Diffstat:
2 files changed, 13 insertions(+), 34 deletions(-)
diff --git a/.clusterfuzzlite/Dockerfile b/.clusterfuzzlite/Dockerfile
@@ -5,7 +5,14 @@ RUN apt-get update && apt-get install -y \
cmake \
git \
python3-pip \
- pkg-config
+ pkg-config \
+ # Install the sanitizers
+ libasan4 \
+ liblsan0 \
+ libtsan0 \
+ libubsan1
+
+
RUN pip3 install meson ninja
RUN git clone --depth 1 https://github.com/randombit/botan.git
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
@@ -12,23 +12,19 @@ jobs:
fail-fast: false
matrix:
include:
- - name: "Linux x64 (Ubuntu 24.04) - GCC 14"
- os: ubuntu-24.04
+ - name: "Linux x64 (Ubuntu Latest) - GCC 14"
+ os: ubuntu-latest
build: { cc: gcc-14, cxx: g++-14, linker: ld }
- - name: "Linux x64 (Ubuntu 24.04) - Clang 18 with ASan and UBSan"
- os: ubuntu-24.04
- build: { cc: clang-18, cxx: clang++-18, linker: ld.lld-18, sanitize: true }
-
- - name: "macOS arm64 (14) - Xcode 15"
- os: macos-14
+ - name: "macOS arm64 (latest) - Xcode"
+ os: macos-latest
build: { cc: clang, cxx: clang++, linker: ld.lld }
env:
CC: ${{ matrix.build.cc }}
CXX: ${{ matrix.build.cxx }}
LD: ${{ matrix.build.linker }}
- CPPFLAGS: -Wall
+ CPPFLAGS: -Wall -Werror
steps:
- name: Checkout code
@@ -48,36 +44,12 @@ jobs:
brew install \
ninja pkg-config
- - name: Install Clang 18
- if: runner.os == 'Linux' && matrix.build.cc == 'clang-18'
- run: sudo apt-get install clang-18 libomp-18-dev lld-18 llvm-18
-
- name: Prepare macOS environment
if: runner.os == 'macOS'
run: |
echo "PKG_CONFIG_PATH=$(brew --prefix botan)/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
- - name: Prepare sanitizers
- if: matrix.build.sanitize
- env:
- LLVM_PREFIX: /usr/lib/llvm-18
- run: |
- ASAN_DSO=`$CC -print-file-name=libclang_rt.asan-x86_64.so`
- echo "LDSHARED=$CC -shared" >> $GITHUB_ENV
- echo "CPPFLAGS=-g -fsanitize=address,undefined -fno-sanitize=function -fno-omit-frame-pointer -fopenmp -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION" >> $GITHUB_ENV
- echo "LDFLAGS=-g -fsanitize=address,undefined -shared-libasan -fopenmp=libomp" >> $GITHUB_ENV
- echo "ASAN_DSO=$ASAN_DSO" >> $GITHUB_ENV
- # Glib is built without -fno-omit-frame-pointer. We need
- # to disable the fast unwinder to get full stacktraces.
- echo "ASAN_OPTIONS=suppressions=${{ github.workspace }}/suppressions/asan.supp:fast_unwind_on_malloc=0:allocator_may_return_null=1" >> $GITHUB_ENV
- echo "LSAN_OPTIONS=suppressions=${{ github.workspace }}/suppressions/lsan.supp:fast_unwind_on_malloc=0" >> $GITHUB_ENV
- echo "TSAN_OPTIONS=suppressions=${{ github.workspace }}/suppressions/tsan.supp" >> $GITHUB_ENV
- # Ensure UBSan issues causes the program to abort.
- echo "UBSAN_OPTIONS=suppressions=${{ github.workspace }}/suppressions/ubsan.supp:halt_on_error=1:abort_on_error=1:print_stacktrace=1" >> $GITHUB_ENV
- echo "LD_LIBRARY_PATH=$LLVM_PREFIX/lib:`dirname $ASAN_DSO`" >> $GITHUB_ENV
- echo "$LLVM_PREFIX/bin" >> $GITHUB_PATH
-
- name: Build and install Botan
run: |
git clone --depth 1 https://github.com/randombit/botan.git