|
15 | 15 | COVERAGE_DIR : "${{github.workspace}}/coverage" |
16 | 16 |
|
17 | 17 | jobs: |
18 | | - gpu-Level-Zero: |
19 | | - name: Level-Zero |
20 | | - env: |
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" |
23 | | - # run only on upstream; forks will not have the HW |
24 | | - if: github.repository == 'oneapi-src/unified-memory-framework' |
25 | | - strategy: |
26 | | - matrix: |
27 | | - shared_library: ['ON', 'OFF'] |
28 | | - os: ['Ubuntu', 'Windows'] |
29 | | - build_type: ['Debug', 'Release'] |
30 | | - include: |
31 | | - - os: 'Ubuntu' |
32 | | - compiler: {c: gcc, cxx: g++} |
33 | | - number_of_processors: '$(nproc)' |
34 | | - - os: 'Windows' |
35 | | - compiler: {c: cl, cxx: cl} |
36 | | - number_of_processors: '$Env:NUMBER_OF_PROCESSORS' |
37 | | - exclude: |
38 | | - - os: 'Windows' |
39 | | - build_type: 'Debug' |
40 | | - |
41 | | - runs-on: ["DSS-LEVEL_ZERO", "DSS-${{matrix.os}}"] |
42 | | - steps: |
43 | | - - name: Checkout |
44 | | - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
45 | | - with: |
46 | | - fetch-depth: 0 |
47 | | - |
48 | | - - name: Get information about platform |
49 | | - if: matrix.os == 'Ubuntu' |
50 | | - run: .github/scripts/get_system_info.sh |
51 | | - |
52 | | - - name: Configure build for Win |
53 | | - if: matrix.os == 'Windows' |
54 | | - run: > |
55 | | - cmake |
56 | | - -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}" |
57 | | - -B ${{env.BUILD_DIR}} |
58 | | - -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" |
59 | | - -DCMAKE_BUILD_TYPE=${{matrix.build_type}} |
60 | | - -DCMAKE_C_COMPILER=${{matrix.compiler.c}} |
61 | | - -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} |
62 | | - -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} |
63 | | - -DUMF_BUILD_BENCHMARKS=ON |
64 | | - -DUMF_BUILD_TESTS=ON |
65 | | - -DUMF_BUILD_GPU_TESTS=ON |
66 | | - -DUMF_BUILD_GPU_EXAMPLES=ON |
67 | | - -DUMF_FORMAT_CODE_STYLE=OFF |
68 | | - -DUMF_DEVELOPER_MODE=ON |
69 | | - -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON |
70 | | - -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON |
71 | | - -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON |
72 | | - -DUMF_BUILD_CUDA_PROVIDER=OFF |
73 | | - -DUMF_TESTS_FAIL_ON_SKIP=ON |
74 | | - |
75 | | - - name: Configure build for Ubuntu |
76 | | - if: matrix.os == 'Ubuntu' |
77 | | - run: > |
78 | | - cmake |
79 | | - -B ${{env.BUILD_DIR}} |
80 | | - -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" |
81 | | - -DCMAKE_BUILD_TYPE=${{matrix.build_type}} |
82 | | - -DCMAKE_C_COMPILER=${{matrix.compiler.c}} |
83 | | - -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} |
84 | | - -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} |
85 | | - -DUMF_BUILD_BENCHMARKS=ON |
86 | | - -DUMF_BUILD_TESTS=ON |
87 | | - -DUMF_BUILD_GPU_TESTS=ON |
88 | | - -DUMF_BUILD_GPU_EXAMPLES=ON |
89 | | - -DUMF_FORMAT_CODE_STYLE=OFF |
90 | | - -DUMF_DEVELOPER_MODE=ON |
91 | | - -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON |
92 | | - -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON |
93 | | - -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON |
94 | | - -DUMF_BUILD_CUDA_PROVIDER=OFF |
95 | | - -DUMF_TESTS_FAIL_ON_SKIP=ON |
96 | | - ${{ matrix.build_type == 'Debug' && '-DUMF_USE_COVERAGE=ON' || '' }} |
97 | | -
|
98 | | - - name: Build UMF |
99 | | - run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j ${{matrix.number_of_processors}} |
100 | | - |
101 | | - - name: Run tests |
102 | | - working-directory: ${{env.BUILD_DIR}} |
103 | | - run: ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test |
104 | | - |
105 | | - - name: Run examples |
106 | | - working-directory: ${{env.BUILD_DIR}} |
107 | | - run: ctest --output-on-failure --test-dir examples -C ${{matrix.build_type}} |
108 | | - |
109 | | - - name: Run benchmarks |
110 | | - working-directory: ${{env.BUILD_DIR}} |
111 | | - run: ctest --output-on-failure --test-dir benchmark -C ${{matrix.build_type}} --exclude-regex umf-bench-multithreaded |
112 | | - |
113 | | - - name: Check coverage |
114 | | - if: ${{ matrix.build_type == 'Debug' && matrix.os == 'Ubuntu' }} |
115 | | - working-directory: ${{env.BUILD_DIR}} |
116 | | - run: | |
117 | | - export COVERAGE_FILE_NAME=${{env.COVERAGE_NAME}}-shared-${{matrix.shared_library}} |
118 | | - echo "COVERAGE_FILE_NAME: $COVERAGE_FILE_NAME" |
119 | | - ../scripts/coverage/coverage_capture.sh $COVERAGE_FILE_NAME |
120 | | - mkdir -p ${{env.COVERAGE_DIR}} |
121 | | - mv ./$COVERAGE_FILE_NAME ${{env.COVERAGE_DIR}} |
122 | | -
|
123 | | - - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 |
124 | | - if: ${{ matrix.build_type == 'Debug' && matrix.os == 'Ubuntu' }} |
125 | | - with: |
126 | | - name: ${{env.COVERAGE_NAME}}-shared-${{matrix.shared_library}} |
127 | | - path: ${{env.COVERAGE_DIR}} |
128 | | - |
129 | 18 | gpu-CUDA: |
130 | 19 | name: CUDA |
131 | 20 | env: |
@@ -178,31 +67,3 @@ jobs: |
178 | 67 |
|
179 | 68 | - name: Build UMF |
180 | 69 | run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j ${{matrix.number_of_processors}} |
181 | | - |
182 | | - - name: Run tests |
183 | | - working-directory: ${{env.BUILD_DIR}} |
184 | | - run: ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test |
185 | | - |
186 | | - - name: Run examples |
187 | | - working-directory: ${{env.BUILD_DIR}} |
188 | | - run: ctest --output-on-failure --test-dir examples -C ${{matrix.build_type}} |
189 | | - |
190 | | - - name: Run benchmarks |
191 | | - working-directory: ${{env.BUILD_DIR}} |
192 | | - run: ctest --output-on-failure --test-dir benchmark -C ${{matrix.build_type}} --exclude-regex umf-bench-multithreaded |
193 | | - |
194 | | - - name: Check coverage |
195 | | - if: ${{ matrix.build_type == 'Debug' && matrix.os == 'Ubuntu' }} |
196 | | - working-directory: ${{env.BUILD_DIR}} |
197 | | - run: | |
198 | | - export COVERAGE_FILE_NAME=${{env.COVERAGE_NAME}}-shared-${{matrix.shared_library}} |
199 | | - echo "COVERAGE_FILE_NAME: $COVERAGE_FILE_NAME" |
200 | | - ../scripts/coverage/coverage_capture.sh $COVERAGE_FILE_NAME |
201 | | - mkdir -p ${{env.COVERAGE_DIR}} |
202 | | - mv ./$COVERAGE_FILE_NAME ${{env.COVERAGE_DIR}} |
203 | | -
|
204 | | - - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 |
205 | | - if: ${{ matrix.build_type == 'Debug' && matrix.os == 'Ubuntu' }} |
206 | | - with: |
207 | | - name: ${{env.COVERAGE_NAME}}-shared-${{matrix.shared_library}} |
208 | | - path: ${{env.COVERAGE_DIR}} |
0 commit comments