Skip to content

Commit

Permalink
ci: Run tests, add sanitizer build configurations that run tests too
Browse files Browse the repository at this point in the history
  • Loading branch information
mstorsjo committed Oct 6, 2023
1 parent 8ac2f35 commit ba763df
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
./autogen.sh
./configure --enable-example
make -j$(nproc) CFLAGS="-g -O2 -Werror" CXXFLAGS="-g -O2 -Werror"
- name: Run tests
run: |
./test/run-tests.sh
linux-cmake:
runs-on: ubuntu-latest
Expand All @@ -22,6 +25,40 @@ jobs:
run: |
cmake . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_PROGRAMS=YES -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror -Wno-stringop-overflow"
cmake --build build
- name: Run tests
run: |
cd build
../test/run-tests.sh
linux-sanitizers-gcc-autotools:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Build
run: |
./autogen.sh
FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer -fno-sanitize=shift-base -DDEBUG -fno-sanitize-recover=all"
CC="gcc $FLAGS" CXX="g++ $FLAGS" ./configure --enable-example
make -j$(nproc)
- name: Run tests
run: |
./test/run-tests.sh
linux-sanitizers-clang-cmake:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Build
run: |
FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer -fno-sanitize=shift-base -DDEBUG -fno-sanitize-recover=all -fno-sanitize=vptr -fno-sanitize=function"
cmake . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_PROGRAMS=YES -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="$FLAGS" -DCMAKE_CXX_FLAGS="$FLAGS"
cmake --build build
- name: Run tests
run: |
cd build
../test/run-tests.sh
macos-autotools:
runs-on: macos-latest
Expand Down

0 comments on commit ba763df

Please sign in to comment.