c-kzg-4844/.github/workflows/c-tests.yml

53 lines
1.3 KiB
YAML
Raw Normal View History

name: C
2023-01-30 16:37:04 +00:00
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
tests:
runs-on: ${{matrix.os}}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
2023-01-30 16:37:04 +00:00
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Check formatting
if: matrix.os == 'ubuntu-latest'
working-directory: src
run: |
make format
git diff --exit-code
- name: Build/Test
working-directory: src
run: make
- name: Clang Sanitizers
if: matrix.os != 'windows-latest'
working-directory: src
run: make sanitize
- name: Clang Static Analyzer
if: matrix.os != 'windows-latest'
working-directory: src
run: make analyze
- name: Install LLVM
if: matrix.os == 'ubuntu-latest'
uses: egor-tensin/setup-clang@v1
- name: Generate coverage report
if: matrix.os != 'windows-latest'
working-directory: src
run: make coverage
- name: Save coverage report
if: matrix.os != 'windows-latest'
uses: actions/upload-artifact@v3
with:
name: coverage
path: src/coverage.html