Skip to content

Fix small detail

Fix small detail #86

Workflow file for this run

name: Build and Test on Linux Mac and Windows
on:
push:
branches: [ master ]
tags: "v*"
env:
BUILD_TYPE: Debug
jobs:
build:
name: Test on ${{ matrix.config.os }} with ${{ matrix.config.cc }}
runs-on: ${{ matrix.config.os }}
env:
CC: ${{ matrix.config.cc }}
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, cc: "gcc", cxx: "g++"}
- {os: ubuntu-latest, cc: "clang", cxx: "clang++"}
- {os: macos-latest, cc: "clang", cxx: "clang++"}
- {os: windows-latest, cc: "cl", cxx: "cl"}
steps:
- uses: actions/checkout@v2
- name: Info
run: echo ${{ github.ref }}
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure
coverage:
name: Coverage on ubuntu with gcc
runs-on: ubuntu-latest
needs: build
env:
CC: gcc
CXX: g++
timeout-minutes: 5
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWITH_COVERAGE=true
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Run Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure
- name: Copy coverage
working-directory: ${{github.workspace}}/build
run: cp $(find . -regex '.*gc\(da\|no\)' -printf "%p ") .
- name: Generate Coverage
run: |
sudo apt-get -y install lcov
lcov -c --directory ${{github.workspace}}/build --output-file ${{github.workspace}}/build/coverage.info
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ${{github.workspace}}/build/coverage.info