2323 - name : Install apt packages
2424 run : |
2525 sudo apt-get update
26- sudo apt-get install -y clang cmake libnuma-dev libtbb-dev
26+ sudo apt-get install -y clang cmake hwloc libnuma-dev libtbb-dev
2727
2828 - name : Checkout "tag" UMF version
2929 uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -36,72 +36,97 @@ jobs:
3636 working-directory : ${{github.workspace}}/tag_version
3737 run : .github/scripts/install_hwloc.sh
3838
39- - name : Configure "tag" UMF build
40- working-directory : ${{github.workspace}}/tag_version
39+ - name : Checkout latest UMF version
40+ uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
41+ with :
42+ fetch-depth : 0
43+ path : ${{github.workspace}}/latest_version
44+
45+ - name : Configure latest UMF build
46+ working-directory : ${{github.workspace}}/latest_version
4147 run : >
4248 cmake
43- -B ${{github.workspace}}/tag_version/build
49+ -B ${{github.workspace}}/latest_version/build
50+ -DCMAKE_INSTALL_PREFIX=_install
4451 -DCMAKE_BUILD_TYPE=Debug
4552 -DUMF_BUILD_SHARED_LIBRARY=ON
4653 -DCMAKE_C_COMPILER=gcc
4754 -DCMAKE_CXX_COMPILER=g++
48- -DUMF_BUILD_TESTS=ON
49- -DUMF_BUILD_EXAMPLES=ON
55+ -DUMF_BUILD_TESTS=OFF
5056 -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
5157 -DUMF_BUILD_CUDA_PROVIDER=ON
5258 -DUMF_FORMAT_CODE_STYLE=OFF
5359 -DUMF_DEVELOPER_MODE=ON
5460 -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
55- -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
56- -DUMF_TESTS_FAIL_ON_SKIP=ON
57-
58- - name : Build "tag" UMF
59- working-directory : ${{github.workspace}}/tag_version
60- run : |
61- cmake --build ${{github.workspace}}/tag_version/build -j $(nproc)
6261
63- - name : Run "tag" UMF tests
64- working-directory : ${{github.workspace}}/tag_version/build
62+ - name : Build latest UMF
63+ working-directory : ${{github.workspace}}/latest_version
6564 run : |
66- LD_LIBRARY_PATH=${{github.workspace}}/tag_version/build/lib/ ctest --output-on-failure
67-
68- - name : Checkout latest UMF version
69- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
70- with :
71- fetch-depth : 0
72- path : ${{github.workspace}}/latest_version
65+ cmake --build ${{github.workspace}}/latest_version/build -j $(nproc)
7366
74- - name : Configure latest UMF build
67+ - name : Install latest UMF
7568 working-directory : ${{github.workspace}}/latest_version
69+ run : sudo cmake --install ${{github.workspace}}/latest_version/build --config Debug
70+
71+ - name : Configure "tag" UMF build
72+ working-directory : ${{github.workspace}}/tag_version
7673 run : >
7774 cmake
78- -B ${{github.workspace}}/latest_version /build
75+ -B ${{github.workspace}}/tag_version /build
7976 -DCMAKE_BUILD_TYPE=Debug
8077 -DUMF_BUILD_SHARED_LIBRARY=ON
8178 -DCMAKE_C_COMPILER=gcc
8279 -DCMAKE_CXX_COMPILER=g++
83- -DUMF_BUILD_TESTS=OFF
80+ -DUMF_BUILD_TESTS=ON
81+ -DUMF_BUILD_EXAMPLES=ON
8482 -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
8583 -DUMF_BUILD_CUDA_PROVIDER=ON
8684 -DUMF_FORMAT_CODE_STYLE=OFF
8785 -DUMF_DEVELOPER_MODE=ON
8886 -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
87+ -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
88+ -DUMF_TESTS_FAIL_ON_SKIP=ON
8989
90- - name : Build latest UMF
91- working-directory : ${{github.workspace}}/latest_version
90+ - name : Build "tag" UMF
91+ working-directory : ${{github.workspace}}/tag_version
9292 run : |
93- cmake --build ${{github.workspace}}/latest_version /build -j $(nproc)
93+ cmake --build ${{github.workspace}}/tag_version /build -j $(nproc)
9494
95- - name : Run "tag" UMF tests with latest UMF libs (warnings enabled)
96- working-directory : ${{github.workspace}}/tag_version/build
97- # Disable incompatible tests:
98- # - GTEST_FILTER used to skip only single test cases
99- # - ctest's exclude - disable test binary that rely on internal structures
100- run : >
101- UMF_LOG="level:warning;flush:debug;output:stderr;pid:no"
102- LD_LIBRARY_PATH=${{github.workspace}}/latest_version/build/lib/
103- GTEST_FILTER="-*umfIpcTest.GetPoolByOpenedHandle*"
104- ctest --verbose -E "umf-mempolicy"
95+ # - name: Run "tag" UMF tests
96+ # working-directory: ${{github.workspace}}/tag_version/build
97+ # run: |
98+ # LD_LIBRARY_PATH=${{github.workspace}}/tag_version/build/lib/ ctest --output-on-failure
99+
100+ # - name: Run "tag" UMF tests with latest UMF libs (warnings enabled)
101+ # working-directory: ${{github.workspace}}/tag_version/build
102+ # # Disable incompatible tests:
103+ # # - GTEST_FILTER used to skip only single test cases
104+ # # - ctest's exclude - disable test binary that rely on internal structures
105+ # run: >
106+ # UMF_LOG="level:warning;flush:debug;output:stderr;pid:no"
107+ # LD_LIBRARY_PATH=${{github.workspace}}/latest_version/build/lib/
108+ # GTEST_FILTER="-*umfIpcTest.GetPoolByOpenedHandle*"
109+ # ctest --verbose -E "umf-mempolicy"
110+
111+ # Browse all folders in the examples directory, build them using the
112+ # latest UMF version, and run them, excluding those in the exclude list.
113+ - name : Build and run "tag" examples using the latest UMF libraries
114+ working-directory : ${{github.workspace}}/tag_version
115+ run : |
116+ EXAMPLES_EXCLUDE_LIST="cmake|common|cuda|hmat|level_zero"
117+ rm -rf build
118+ rm -rf include
119+ mkdir _examples
120+ cd _examples
121+ EXAMPLES_LIST=$(find ${{github.workspace}}/tag_version/examples -maxdepth 1 -mindepth 1 -type d | grep -Ev $EXAMPLES_EXCLUDE_LIST | xargs -n 1 basename)
122+ for EXAMPLE_NAME in $EXAMPLES_LIST; do
123+ cd ${{github.workspace}}/tag_version
124+ mkdir -p _examples/$EXAMPLE_NAME;
125+ cd _examples/$EXAMPLE_NAME;
126+ CMAKE_PREFIX_PATH=${{github.workspace}}/latest_version/_install cmake ${{github.workspace}}/tag_version/examples/$EXAMPLE_NAME;
127+ make;
128+ find . -maxdepth 1 -type f -executable -exec {} \;
129+ done
105130
106131 windows :
107132 name : Windows
@@ -201,6 +226,37 @@ jobs:
201226 runs-on : ["DSS-${{matrix.provider}}", "DSS-UBUNTU"]
202227
203228 steps :
229+ - name : Checkout latest UMF version
230+ uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
231+ with :
232+ fetch-depth : 0
233+ path : ${{github.workspace}}/latest_version
234+
235+ - name : Configure latest UMF build
236+ working-directory : ${{github.workspace}}/latest_version
237+ run : >
238+ cmake
239+ -B ${{github.workspace}}/latest_version/build
240+ -DCMAKE_BUILD_TYPE=Debug
241+ -DUMF_BUILD_SHARED_LIBRARY=ON
242+ -DCMAKE_C_COMPILER=gcc
243+ -DCMAKE_CXX_COMPILER=g++
244+ -DUMF_BUILD_TESTS=OFF
245+ -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
246+ -DUMF_BUILD_CUDA_PROVIDER=ON
247+ -DUMF_FORMAT_CODE_STYLE=OFF
248+ -DUMF_DEVELOPER_MODE=ON
249+ -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
250+
251+ - name : Build latest UMF
252+ working-directory : ${{github.workspace}}/latest_version
253+ run : |
254+ cmake --build ${{github.workspace}}/latest_version/build -j $(nproc)
255+
256+ - name : Install latest UMF
257+ working-directory : ${{github.workspace}}/latest_version
258+ run : sudo cmake --install ${{github.workspace}}/latest_version/build --config Debug
259+
204260 - name : Checkout "tag" UMF version
205261 uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
206262 with :
@@ -242,33 +298,6 @@ jobs:
242298 GTEST_FILTER="-*umfIpcTest.GetPoolByOpenedHandle*"
243299 ctest --output-on-failure
244300
245- - name : Checkout latest UMF version
246- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
247- with :
248- fetch-depth : 0
249- path : ${{github.workspace}}/latest_version
250-
251- - name : Configure latest UMF build
252- working-directory : ${{github.workspace}}/latest_version
253- run : >
254- cmake
255- -B ${{github.workspace}}/latest_version/build
256- -DCMAKE_BUILD_TYPE=Debug
257- -DUMF_BUILD_SHARED_LIBRARY=ON
258- -DCMAKE_C_COMPILER=gcc
259- -DCMAKE_CXX_COMPILER=g++
260- -DUMF_BUILD_TESTS=OFF
261- -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
262- -DUMF_BUILD_CUDA_PROVIDER=ON
263- -DUMF_FORMAT_CODE_STYLE=OFF
264- -DUMF_DEVELOPER_MODE=ON
265- -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
266-
267- - name : Build latest UMF
268- working-directory : ${{github.workspace}}/latest_version
269- run : |
270- cmake --build ${{github.workspace}}/latest_version/build -j $(nproc)
271-
272301 - name : Run "tag" UMF tests with latest UMF libs (warnings enabled)
273302 working-directory : ${{github.workspace}}/tag_version/build
274303 # Disable incompatible tests:
@@ -280,3 +309,23 @@ jobs:
280309 LD_LIBRARY_PATH=${{github.workspace}}/latest_version/build/lib/
281310 GTEST_FILTER="-*umfIpcTest.GetPoolByOpenedHandle*"
282311 ctest --verbose -E "not_impl|umf-mempolicy"
312+
313+ # Browse all folders in the examples directory, build them using the
314+ # latest UMF version, and run them, excluding those in the exclude list.
315+ - name : Build and run "tag" examples using the latest UMF libraries
316+ working-directory : ${{github.workspace}}/tag_version
317+ run : |
318+ EXAMPLES_EXCLUDE_LIST="cmake|common|hmat${{matrix.provider == 'LEVEL_ZERO' && '|cuda' || '|level_zero' }}"
319+ rm -rf build
320+ rm -rf include
321+ mkdir _examples
322+ cd _examples
323+ EXAMPLES_LIST=$(find ${{github.workspace}}/tag_version/examples -maxdepth 1 -mindepth 1 -type d | grep -Ev $EXAMPLES_EXCLUDE_LIST | xargs -n 1 basename)
324+ for EXAMPLE_NAME in $EXAMPLES_LIST; do
325+ cd ${{github.workspace}}/tag_version
326+ mkdir -p _examples/$EXAMPLE_NAME;
327+ cd _examples/$EXAMPLE_NAME;
328+ CMAKE_PREFIX_PATH=${{github.workspace}}/latest_version/_install cmake ${{github.workspace}}/tag_version/examples/$EXAMPLE_NAME;
329+ make;
330+ find . -maxdepth 1 -type f -executable -exec {} \;
331+ done
0 commit comments