Skip to content

Commit

Permalink
Fix #31: Add code coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
tkem committed Aug 2, 2021
1 parent 5240fd3 commit 44c4384
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ on: [push, pull_request, workflow_dispatch]

jobs:
main:
name: ${{ matrix.cc }} (${{ matrix.std }}) on ${{ matrix.os }}
name: ${{ matrix.cc }} (C++${{ matrix.std }}) on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
cc: [clang-10, clang-11, clang-12, gcc-9, gcc-10]
std: [c++11, c++17]
std: [11, 17]
include:
- cc: clang-10
cxx: clang++-10
Expand All @@ -20,6 +20,7 @@ jobs:
os: ubuntu-20.04
- cc: clang-12
cxx: clang++-12
gcov: llvm-cov-12 gcov
os: ubuntu-20.04
- cc: gcc-9
cxx: g++-9
Expand All @@ -37,20 +38,29 @@ jobs:
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
CXXFLAGS: -std=${{ matrix.std }}
run: ./configure && make && make check
CXXFLAGS: -std=c++${{ matrix.std }}
run: ./configure --enable-coverage && make check
- name: Create coverage information
run: ${{ matrix.gcov }} -r *.cpp
working-directory: tests
if: ${{ matrix.gcov }}
- name: Upload coverage information
uses: codecov/codecov-action@v2
with:
name: ${{ matrix.cc }} (C++${{ matrix.std }}) on ${{ matrix.os }}
if: ${{ matrix.gcov }}
msvc:
name: Windows ${{ matrix.config }} build (C++${{ matrix.standard }})
name: Windows ${{ matrix.config }} build (C++${{ matrix.std }})
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
config: [Debug, Release]
standard: [11, 17]
std: [11, 17]
steps:
- uses: actions/checkout@v2
- name: Configure CMake
run: cmake -B build -D CMAKE_CXX_STANDARD=${{ matrix.standard }}
run: cmake -B build -D CMAKE_CXX_STANDARD=${{ matrix.std }}
- name: Build
run: cmake --build build --config ${{ matrix.config }}
- name: Run tests
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# fsmlite [![Build Status](https://travis-ci.com/tkem/fsmlite.svg?branch=master)](https://travis-ci.com/tkem/fsmlite/) [![Coverage Status](https://coveralls.io/repos/github/tkem/fsmlite/badge.svg?branch=master)](https://coveralls.io/github/tkem/fsmlite?branch=master) [![Documentation Status](https://readthedocs.org/projects/fsmlite/badge/?version=latest&style=flat)](http://fsmlite.readthedocs.io/en/latest/)
# fsmlite [![CI build status](https://img.shields.io/github/workflow/status/tkem/fsmlite/CI)](https://github.com/tkem/fsmlite/actions) [![Test coverage](https://img.shields.io/codecov/c/github/tkem/fsmlite/master.svg)](https://codecov.io/gh/tkem/fsmlite) [![Documentation](https://img.shields.io/readthedocs/fsmlite.svg)](https://fsmlite.readthedocs.io/en/latest/)

**fsmlite** is a lightweight finite state machine framework for C++11.
It is based on concepts first presented by David Abrahams and Aleksey
Expand Down Expand Up @@ -144,9 +144,7 @@ private:
```

[Documentation][3] is in the works. In the mean time, please have a
look at the [unit tests][4] for example usage. For compiler support,
please check out the [Travis CI](https://travis-ci.org/tkem/fsmlite/)
builds.
look at the [unit tests][4] for example usage.

## License

Expand Down

0 comments on commit 44c4384

Please sign in to comment.