|
14 | 14 | COVERAGE_NAME : "exports-coverage-basic" |
15 | 15 |
|
16 | 16 | jobs: |
17 | | - ubuntu-build: |
18 | | - runs-on: ubuntu-latest |
19 | | - container: |
20 | | - image: ghcr.io/bb-ur/umf-${{ matrix.os }}:latest |
21 | | - options: --user test_user --cap-add=SYS_NICE --cap-add=SYS_PTRACE |
22 | | - volumes: |
23 | | - - ${{ github.workspace }}:${{ github.workspace }} |
24 | | - strategy: |
25 | | - matrix: |
26 | | - os: ['ubuntu-22.04', 'ubuntu-24.04'] |
27 | | - build_type: [Debug, Release] |
28 | | - compiler: [{c: gcc, cxx: g++}] |
29 | | - shared_library: ['OFF'] |
30 | | - level_zero_provider: ['ON'] |
31 | | - cuda_provider: ['ON'] |
32 | | - install_tbb: ['ON'] |
33 | | - link_hwloc_statically: ['OFF'] |
34 | | - cmake_ver: ['default'] |
35 | | - include: |
36 | | - - os: ubuntu-22.04 |
37 | | - build_type: Release |
38 | | - compiler: {c: clang, cxx: clang++} |
39 | | - shared_library: 'OFF' |
40 | | - level_zero_provider: 'ON' |
41 | | - cuda_provider: 'ON' |
42 | | - install_tbb: 'ON' |
43 | | - link_hwloc_statically: 'OFF' |
44 | | - # check minimum supported cmake version |
45 | | - cmake_ver: '3.14.0' |
46 | | - - os: ubuntu-22.04 |
47 | | - build_type: Release |
48 | | - compiler: {c: gcc, cxx: g++} |
49 | | - shared_library: 'ON' |
50 | | - level_zero_provider: 'ON' |
51 | | - cuda_provider: 'ON' |
52 | | - install_tbb: 'ON' |
53 | | - link_hwloc_statically: 'OFF' |
54 | | - cmake_ver: '3.28.0' |
55 | | - - os: ubuntu-24.04 |
56 | | - build_type: Debug |
57 | | - compiler: {c: gcc, cxx: g++} |
58 | | - shared_library: 'ON' |
59 | | - level_zero_provider: 'ON' |
60 | | - cuda_provider: 'ON' |
61 | | - install_tbb: 'ON' |
62 | | - link_hwloc_statically: 'OFF' |
63 | | - cmake_ver: 'default' |
64 | | - # test level_zero_provider='OFF' and cuda_provider='OFF' |
65 | | - - os: ubuntu-22.04 |
66 | | - build_type: Release |
67 | | - compiler: {c: gcc, cxx: g++} |
68 | | - shared_library: 'OFF' |
69 | | - level_zero_provider: 'OFF' |
70 | | - cuda_provider: 'OFF' |
71 | | - install_tbb: 'ON' |
72 | | - link_hwloc_statically: 'OFF' |
73 | | - cmake_ver: 'default' |
74 | | - # test icx compiler |
75 | | - - os: ubuntu-22.04 |
76 | | - build_type: Release |
77 | | - compiler: {c: icx, cxx: icpx} |
78 | | - shared_library: 'ON' |
79 | | - level_zero_provider: 'ON' |
80 | | - cuda_provider: 'ON' |
81 | | - install_tbb: 'ON' |
82 | | - link_hwloc_statically: 'OFF' |
83 | | - cmake_ver: 'default' |
84 | | - # test lld linker |
85 | | - - os: ubuntu-24.04 |
86 | | - build_type: Release |
87 | | - compiler: {c: icx, cxx: icpx} |
88 | | - shared_library: 'ON' |
89 | | - level_zero_provider: 'ON' |
90 | | - cuda_provider: 'ON' |
91 | | - install_tbb: 'ON' |
92 | | - link_hwloc_statically: 'OFF' |
93 | | - llvm_linker: '-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld" -DCMAKE_MODULE_LINKER_FLAGS="-fuse-ld=lld" -DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=lld"' |
94 | | - cmake_ver: 'default' |
95 | | - # test without installing TBB |
96 | | - - os: ubuntu-22.04 |
97 | | - build_type: Release |
98 | | - compiler: {c: gcc, cxx: g++} |
99 | | - shared_library: 'ON' |
100 | | - level_zero_provider: 'ON' |
101 | | - cuda_provider: 'ON' |
102 | | - install_tbb: 'OFF' |
103 | | - link_hwloc_statically: 'OFF' |
104 | | - cmake_ver: 'default' |
105 | | - - os: ubuntu-22.04 |
106 | | - build_type: Release |
107 | | - compiler: {c: gcc, cxx: g++} |
108 | | - shared_library: 'ON' |
109 | | - level_zero_provider: 'ON' |
110 | | - cuda_provider: 'ON' |
111 | | - install_tbb: 'ON' |
112 | | - link_hwloc_statically: 'ON' |
113 | | - cmake_ver: 'default' |
114 | | - name: Basic (${{matrix.os}}, build_type=${{matrix.build_type}}, compilers=${{matrix.compiler.c}}/${{matrix.compiler.cxx}}, shared_library=${{matrix.shared_library}}, level_zero_provider=${{matrix.level_zero_provider}}, cuda_provider=${{matrix.cuda_provider}}, install_tbb=${{matrix.install_tbb}}, link_hwloc_statically=${{matrix.link_hwloc_statically}}, cmake_ver=${{matrix.cmake_ver}}) |
115 | | - |
116 | | - steps: |
117 | | - - name: Checkout |
118 | | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
119 | | - with: |
120 | | - fetch-depth: 0 |
121 | | - |
122 | | - - name: Install cmake (non-default version) |
123 | | - if: matrix.cmake_ver != 'default' |
124 | | - run: | |
125 | | - echo ${USERPASS} | sudo -Sk apt-get remove --purge -y cmake |
126 | | - wget https://github.com/Kitware/CMake/releases/download/v${{matrix.cmake_ver}}/cmake-${{matrix.cmake_ver}}-Linux-x86_64.sh |
127 | | - chmod +x cmake-${{matrix.cmake_ver}}-Linux-x86_64.sh |
128 | | - echo ${USERPASS} | sudo -Sk ./cmake-${{matrix.cmake_ver}}-Linux-x86_64.sh --skip-license --prefix=/usr/local |
129 | | -
|
130 | | - - name: Uninstall TBB apt package |
131 | | - if: matrix.install_tbb == 'OFF' |
132 | | - run: | |
133 | | - echo ${USERPASS} | sudo -Sk apt-get remove --purge -y '*tbb*' |
134 | | - echo ${USERPASS} | sudo -Sk apt-get autoremove -y |
135 | | -
|
136 | | - - name: Install oneAPI basekit |
137 | | - if: matrix.compiler.cxx == 'icpx' |
138 | | - run: | |
139 | | - echo "${USERPASS}" | sudo -Sk ./.github/scripts/install_oneAPI.sh |
140 | | -
|
141 | | - - name: Get UMF version |
142 | | - run: | |
143 | | - git config --global --add safe.directory $GITHUB_WORKSPACE |
144 | | - VERSION=$(git describe --tags --abbrev=0 | grep -oP '\d+\.\d+\.\d+') |
145 | | - echo "UMF_VERSION=$VERSION" >> $GITHUB_ENV |
146 | | -
|
147 | | - - name: Configure build |
148 | | - run: > |
149 | | - ${{ matrix.compiler.cxx == 'icpx' && '. /opt/intel/oneapi/setvars.sh &&' || ''}} |
150 | | - cmake |
151 | | - -B ${{env.BUILD_DIR}} |
152 | | - -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" |
153 | | - -DCMAKE_BUILD_TYPE=${{matrix.build_type}} |
154 | | - -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} |
155 | | - -DCMAKE_C_COMPILER=${{matrix.compiler.c}} |
156 | | - -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} |
157 | | - -DUMF_BUILD_LEVEL_ZERO_PROVIDER=${{matrix.level_zero_provider}} |
158 | | - -DUMF_BUILD_CUDA_PROVIDER=${{matrix.cuda_provider}} |
159 | | - -DUMF_FORMAT_CODE_STYLE=OFF |
160 | | - -DUMF_DEVELOPER_MODE=ON |
161 | | - -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON |
162 | | - -DUMF_TESTS_FAIL_ON_SKIP=ON |
163 | | - -DUMF_LINK_HWLOC_STATICALLY=${{matrix.link_hwloc_statically}} |
164 | | - ${{ matrix.build_type == 'Debug' && matrix.compiler.c == 'gcc' && '-DUMF_USE_COVERAGE=ON' || '' }} |
165 | | - ${{ matrix.llvm_linker || '' }} |
166 | | -
|
167 | | - - name: Build UMF |
168 | | - run: | |
169 | | - ${{ matrix.compiler.cxx == 'icpx' && '. /opt/intel/oneapi/setvars.sh' || true }} |
170 | | - cmake --build ${{env.BUILD_DIR}} -j $(nproc) |
171 | | -
|
172 | | - - name: Run tests |
173 | | - working-directory: ${{env.BUILD_DIR}} |
174 | | - run: | |
175 | | - ${{ matrix.compiler.cxx == 'icpx' && '. /opt/intel/oneapi/setvars.sh' || true }} |
176 | | - LD_LIBRARY_PATH="${{env.BUILD_DIR}}/lib/:${LD_LIBRARY_PATH}" ctest --output-on-failure |
177 | | -
|
178 | | - - name: Check coverage |
179 | | - if: ${{ matrix.build_type == 'Debug' && matrix.compiler.c == 'gcc' }} |
180 | | - working-directory: ${{env.BUILD_DIR}} |
181 | | - run: | |
182 | | - export COVERAGE_FILE_NAME=${{env.COVERAGE_NAME}}-${{matrix.os}}-shared-${{matrix.shared_library}} |
183 | | - echo "COVERAGE_FILE_NAME: $COVERAGE_FILE_NAME" |
184 | | - ../scripts/coverage/coverage_capture.sh $COVERAGE_FILE_NAME |
185 | | - mkdir -p ${{env.COVERAGE_DIR}} |
186 | | - mv ./$COVERAGE_FILE_NAME ${{env.COVERAGE_DIR}} |
187 | | -
|
188 | | - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
189 | | - if: ${{ matrix.build_type == 'Debug' && matrix.compiler.c == 'gcc' }} |
190 | | - with: |
191 | | - name: ${{env.COVERAGE_NAME}}-${{matrix.os}}-shared-${{matrix.shared_library}} |
192 | | - path: ${{env.COVERAGE_DIR}} |
193 | | - |
194 | | - - name: Remove the installation directory |
195 | | - run: rm -rf ${{env.INSTL_DIR}} |
196 | | - |
197 | | - - name: Test UMF installation and uninstallation |
198 | | - run: > |
199 | | - python3 ${{github.workspace}}/test/test_installation.py |
200 | | - --build-dir ${{env.BUILD_DIR}} |
201 | | - --install-dir ${{env.INSTL_DIR}} |
202 | | - --build-type ${{matrix.build_type}} |
203 | | - ${{ matrix.install_tbb == 'ON' && matrix.shared_library == 'ON' && '--proxy' || '' }} |
204 | | - --umf-version ${{env.UMF_VERSION}} |
205 | | - ${{ matrix.shared_library == 'ON' && '--shared-library' || '' }} |
206 | | -
|
| 17 | + |
207 | 18 | windows-build: |
208 | 19 | env: |
209 | 20 | BUILD_DEBUG_DIR : "${{github.workspace}}/debug/build" |
@@ -436,6 +247,7 @@ jobs: |
436 | 247 | - name: check /DEPENDENTLOADFLAG in umf_proxy.dll (Release) |
437 | 248 | if: ${{matrix.shared_library == 'ON' && matrix.compiler.cxx == 'cl'}} |
438 | 249 | run: | |
| 250 | + Get-ChildItem -Path "${{env.BUILD_RELEASE_DIR}}" -Recurse |
439 | 251 | if (Test-Path "${{env.BUILD_RELEASE_DIR}}/src/proxy_lib/Release/umf_proxy.dll") { |
440 | 252 | $dll_path = "${{env.BUILD_RELEASE_DIR}}/src/proxy_lib/Release/umf_proxy.dll" |
441 | 253 | } else { |
|
0 commit comments