Skip to content

Commit 8ea6d11

Browse files
Merge pull request #871 from lukaszstolarczuk/workflows-pt2
Workflows clean up (part 2)
2 parents 0b11d42 + 32ab8c3 commit 8ea6d11

File tree

7 files changed

+148
-202
lines changed

7 files changed

+148
-202
lines changed

.github/workflows/nightly.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,3 +175,19 @@ jobs:
175175
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
176176
call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
177177
ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test
178+
179+
L0:
180+
uses: ./.github/workflows/reusable_gpu.yml
181+
with:
182+
name: "LEVEL_ZERO"
183+
CUDA:
184+
uses: ./.github/workflows/reusable_gpu.yml
185+
with:
186+
name: "CUDA"
187+
188+
# Full exeuction of QEMU tests
189+
QEMU:
190+
uses: ./.github/workflows/reusable_qemu.yml
191+
with:
192+
short_run: false
193+
os: "['ubuntu-23.04', 'ubuntu-24.04']"

.github/workflows/pr_push.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,39 +31,50 @@ jobs:
3131
DevDax:
3232
needs: [FastBuild]
3333
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']"
3449
Sanitizers:
3550
needs: [FastBuild]
3651
uses: ./.github/workflows/reusable_sanitizers.yml
37-
Qemu:
52+
QEMU:
3853
needs: [FastBuild]
3954
uses: ./.github/workflows/reusable_qemu.yml
55+
with:
56+
short_run: true
4057
Benchmarks:
4158
needs: [Build]
4259
uses: ./.github/workflows/reusable_benchmarks.yml
4360
ProxyLib:
4461
needs: [Build]
4562
uses: ./.github/workflows/reusable_proxy_lib.yml
46-
GPU:
47-
needs: [Build]
48-
uses: ./.github/workflows/reusable_gpu.yml
4963
Valgrind:
5064
needs: [Build]
5165
uses: ./.github/workflows/reusable_valgrind.yml
52-
MultiNuma:
53-
needs: [Build]
54-
uses: ./.github/workflows/reusable_multi_numa.yml
5566
Coverage:
5667
# total coverage (on upstream only)
5768
if: github.repository == 'oneapi-src/unified-memory-framework'
58-
needs: [Build, DevDax, GPU, MultiNuma, Qemu, ProxyLib]
69+
needs: [Build, DevDax, L0, CUDA, MultiNuma, QEMU, ProxyLib]
5970
uses: ./.github/workflows/reusable_coverage.yml
6071
secrets: inherit
6172
with:
6273
trigger: "${{github.event_name}}"
6374
Coverage_partial:
6475
# partial coverage (on forks)
6576
if: github.repository != 'oneapi-src/unified-memory-framework'
66-
needs: [Build, Qemu, ProxyLib]
77+
needs: [Build, QEMU, ProxyLib]
6778
uses: ./.github/workflows/reusable_coverage.yml
6879
CodeQL:
6980
needs: [Build]

.github/workflows/reusable_gpu.yml

Lines changed: 51 additions & 172 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
1-
# This workflow builds and tests providers using GPU memory. It requires
2-
# appropriately labelled self-hosted runners installed on systems with the
3-
# correct GPU and drivers
4-
1+
# This workflow builds and tests providers using GPU memory. It requires properly
2+
# labelled self-hosted runners on systems with the correct GPU and drivers.
53
name: GPU
64

7-
on: [workflow_call]
5+
on:
6+
workflow_call:
7+
inputs:
8+
name:
9+
description: Provider name
10+
type: string
11+
required: true
12+
os:
13+
description: A list of OSes
14+
type: string
15+
default: "['Ubuntu', 'Windows']"
16+
build_type:
17+
description: A list of build types
18+
type: string
19+
default: "['Debug', 'Release']"
20+
shared_lib:
21+
description: A list of options for building shared library
22+
type: string
23+
default: "['ON', 'OFF']"
824

925
permissions:
1026
contents: read
@@ -15,30 +31,29 @@ env:
1531
COVERAGE_DIR : "${{github.workspace}}/coverage"
1632

