Skip to content

Commit 3621603

Browse files
committed
test
1 parent a2df66b commit 3621603

File tree

2 files changed

+117
-135
lines changed

2 files changed

+117
-135
lines changed

.github/workflows/pr_push.yml

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -16,77 +16,7 @@ permissions:
1616
contents: read
1717

1818
jobs:
19-
CodeChecks:
20-
uses: ./.github/workflows/reusable_checks.yml
21-
DocsBuild:
22-
uses: ./.github/workflows/reusable_docs_build.yml
23-
FastBuild:
24-
name: Fast builds
25-
needs: [CodeChecks, DocsBuild]
26-
uses: ./.github/workflows/reusable_fast.yml
27-
Build:
28-
name: Basic builds
29-
needs: [FastBuild]
30-
uses: ./.github/workflows/reusable_basic.yml
31-
DevDax:
32-
needs: [FastBuild]
33-
uses: ./.github/workflows/reusable_dax.yml
34-
MultiNuma:
35-
needs: [FastBuild]
36-
uses: ./.github/workflows/reusable_multi_numa.yml
37-
L0:
38-
needs: [Build]
39-
uses: ./.github/workflows/reusable_gpu.yml
40-
with:
41-
name: "LEVEL_ZERO"
42-
shared_lib: "['ON']"
43-
CUDA:
44-
needs: [Build]
45-
uses: ./.github/workflows/reusable_gpu.yml
46-
with:
47-
name: "CUDA"
48-
shared_lib: "['ON']"
49-
Sanitizers:
50-
needs: [FastBuild]
51-
uses: ./.github/workflows/reusable_sanitizers.yml
52-
QEMU:
53-
needs: [FastBuild]
54-
uses: ./.github/workflows/reusable_qemu.yml
55-
with:
56-
short_run: true
57-
ProxyLib:
58-
needs: [Build]
59-
uses: ./.github/workflows/reusable_proxy_lib.yml
60-
Valgrind:
61-
needs: [Build]
62-
uses: ./.github/workflows/reusable_valgrind.yml
63-
Coverage:
64-
# total coverage (on upstream only)
65-
if: github.repository == 'oneapi-src/unified-memory-framework'
66-
needs: [Build, DevDax, L0, CUDA, MultiNuma, QEMU, ProxyLib]
67-
uses: ./.github/workflows/reusable_coverage.yml
68-
secrets: inherit
69-
with:
70-
trigger: "${{github.event_name}}"
71-
Coverage_partial:
72-
# partial coverage (on forks)
73-
if: github.repository != 'oneapi-src/unified-memory-framework'
74-
needs: [Build, QEMU, ProxyLib]
75-
uses: ./.github/workflows/reusable_coverage.yml
76-
CodeQL:
77-
needs: [Build]
78-
permissions:
79-
contents: read
80-
security-events: write
81-
uses: ./.github/workflows/reusable_codeql.yml
82-
Trivy:
83-
needs: [Build]
84-
permissions:
85-
contents: read
86-
security-events: write
87-
uses: ./.github/workflows/reusable_trivy.yml
8819
Compatibility:
89-
needs: [Build]
9020
uses: ./.github/workflows/reusable_compatibility.yml
9121
strategy:
9222
matrix:

.github/workflows/reusable_compatibility.yml

Lines changed: 117 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
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|hmat|level_zero|cuda"
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,38 @@ 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_INSTALL_PREFIX=_install
241+
-DCMAKE_BUILD_TYPE=Debug
242+
-DUMF_BUILD_SHARED_LIBRARY=ON
243+
-DCMAKE_C_COMPILER=gcc
244+
-DCMAKE_CXX_COMPILER=g++
245+
-DUMF_BUILD_TESTS=OFF
246+
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
247+
-DUMF_BUILD_CUDA_PROVIDER=ON
248+
-DUMF_FORMAT_CODE_STYLE=OFF
249+
-DUMF_DEVELOPER_MODE=ON
250+
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
251+
252+
- name: Build latest UMF
253+
working-directory: ${{github.workspace}}/latest_version
254+
run: |
255+
cmake --build ${{github.workspace}}/latest_version/build -j $(nproc)
256+
257+
- name: Install latest UMF
258+
working-directory: ${{github.workspace}}/latest_version
259+
run: cmake --install ${{github.workspace}}/latest_version/build --config Debug
260+
204261
- name: Checkout "tag" UMF version
205262
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
206263
with:
@@ -242,33 +299,6 @@ jobs:
242299
GTEST_FILTER="-*umfIpcTest.GetPoolByOpenedHandle*"
243300
ctest --output-on-failure
244301
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-
272302
- name: Run "tag" UMF tests with latest UMF libs (warnings enabled)
273303
working-directory: ${{github.workspace}}/tag_version/build
274304
# Disable incompatible tests:
@@ -280,3 +310,25 @@ jobs:
280310
LD_LIBRARY_PATH=${{github.workspace}}/latest_version/build/lib/
281311
GTEST_FILTER="-*umfIpcTest.GetPoolByOpenedHandle*"
282312
ctest --verbose -E "not_impl|umf-mempolicy"
313+
314+
# Browse all folders in the examples directory, build them using the
315+
# latest UMF version, and run them, excluding those in the exclude list.
316+
# NOTE: exclude cuda and level zero as they require linking with static
317+
# disjoint pool library
318+
- name: Build and run "tag" examples using the latest UMF libraries
319+
working-directory: ${{github.workspace}}/tag_version
320+
run: |
321+
EXAMPLES_EXCLUDE_LIST="cmake|common|hmat|cuda${{matrix.provider == 'LEVEL_ZERO' && '' || '|level_zero' }}"
322+
rm -rf build
323+
rm -rf include
324+
mkdir _examples
325+
cd _examples
326+
EXAMPLES_LIST=$(find ${{github.workspace}}/tag_version/examples -maxdepth 1 -mindepth 1 -type d | grep -Ev $EXAMPLES_EXCLUDE_LIST | xargs -n 1 basename)
327+
for EXAMPLE_NAME in $EXAMPLES_LIST; do
328+
cd ${{github.workspace}}/tag_version
329+
mkdir -p _examples/$EXAMPLE_NAME;
330+
cd _examples/$EXAMPLE_NAME;
331+
CMAKE_PREFIX_PATH=${{github.workspace}}/latest_version/_install cmake ${{github.workspace}}/tag_version/examples/$EXAMPLE_NAME;
332+
make;
333+
find . -maxdepth 1 -type f -executable -exec {} \;
334+
done

0 commit comments

Comments
 (0)