Skip to content

Commit 96e14c2

Browse files
committed
Enable code coverage
1 parent 258b076 commit 96e14c2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/cmake.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ on: [push, pull_request]
55
env:
66
EM_VERSION: 2.0.16
77
EM_CACHE_FOLDER: 'emsdk-cache'
8+
CODECOV_TOKEN: '99959e57-0b92-48b4-bf55-559d43d41b58'
89

910
jobs:
1011
build:
1112
strategy:
1213
fail-fast: false
1314
matrix:
1415
platform:
15-
- { name: Ubuntu GCC, os: ubuntu-latest, compiler: g++, arch: "64", cmakepp: "", flags: ""}
16+
- { name: Ubuntu GCC, os: ubuntu-latest, compiler: g++, arch: "64", cmakepp: "", flags: "-DCMAKE_CXX_FLAGS=--coverage"}
1617
- { name: Ubuntu Clang, os: ubuntu-latest, compiler: clang++, arch: "64", cmakepp: "", flags: ""}
1718
- { name: Windows 32, os: windows-latest, compiler: vs2019, arch: "32", cmakepp: "", flags: "-A Win32"}
1819
- { name: Windows 64, os: windows-latest, compiler: vs2019, arch: "64", cmakepp: "", flags: "-A x64"}
@@ -68,3 +69,6 @@ jobs:
6869
working-directory: ${{github.workspace}}/build
6970
run: ctest --output-on-failure
7071

72+
- name: Compute Code Coverage
73+
if: runner.os == 'Linux' && ${{matrix.platform.compiler}} == 'g++' && ${{matrix.build-type}} == 'Debug'
74+
run: gcov ${{github.workspace}}/build/tests/CMakeFiles/oup_tests.dir/runtime_tests.cpp.gcda && bash <(curl -s https://codecov.io/bash)

0 commit comments

Comments
 (0)