diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43b8934..d9a2652 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -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 diff --git a/README.md b/README.md index f14210b..e24d97d 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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