11
11
UMF_VERSION : 0.10.0
12
12
BUILD_DIR : " ${{github.workspace}}/build"
13
13
INSTL_DIR : " ${{github.workspace}}/../install-dir"
14
+ COVERAGE_DIR : " ${{github.workspace}}/coverage"
15
+ COVERAGE_NAME : " exports-coverage-basic"
14
16
15
17
jobs :
16
18
ubuntu-build :
@@ -122,8 +124,8 @@ jobs:
122
124
- name : Install apt packages
123
125
run : |
124
126
sudo apt-get update
125
- sudo apt-get install -y clang cmake libnuma-dev libjemalloc-dev
126
-
127
+ sudo apt-get install -y clang cmake libnuma-dev libjemalloc-dev lcov
128
+
127
129
- name : Install TBB apt package
128
130
if : matrix.install_tbb == 'ON'
129
131
run : |
@@ -167,6 +169,7 @@ jobs:
167
169
-DUMF_TESTS_FAIL_ON_SKIP=ON
168
170
-DUMF_DISABLE_HWLOC=${{matrix.disable_hwloc}}
169
171
-DUMF_LINK_HWLOC_STATICALLY=${{matrix.link_hwloc_statically}}
172
+ ${{ matrix.build_type == 'Debug' && matrix.compiler.c == 'gcc' && '-DUMF_USE_COVERAGE=ON' || '' }}
170
173
171
174
- name : Build UMF
172
175
run : |
@@ -177,7 +180,23 @@ jobs:
177
180
working-directory : ${{env.BUILD_DIR}}
178
181
run : |
179
182
${{ matrix.compiler.cxx == 'icpx' && '. /opt/intel/oneapi/setvars.sh' || true }}
180
- ctest --output-on-failure --test-dir test
183
+ ctest --output-on-failure # run all tests for better coverage
184
+
185
+ - name : Check coverage
186
+ if : ${{ matrix.build_type == 'Debug' && matrix.compiler.c == 'gcc' }}
187
+ working-directory : ${{env.BUILD_DIR}}
188
+ run : |
189
+ export COVERAGE_FILE_NAME=${{env.COVERAGE_NAME}}-${{matrix.os}}-shared-${{matrix.shared_library}}-no_hwloc-${{matrix.disable_hwloc}}
190
+ echo "COVERAGE_FILE_NAME: $COVERAGE_FILE_NAME"
191
+ ../scripts/coverage/coverage_capture.sh $COVERAGE_FILE_NAME
192
+ mkdir -p ${{env.COVERAGE_DIR}}
193
+ mv ./$COVERAGE_FILE_NAME ${{env.COVERAGE_DIR}}
194
+
195
+ - uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
196
+ if : ${{ matrix.build_type == 'Debug' && matrix.compiler.c == 'gcc' }}
197
+ with :
198
+ name : ${{env.COVERAGE_NAME}}-${{matrix.os}}-shared-${{matrix.shared_library}}-no_hwloc-${{matrix.disable_hwloc}}
199
+ path : ${{env.COVERAGE_DIR}}
181
200
182
201
- name : Remove the installation directory
183
202
run : rm -rf ${{env.INSTL_DIR}}
0 commit comments