@@ -649,6 +649,37 @@ jobs:
649649 name : ${{ matrix.os }}-Wheels.binaries
650650 path : ./wheelhouse/*.whl
651651
652+ Codecov :
653+ name : Code coverage
654+ needs : Linux
655+ if : ${{ !startsWith(github.ref, 'refs/tags/') }}
656+ runs-on : ubuntu-latest
657+ steps :
658+ - name : Install Ubuntu packages
659+ run : |
660+ sudo apt-get update
661+ sudo apt-get install cxxtest lcov
662+ - name : Checkout JSBSim
663+ uses : actions/checkout@v3
664+ - name : Configure JSBSim
665+ run : |
666+ mkdir build && cd build
667+ cmake -DENABLE_COVERAGE=ON -DBUILD_PYTHON_MODULE=OFF ..
668+ - name : Build JSBSim
669+ working-directory : build
670+ run : make -j2
671+ - name : Run JSBSim tests
672+ working-directory : build
673+ run : ctest -R Test1 --output-on-failure
674+ - name : Generate coverage report
675+ working-directory : build
676+ run : make lcov
677+ - name : Upload to Codecov
678+ uses : codecov/codecov-action@v3
679+ with :
680+ working-directory : build/lcov/data/capture
681+ files : all_targets.info
682+
652683 Rolling-Release :
653684 needs : [Python-Wheels, Test-Build-PyPackage-From-Source, Windows-MinGW32, Windows-installer]
654685 name : Deploy Rolling Release
@@ -804,19 +835,19 @@ jobs:
804835 - name : Install Ubuntu packages
805836 run : |
806837 sudo apt-get update
807- sudo apt-get install doxygen graphviz cxxtest lcov
838+ sudo apt-get install doxygen graphviz
808839 - name : Set up Python 3.7
809840 uses : actions/setup-python@v4
810841 with :
811842 python-version : ' 3.7'
812843 - name : Install Python packages
813- run : pip install -U numpy sphinx cython 'setuptools>=60.0.0'
844+ run : pip install -U numpy sphinx
814845 - name : Checkout JSBSim
815846 uses : actions/checkout@v3
816847 - name : Configure JSBSim
817848 run : |
818849 mkdir build && cd build
819- cmake -DCMAKE_C_FLAGS_DEBUG="--coverage" -DCMAKE_CXX_FLAGS_DEBUG="--coverage" -DCMAKE_BUILD_TYPE=Debug ..
850+ cmake -DBUILD_PYTHON_MODULE=OFF ..
820851 - name : Download Python wheels
821852 uses : actions/download-artifact@v3
822853 with :
@@ -828,16 +859,6 @@ jobs:
828859 pip install jsbsim --no-index -f .
829860 touch documentation/html/.nojekyll
830861 sphinx-build -b html documentation documentation/html/python
831- - name : Build JSBSim
832- working-directory : build
833- run : make -j2
834- - name : Unit tests coverage
835- working-directory : build
836- run : |
837- ctest -R Test1 --output-on-failure
838- lcov -d . -c -o tmp.info
839- lcov -r tmp.info /usr/include/c++/\* /usr/include/cxxtest/\* \*/tests/unit_tests/\* -o coverage.info
840- genhtml -o documentation/html/coverage -t "JSBSim unit tests" coverage.info
841862 - name : Publish docs to GitHub Pages
842863 uses : crazy-max/ghaction-github-pages@v3
843864 with :
0 commit comments