Skip to content

Update build-and-test.yml #13

Update build-and-test.yml

Update build-and-test.yml #13

name: Build and Coverage
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: ConorMacBride/install-package@v1
with:
brew: gnutls openssl@3 jansson pkgconf cmake doxygen graphviz
apt: gnutls-dev libssl-dev libjansson-dev pkg-config check lcov valgrind
- name: Configure CMake on ${{ matrix.os }}
run: cmake -B ${{github.workspace}}/build -DENABLE_COVERAGE=YES
- name: Build on ${{ matrix.os }}
working-directory: ${{github.workspace}}/build
run: make
- name: Test on ${{ matrix.os }}
working-directory: ${{github.workspace}}/build
run: make check
- if: ${{ matrix.os }} == "ubuntu-latest"
name: Coverage on ${{ matrix.os }}
working-directory: ${{github.workspace}}/build
run: make check-code-coverage
- if: ${{ matrix.os }} == "ubuntu-latest"
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
- if: startsWith(matrix.os, 'ubuntu') == true
name: Memcheck on ${{ matrix.os }}
working-directory: ${{github.workspace}}/build
run: ctest -T memcheck
- if: ${{ matrix.os }} == "macos-latest"
name: Documents on ${{ matrix.os }}
working-directory: ${{github.workspace}}/build
run: make doxygen-doc