Skip to content

Commit f7a08f8

Browse files
[CI] Get rid of includes in matrix (in gpu workflow)
It enforces adding extra Windows job, and the BMG runner on Windows is not enabled yet. Replace it with params set via env vars.
1 parent c6d2e15 commit f7a08f8

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

.github/workflows/reusable_gpu.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,24 +42,31 @@ jobs:
4242
CUDA_PATH: "C:/cuda"
4343
COVERAGE_NAME : "exports-coverage-${{inputs.provider}}-${{inputs.runner}}"
4444
# run only on upstream; forks will not have the HW
45-
# also, disable Windows for L0-BMG, as such runner is not enabled yet
4645
if: github.repository == 'oneapi-src/unified-memory-framework'
4746
strategy:
4847
fail-fast: false
4948
matrix:
5049
shared_library: ${{ fromJSON(inputs.shared_lib)}}
5150
os: ${{ fromJSON(inputs.os)}}
5251
build_type: ${{ fromJSON(inputs.build_type)}}
53-
include:
54-
- os: 'Ubuntu'
55-
compiler: {c: gcc, cxx: g++}
56-
number_of_processors: '$(nproc)'
57-
- os: 'Windows'
58-
compiler: {c: cl, cxx: cl}
59-
number_of_processors: '$Env:NUMBER_OF_PROCESSORS'
6052

6153
runs-on: ["DSS-${{inputs.runner}}", "DSS-${{matrix.os}}"]
6254
steps:
55+
# Set number of processes and compiler based on OS
56+
- name: "[Win] Establish build params"
57+
if : ${{ matrix.os == 'Windows' }}
58+
run: |
59+
echo "C_COMPILER=cl" >> $GITHUB_ENV
60+
echo "CXX_COMPILER=cl" >> $GITHUB_ENV
61+
echo "PROCS=$Env:NUMBER_OF_PROCESSORS" >> $GITHUB_ENV
62+
63+
- name: "[Lin] Establish build params"
64+
if : ${{ matrix.os == 'Ubuntu' }}
65+
run: |
66+
echo "C_COMPILER=gcc" >> $GITHUB_ENV
67+
echo "CXX_COMPILER=g++" >> $GITHUB_ENV
68+
echo "PROCS=$(nproc)" >> $GITHUB_ENV
69+
6370
- name: Checkout
6471
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
6572
with:
@@ -90,8 +97,8 @@ jobs:
9097
-B ${{env.BUILD_DIR}}
9198
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
9299
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
93-
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
94-
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
100+
-DCMAKE_C_COMPILER=${{env.C_COMPILER}}
101+
-DCMAKE_CXX_COMPILER=${{env.CXX_COMPILER}}
95102
-DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}}
96103
-DUMF_BUILD_BENCHMARKS=ON
97104
-DUMF_BUILD_BENCHMARKS_MT=ON
@@ -108,7 +115,7 @@ jobs:
108115
${{ matrix.os == 'Windows' && '-DCMAKE_SUPPRESS_REGENERATION=ON' || '' }}
109116
110117
- name: Build UMF
111-
run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j ${{matrix.number_of_processors}}
118+
run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j ${{env.PROCS}}
112119

113120
- name: Run tests
114121
working-directory: ${{env.BUILD_DIR}}

0 commit comments

Comments
 (0)