1733
jobs:
18-
gpu-Level-Zero:
19-
name: Level-Zero
34+
gpu:
35+
name: "${{matrix.os}}, ${{matrix.build_type}}, shared=${{matrix.shared_library}}"
2036
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-L0"
37+
VCPKG_PATH: "${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows;"
38+
CUDA_PATH: "C:/cuda"
39+
COVERAGE_NAME : "exports-coverage-${{inputs.name}}"
2340
# run only on upstream; forks will not have the HW
2441
if: github.repository == 'oneapi-src/unified-memory-framework'
2542
strategy:
43+
fail-fast: false
2644
matrix:
27-
shared_library: ['ON', 'OFF']
28-
os: ['Ubuntu', 'Windows']
29-
build_type: ['Debug', 'Release']
45+
shared_library: ${{ fromJSON(inputs.shared_lib)}}
46+
os: ${{ fromJSON(inputs.os)}}
47+
build_type: ${{ fromJSON(inputs.build_type)}}
3048
include:
3149
- os: 'Ubuntu'
3250
compiler: {c: gcc, cxx: g++}
3351
number_of_processors: '$(nproc)'
3452
- os: 'Windows'
3553
compiler: {c: cl, cxx: cl}
3654
number_of_processors: '$Env:NUMBER_OF_PROCESSORS'
37-
exclude:
38-
- os: 'Windows'
39-
build_type: 'Debug'
4055

41-
runs-on: ["DSS-LEVEL_ZERO", "DSS-${{matrix.os}}"]
56+
runs-on: ["DSS-${{inputs.name}}", "DSS-${{matrix.os}}"]
4257
steps:
4358
- name: Checkout
4459
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -49,33 +64,23 @@ jobs:
4964
if: matrix.os == 'Ubuntu'
5065
run: .github/scripts/get_system_info.sh
5166

52-
- name: Configure build for Win
67+
- name: "[Win] Initialize vcpkg"
5368
if: matrix.os == 'Windows'
69+
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
70+
with:
71+
vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289
72+
vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg
73+
vcpkgJsonGlob: '**/vcpkg.json'
74+
75+
- name: "[Win] Install dependencies"
76+
if: matrix.os == 'Windows'
77+
run: vcpkg install
78+
79+
# note: disable all providers except the one being tested
80+
- name: Configure build
5481
run: >
5582
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
83+
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}${{env.CUDA_PATH}}"
7984
-B ${{env.BUILD_DIR}}
8085
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
8186
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
@@ -86,14 +91,14 @@ jobs:
8691
-DUMF_BUILD_TESTS=ON
8792
-DUMF_BUILD_GPU_TESTS=ON
8893
-DUMF_BUILD_GPU_EXAMPLES=ON
89-
-DUMF_FORMAT_CODE_STYLE=OFF
9094
-DUMF_DEVELOPER_MODE=ON
9195
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
9296
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
93-
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
9497
-DUMF_BUILD_CUDA_PROVIDER=OFF
98+
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF
99+
-DUMF_BUILD_${{inputs.name}}_PROVIDER=ON
95100
-DUMF_TESTS_FAIL_ON_SKIP=ON
96-
${{ matrix.build_type == 'Debug' && '-DUMF_USE_COVERAGE=ON' || '' }}
101+
${{ matrix.os == 'Ubuntu' && matrix.build_type == 'Debug' && '-DUMF_USE_COVERAGE=ON' || '' }}
97102
98103
- name: Build UMF
99104
run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j ${{matrix.number_of_processors}}
@@ -111,7 +116,7 @@ jobs:
111116
run: ctest --output-on-failure --test-dir benchmark -C ${{matrix.build_type}} --exclude-regex umf-bench-multithreaded
112117

