@@ -12,19 +12,21 @@ permissions:
12
12
env :
13
13
BUILD_DIR : " ${{github.workspace}}/build"
14
14
INSTL_DIR : " ${{github.workspace}}/../install-dir"
15
+ COVERAGE_DIR : " ${{github.workspace}}/coverage"
15
16
16
17
jobs :
17
18
gpu :
18
19
name : Build
19
20
env :
20
- BUILD_TYPE : Release
21
21
VCPKG_PATH : " ${{github.workspace}}/../../../../vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/../../../../vcpkg/packages/tbb_x64-windows;${{github.workspace}}/../../../../vcpkg/packages/jemalloc_x64-windows"
22
+ COVERAGE_NAME : " exports-coverage-gpu"
22
23
# run only on upstream; forks will not have the HW
23
24
if : github.repository == 'oneapi-src/unified-memory-framework'
24
25
strategy :
25
26
matrix :
26
27
shared_library : ['ON', 'OFF']
27
28
os : ['Ubuntu', 'Windows']
29
+ build_type : ['Debug', 'Release']
28
30
include :
29
31
- os : ' Ubuntu'
30
32
compiler : {c: gcc, cxx: g++}
51
53
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
52
54
-B ${{env.BUILD_DIR}}
53
55
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
54
- -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE }}
56
+ -DCMAKE_BUILD_TYPE=${{matrix.build_type }}
55
57
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
56
58
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
57
59
-DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}}
73
75
cmake
74
76
-B ${{env.BUILD_DIR}}
75
77
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
76
- -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE }}
78
+ -DCMAKE_BUILD_TYPE=${{matrix.build_type }}
77
79
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
78
80
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
79
81
-DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}}
@@ -90,29 +92,46 @@ jobs:
90
92
-DUMF_TESTS_FAIL_ON_SKIP=ON
91
93
92
94
- name : Build UMF
93
- run : cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE }} -j ${{matrix.number_of_processors}}
95
+ run : cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type }} -j ${{matrix.number_of_processors}}
94
96
95
97
- name : Run tests
96
98
working-directory : ${{env.BUILD_DIR}}
97
- run : ctest -C ${{env.BUILD_TYPE }} --output-on-failure --test-dir test
99
+ run : ctest -C ${{matrix.build_type }} --output-on-failure --test-dir test
98
100
99
101
- name : Run examples
100
102
working-directory : ${{env.BUILD_DIR}}
101
- run : ctest --output-on-failure --test-dir examples -C ${{env.BUILD_TYPE }}
103
+ run : ctest --output-on-failure --test-dir examples -C ${{matrix.build_type }}
102
104
103
105
- name : Run benchmarks
104
106
working-directory : ${{env.BUILD_DIR}}
105
- run : ctest --output-on-failure --test-dir benchmark -C ${{env.BUILD_TYPE}} --exclude-regex umf-bench-multithreaded
107
+ run : ctest --output-on-failure --test-dir benchmark -C ${{matrix.build_type}} --exclude-regex umf-bench-multithreaded
108
+
109
+ - name : Check coverage
110
+ if : ${{ matrix.build_type == 'Debug' && matrix.os == 'Ubuntu' }}
111
+ working-directory : ${{env.BUILD_DIR}}
112
+ run : |
113
+ export COVERAGE_FILE_NAME=${{env.COVERAGE_NAME}}-shared-${{matrix.shared_library}}
114
+ echo "COVERAGE_FILE_NAME: $COVERAGE_FILE_NAME"
115
+ ../scripts/coverage/coverage_capture.sh $COVERAGE_FILE_NAME
116
+ mkdir -p ${{env.COVERAGE_DIR}}
117
+ mv ./$COVERAGE_FILE_NAME ${{env.COVERAGE_DIR}}
118
+
119
+ - uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
120
+ if : ${{ matrix.build_type == 'Debug' && matrix.os == 'Ubuntu' }}
121
+ with :
122
+ name : ${{env.COVERAGE_NAME}}-shared-${{matrix.shared_library}}
123
+ path : ${{env.COVERAGE_DIR}}
106
124
107
125
gpu-CUDA :
108
126
name : Build
109
127
env :
110
- BUILD_TYPE : Release
128
+ COVERAGE_NAME : " exports-coverage-gpu-CUDA "
111
129
# run only on upstream; forks will not have the HW
112
130
if : github.repository == 'oneapi-src/unified-memory-framework'
113
131
strategy :
114
132
matrix :
115
133
shared_library : ['ON', 'OFF']
134
+ build_type : ['Debug', 'Release']
116
135
# TODO add windows
117
136
os : ['Ubuntu']
118
137
include :
@@ -136,7 +155,7 @@ jobs:
136
155
run : >
137
156
cmake -B ${{env.BUILD_DIR}}
138
157
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
139
- -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE }}
158
+ -DCMAKE_BUILD_TYPE=${{matrix.build_type }}
140
159
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
141
160
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
142
161
-DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}}
@@ -153,16 +172,32 @@ jobs:
153
172
-DUMF_TESTS_FAIL_ON_SKIP=ON
154
173
155
174
- name : Build UMF
156
- run : cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE }} -j ${{matrix.number_of_processors}}
175
+ run : cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type }} -j ${{matrix.number_of_processors}}
157
176
158
177
- name : Run tests
159
178
working-directory : ${{env.BUILD_DIR}}
160
- run : ctest -C ${{env.BUILD_TYPE }} --output-on-failure --test-dir test
179
+ run : ctest -C ${{matrix.build_type }} --output-on-failure --test-dir test
161
180
162
181
- name : Run examples
163
182
working-directory : ${{env.BUILD_DIR}}
164
- run : ctest --output-on-failure --test-dir examples -C ${{env.BUILD_TYPE }}
183
+ run : ctest --output-on-failure --test-dir examples -C ${{matrix.build_type }}
165
184
166
185
- name : Run benchmarks
167
186
working-directory : ${{env.BUILD_DIR}}
168
- run : ctest --output-on-failure --test-dir benchmark -C ${{env.BUILD_TYPE}} --exclude-regex umf-bench-multithreaded
187
+ run : ctest --output-on-failure --test-dir benchmark -C ${{matrix.build_type}} --exclude-regex umf-bench-multithreaded
188
+
189
+ - name : Check coverage
190
+ if : ${{ matrix.build_type == 'Debug' && matrix.os == 'Ubuntu' }}
191
+ working-directory : ${{env.BUILD_DIR}}
192
+ run : |
193
+ export COVERAGE_FILE_NAME=${{env.COVERAGE_NAME}}-shared-${{matrix.shared_library}}
194
+ echo "COVERAGE_FILE_NAME: $COVERAGE_FILE_NAME"
195
+ ../scripts/coverage/coverage_capture.sh $COVERAGE_FILE_NAME
196
+ mkdir -p ${{env.COVERAGE_DIR}}
197
+ mv ./$COVERAGE_FILE_NAME ${{env.COVERAGE_DIR}}
198
+
199
+ - uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
200
+ if : ${{ matrix.build_type == 'Debug' && matrix.os == 'Ubuntu' }}
201
+ with :
202
+ name : ${{env.COVERAGE_NAME}}-shared-${{matrix.shared_library}}
203
+ path : ${{env.COVERAGE_DIR}}
0 commit comments