Skip to content

Commit e54cd38

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 e54cd38

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

.github/workflows/reusable_gpu.yml

+17-11
Original file line numberDiff line numberDiff line change
@@ -42,24 +42,30 @@ 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: Establish build params
57+
id: build_params
58+
run: |
59+
if [ '${{matrix.os}}' == 'Windows' ]; then
60+
echo "C_COMPILER=cl" >> $GITHUB_ENV
61+
echo "CXX_COMPILER=cl" >> $GITHUB_ENV
62+
echo "PROCS=$Env:NUMBER_OF_PROCESSORS" >> $GITHUB_ENV
63+
else
64+
echo "C_COMPILER=gcc" >> $GITHUB_ENV
65+
echo "CXX_COMPILER=g++" >> $GITHUB_ENV
66+
echo "PROCS=$(nproc)" >> $GITHUB_ENV
67+
fi
68+
6369
- name: Checkout
6470
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
6571
with:
@@ -90,8 +96,8 @@ jobs:
9096
-B ${{env.BUILD_DIR}}
9197
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
9298
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
93-
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
94-
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
99+
-DCMAKE_C_COMPILER=${{env.C_COMPILER}}
100+
-DCMAKE_CXX_COMPILER=${{env.CXX_COMPILER}}
95101
-DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}}
96102
-DUMF_BUILD_BENCHMARKS=ON
97103
-DUMF_BUILD_BENCHMARKS_MT=ON
@@ -108,7 +114,7 @@ jobs:
108114
${{ matrix.os == 'Windows' && '-DCMAKE_SUPPRESS_REGENERATION=ON' || '' }}
109115
110116
- name: Build UMF
111-
run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j ${{matrix.number_of_processors}}
117+
run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j ${{env.PROCS}}
112118

113119
- name: Run tests
114120
working-directory: ${{env.BUILD_DIR}}

0 commit comments

Comments
 (0)