1- # Workflow for checkig the backward compatibility of UMF.
1+ # Workflow for checking the backward compatibility of UMF.
22# Test the latest UMF shared library with binaries compiled using the older UMF
33# shared library.
44name : Compatibility
@@ -15,7 +15,7 @@ permissions:
1515 contents : read
1616
1717jobs :
18- ubuntu-build :
18+ ubuntu :
1919 name : Ubuntu
2020 runs-on : ' ubuntu-22.04'
2121
3535 - name : Install libhwloc
3636 working-directory : ${{github.workspace}}/tag_version
3737 run : .github/scripts/install_hwloc.sh
38-
39- - name : Get "tag" UMF version
40- working-directory : ${{github.workspace}}/tag_version
41- run : |
42- VERSION=$(git describe --tags)
43- echo "tag version: $VERSION"
4438
4539 - name : Configure "tag" UMF build
4640 working-directory : ${{github.workspace}}/tag_version
5246 -DCMAKE_C_COMPILER=gcc
5347 -DCMAKE_CXX_COMPILER=g++
5448 -DUMF_BUILD_TESTS=ON
49+ -DUMF_BUILD_EXAMPLES=ON
5550 -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
5651 -DUMF_BUILD_CUDA_PROVIDER=ON
5752 -DUMF_FORMAT_CODE_STYLE=OFF
6459 working-directory : ${{github.workspace}}/tag_version
6560 run : |
6661 cmake --build ${{github.workspace}}/tag_version/build -j $(nproc)
67-
62+
6863 - name : Run "tag" UMF tests
6964 working-directory : ${{github.workspace}}/tag_version/build
7065 run : |
7570 with :
7671 fetch-depth : 0
7772 path : ${{github.workspace}}/latest_version
78-
79- - name : Get latest UMF version
80- working-directory : ${{github.workspace}}/latest_version
81- run : |
82- VERSION=$(git describe --tags)
83- echo "checked version: $VERSION"
84-
73+
8574 - name : Configure latest UMF build
8675 working-directory : ${{github.workspace}}/latest_version
8776 run : >
9786 -DUMF_FORMAT_CODE_STYLE=OFF
9887 -DUMF_DEVELOPER_MODE=ON
9988 -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
100- -DUMF_TESTS_FAIL_ON_SKIP=ON
10189
10290 - name : Build latest UMF
10391 working-directory : ${{github.workspace}}/latest_version
@@ -106,12 +94,14 @@ jobs:
10694
10795 - name : Run "tag" UMF tests with latest UMF libs (warnings enabled)
10896 working-directory : ${{github.workspace}}/tag_version/build
97+ # GTEST_FILTER is used below to skip test that is not compatible
10998 run : >
110- UMF_LOG="level:warning;flush:debug;output:stderr;pid:no"
111- LD_LIBRARY_PATH=${{github.workspace}}/latest_version/build/lib/
112- ctest --output-on-failure -E "umf-mempolicy" # disable tests that rely on internal structures
113-
114- windows-build :
99+ UMF_LOG="level:warning;flush:debug;output:stderr;pid:no"
100+ LD_LIBRARY_PATH=${{github.workspace}}/latest_version/build/lib/
101+ GTEST_FILTER="-*umfIpcTest.GetPoolByOpenedHandle*"
102+ ctest --verbose
103+
104+ windows :
115105 name : Windows
116106 env :
117107 VCPKG_PATH : " ${{github.workspace}}/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/vcpkg/packages/jemalloc_x64-windows"
@@ -132,16 +122,11 @@ jobs:
132122 vcpkgDirectory : ${{github.workspace}}/vcpkg
133123 vcpkgJsonGlob : ' **/vcpkg.json'
134124
125+ # NOTE we use vcpkg setup from "tag" version
135126 - name : Install dependencies
136127 working-directory : ${{github.workspace}}/tag_version
137128 run : vcpkg install
138129 shell : pwsh # Specifies PowerShell as the shell for running the script.
139-
140- - name : Get "tag" UMF version
141- working-directory : ${{github.workspace}}/tag_version
142- run : |
143- $version = (git describe --tags)
144- echo "tag version: $VERSION"
145130
146131 - name : Configure "tag" UMF build
147132 working-directory : ${{github.workspace}}/tag_version
@@ -153,6 +138,7 @@ jobs:
153138 -DCMAKE_CXX_COMPILER=cl
154139 -DUMF_BUILD_SHARED_LIBRARY=ON
155140 -DUMF_BUILD_TESTS=ON
141+ -DUMF_BUILD_EXAMPLES=ON
156142 -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
157143 -DUMF_BUILD_CUDA_PROVIDER=ON
158144 -DUMF_FORMAT_CODE_STYLE=OFF
@@ -174,13 +160,6 @@ jobs:
174160 fetch-depth : 0
175161 path : ${{github.workspace}}/latest_version
176162
177- # NOTE we use vcpkg setup from "tag" version
178- - name : Get latest UMF version
179- working-directory : ${{github.workspace}}/latest_version
180- run : |
181- $version = (git describe --tags)
182- echo "latest version: $VERSION"
183-
184163 - name : Configure latest UMF build
185164 working-directory : ${{github.workspace}}/latest_version
186165 run : >
@@ -196,7 +175,6 @@ jobs:
196175 -DUMF_FORMAT_CODE_STYLE=OFF
197176 -DUMF_DEVELOPER_MODE=ON
198177 -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
199- -DUMF_TESTS_FAIL_ON_SKIP=ON
200178
201179 - name : Build latest UMF
202180 run : cmake --build "${{github.workspace}}/latest_version/build" --config Debug -j $Env:NUMBER_OF_PROCESSORS
@@ -205,5 +183,93 @@ jobs:
205183 working-directory : ${{github.workspace}}/tag_version/build
206184 run : |
207185 $env:UMF_LOG="level:warning;flush:debug;output:stderr;pid:no"
186+ $env:GTEST_FILTER="-*umfIpcTest.GetPoolByOpenedHandle*"
208187 cp ${{github.workspace}}/latest_version/build/bin/Debug/umf.dll ${{github.workspace}}/tag_version/build/bin/Debug/umf.dll
209- ctest -C Debug --output-on-failure --test-dir test
188+ ctest -C Debug --verbose
189+
190+ gpu :
191+ name : GPU Ubuntu
192+ # run only on upstream; forks will not have the HW
193+ if : github.repository == 'oneapi-src/unified-memory-framework'
194+ strategy :
195+ matrix :
196+ provider : ['LEVEL_ZERO', 'CUDA']
197+ runs-on : ["DSS-${{matrix.provider}}", "DSS-UBUNTU"]
198+
199+ steps :
200+ - name : Checkout "tag" UMF version
201+ uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
202+ with :
203+ fetch-depth : 0
204+ ref : refs/tags/${{inputs.tag}}
205+ path : ${{github.workspace}}/tag_version
206+
207+ - name : Configure "tag" UMF build
208+ working-directory : ${{github.workspace}}/tag_version
209+ run : >
210+ cmake
211+ -B ${{github.workspace}}/tag_version/build
212+ -DCMAKE_BUILD_TYPE=Debug
213+ -DUMF_BUILD_SHARED_LIBRARY=ON
214+ -DCMAKE_C_COMPILER=gcc
215+ -DCMAKE_CXX_COMPILER=g++
216+ -DUMF_BUILD_TESTS=ON
217+ -DUMF_BUILD_GPU_TESTS=ON
218+ -DUMF_BUILD_EXAMPLES=ON
219+ -DUMF_BUILD_GPU_EXAMPLES=ON
220+ -DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF
221+ -DUMF_BUILD_CUDA_PROVIDER=OFF
222+ -DUMF_BUILD_${{matrix.provider}}_PROVIDER=ON
223+ -DUMF_FORMAT_CODE_STYLE=OFF
224+ -DUMF_DEVELOPER_MODE=ON
225+ -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
226+ -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
227+ -DUMF_TESTS_FAIL_ON_SKIP=ON
228+
229+ - name : Build "tag" UMF
230+ working-directory : ${{github.workspace}}/tag_version
231+ run : |
232+ cmake --build ${{github.workspace}}/tag_version/build -j $(nproc)
233+
234+ - name : Run "tag" UMF tests
235+ working-directory : ${{github.workspace}}/tag_version/build
236+ run : >
237+ LD_LIBRARY_PATH=${{github.workspace}}/tag_version/build/lib/
238+ GTEST_FILTER="-*umfIpcTest.GetPoolByOpenedHandle*"
239+ ctest --output-on-failure
240+
241+ - name : Checkout latest UMF version
242+ uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
243+ with :
244+ fetch-depth : 0
245+ path : ${{github.workspace}}/latest_version
246+
247+ - name : Configure latest UMF build
248+ working-directory : ${{github.workspace}}/latest_version
249+ run : >
250+ cmake
251+ -B ${{github.workspace}}/latest_version/build
252+ -DCMAKE_BUILD_TYPE=Debug
253+ -DUMF_BUILD_SHARED_LIBRARY=ON
254+ -DCMAKE_C_COMPILER=gcc
255+ -DCMAKE_CXX_COMPILER=g++
256+ -DUMF_BUILD_TESTS=OFF
257+ -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
258+ -DUMF_BUILD_CUDA_PROVIDER=ON
259+ -DUMF_FORMAT_CODE_STYLE=OFF
260+ -DUMF_DEVELOPER_MODE=ON
261+ -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
262+
263+ - name : Build latest UMF
264+ working-directory : ${{github.workspace}}/latest_version
265+ run : |
266+ cmake --build ${{github.workspace}}/latest_version/build -j $(nproc)
267+
268+ # NOTE: Once not implemented features may now be implemented - exclude these tests
269+ - name : Run "tag" UMF tests with latest UMF libs (warnings enabled)
270+ working-directory : ${{github.workspace}}/tag_version/build
271+ run : >
272+ UMF_LOG="level:warning;flush:debug;output:stderr;pid:no"
273+ LD_LIBRARY_PATH=${{github.workspace}}/latest_version/build/lib/
274+ GTEST_FILTER="-*umfIpcTest.GetPoolByOpenedHandle*"
275+ ctest --verbose -E "not_impl"
0 commit comments