Add support to fuzz with sanitizers #90
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: ./scripts/clang-format-check | |
autotools: | |
strategy: | |
matrix: | |
os: ["ubuntu-latest", "macos-latest"] | |
cc: ["gcc", "clang"] | |
runs-on: ${{matrix.os}} | |
steps: | |
- if: ${{runner.os == 'macOS'}} | |
run: brew install autoconf automake libtool | |
- uses: actions/checkout@v2 | |
- run: autoreconf -fi | |
- env: | |
CC: ${{matrix.cc}} | |
CFLAGS: -Werror | |
run: ./configure | |
- run: make check | |
cmake: | |
strategy: | |
matrix: | |
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
cc: ["gcc", "clang"] | |
exclude: | |
- os: windows-latest | |
cc: gcc | |
- os: windows-latest | |
cc: clang | |
include: | |
- os: windows-latest | |
cc: 'msvc' # Doesn't really matter, MSVC is always used on Windows | |
runs-on: ${{matrix.os}} | |
steps: | |
- uses: actions/checkout@v2 | |
- env: | |
CC: ${{matrix.cc}} | |
run: cmake . | |
- run: cmake --build . | |
- run: ctest | |
valgrind: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: sudo apt update && sudo apt install valgrind | |
- run: cmake -DJANSSON_TEST_WITH_VALGRIND=ON . | |
- run: cmake --build . | |
- run: ctest | |
coveralls: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: sudo apt update && sudo apt install curl lcov | |
- run: cmake -DJANSSON_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug . | |
- run: cmake --build . | |
- run: cmake --build . --target coverage | |
- name: Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: coverage.info |