Skip to content

Update example

Update example #82

Workflow file for this run

name: Ubuntu
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-ubuntu:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
compiler: [gcc, clang]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Configure CMake for gcc
if: matrix.compiler == 'gcc'
run: |
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCODE_COVERAGE=ON -B build
- name: Configure CMake for clang
if: matrix.compiler == 'clang'
run: cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -B build
- name: Build
run: cmake --build build
- name: Run tests
run: ./build/tests/run_tests
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-22.04' && matrix.compiler == 'gcc'
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}