113118
- name: Check coverage
114-
if: ${{ matrix.build_type == 'Debug' && matrix.os == 'Ubuntu' }}
119+
if: ${{ matrix.build_type == 'Debug' && matrix.os == 'Ubuntu' }}
115120
working-directory: ${{env.BUILD_DIR}}
116121
run: |
117122
export COVERAGE_FILE_NAME=${{env.COVERAGE_NAME}}-shared-${{matrix.shared_library}}
@@ -121,133 +126,7 @@ jobs:
121126
mv ./$COVERAGE_FILE_NAME ${{env.COVERAGE_DIR}}
122127
123128
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
124-
if: ${{ matrix.build_type == 'Debug' && matrix.os == 'Ubuntu' }}
129+
if: ${{ matrix.build_type == 'Debug' && matrix.os == 'Ubuntu' }}
125130
with:
126-
name: ${{env.COVERAGE_NAME}}-shared-${{matrix.shared_library}}
131+
name: ${{env.COVERAGE_NAME}}-${{matrix.os}}-${{matrix.build_type}}-shared-${{matrix.shared_library}}
127132
path: ${{env.COVERAGE_DIR}}
128-
129-
gpu-CUDA:
130-
name: CUDA
131-
env:
132-
COVERAGE_NAME : "exports-coverage-gpu-CUDA"
133-
VCPKG_PATH: "${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows;"
134-
CUDA_PATH: "c:/cuda"
135-
136-
# run only on upstream; forks will not have the HW
137-
if: github.repository == 'oneapi-src/unified-memory-framework'
138-
strategy:
139-
matrix:
140-
shared_library: ['ON', 'OFF']
141-
build_type: ['Debug', 'Release']
142-
os: ['Ubuntu', 'Windows']
143-
include:
144-
- os: 'Windows'
145-
compiler: {c: cl, cxx: cl}
146-
number_of_processors: '$Env:NUMBER_OF_PROCESSORS'
147-
- os: 'Ubuntu'
148-
compiler: {c: gcc, cxx: g++}
149-
number_of_processors: '$(nproc)'
150-
exclude:
151-
- os: 'Windows'
152-
build_type: 'Debug'
153-
154-
runs-on: ["DSS-CUDA", "DSS-${{matrix.os}}"]
155-
steps:
156-
- name: Checkout
157-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
158-
with:
159-
fetch-depth: 0
160-
161-
- name: Get information about platform
162-
if: matrix.os == 'Ubuntu'
163-
run: .github/scripts/get_system_info.sh
164-
165-
- name: Initialize vcpkg
166-
if: matrix.os == 'Windows'
167-
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
168-
with:
169-
vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289
170-
vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg
171-
vcpkgJsonGlob: '**/vcpkg.json'
172-
173-
- name: Install dependencies (windows-latest)
174-
if: matrix.os == 'Windows'
175-
run: vcpkg install
176-
shell: pwsh # Specifies PowerShell as the shell for running the script.
177-
178-
- name: Configure build for Win
179-
if: matrix.os == 'Windows'
180-
run: >
181-
cmake
182-
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}${{env.CUDA_PATH}}"
183-
-B ${{env.BUILD_DIR}}
184-
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
185-
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
186-
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
187-
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
188-
-DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}}
189-
-DUMF_BUILD_BENCHMARKS=ON
190-
-DUMF_BUILD_TESTS=ON
191-
-DUMF_BUILD_GPU_TESTS=ON
192-
-DUMF_BUILD_GPU_EXAMPLES=ON
193-
-DUMF_FORMAT_CODE_STYLE=OFF
194-
-DUMF_DEVELOPER_MODE=ON
195-
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
196-
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
197-
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF
198-
-DUMF_BUILD_CUDA_PROVIDER=ON
199-
-DUMF_TESTS_FAIL_ON_SKIP=ON
200-
201-
- name: Configure build for Ubuntu
202-
if: matrix.os == 'Ubuntu'
203-
run: >
204-
cmake
205-
-B ${{env.BUILD_DIR}}
206-
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
207-
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
208-
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
209-
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
210-
-DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}}
211-
-DUMF_BUILD_BENCHMARKS=ON
212-
-DUMF_BUILD_TESTS=ON
213-
-DUMF_BUILD_GPU_TESTS=ON
214-
-DUMF_BUILD_GPU_EXAMPLES=ON
215-
-DUMF_FORMAT_CODE_STYLE=OFF
216-
-DUMF_DEVELOPER_MODE=ON
217-
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
218-
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
219-
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF
220-
-DUMF_BUILD_CUDA_PROVIDER=ON
221-
-DUMF_TESTS_FAIL_ON_SKIP=ON
222-
${{ matrix.build_type == 'Debug' && '-DUMF_USE_COVERAGE=ON' || '' }}
223-
224-
- name: Build UMF
225-
run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j ${{matrix.number_of_processors}}
226-
227-
- name: Run tests
228-
working-directory: ${{env.BUILD_DIR}}
229-
run: ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test
230-
231-
- name: Run examples
232-
working-directory: ${{env.BUILD_DIR}}
233-
run: ctest --output-on-failure --test-dir examples -C ${{matrix.build_type}}
234-
235-
- name: Run benchmarks
236-
working-directory: ${{env.BUILD_DIR}}
237-
run: ctest --output-on-failure --test-dir benchmark -C ${{matrix.build_type}} --exclude-regex umf-bench-multithreaded
238-
239-
- name: Check coverage
240-
if: ${{ matrix.build_type == 'Debug' && matrix.os == 'Ubuntu' }}
241-
working-directory: ${{env.BUILD_DIR}}
242-
run: |
243-
export COVERAGE_FILE_NAME=${{env.COVERAGE_NAME}}-shared-${{matrix.shared_library}}
244-
echo "COVERAGE_FILE_NAME: $COVERAGE_FILE_NAME"
245-
../scripts/coverage/coverage_capture.sh $COVERAGE_FILE_NAME
246-
mkdir -p ${{env.COVERAGE_DIR}}
247-
mv ./$COVERAGE_FILE_NAME ${{env.COVERAGE_DIR}}
248-
249-
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
250-
if: ${{ matrix.build_type == 'Debug' && matrix.os == 'Ubuntu' }}
251-
with:
252-
name: ${{env.COVERAGE_NAME}}-shared-${{matrix.shared_library}}
253-
path: ${{env.COVERAGE_DIR}}

0 commit comments

Comments
 (0)