Skip to content

Commit e72d570

Browse files
Merge pull request #884 from omarahmed1111/Add-test-workflow-for-codegen-example
Add test workflow for codegen example
2 parents 1941850 + d1f7ebc commit e72d570

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/cmake.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,52 @@ jobs:
215215
working-directory: ${{github.workspace}}/build
216216
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "conformance" --timeout 180
217217

218+
examples-build-hw:
219+
name: Build - examples on HW
220+
if: github.repository == 'oneapi-src/unified-runtime' # run only on upstream; forks won't have the HW
221+
strategy:
222+
matrix:
223+
adapter: [
224+
{name: L0}
225+
]
226+
build_type: [Debug, Release]
227+
compiler: [{c: gcc, cxx: g++}, {c: clang, cxx: clang++}]
228+
229+
runs-on: ${{matrix.adapter.name}}
230+
231+
steps:
232+
- uses: actions/checkout@v3
233+
234+
- name: Install pip packages
235+
run: pip install -r third_party/requirements.txt
236+
237+
- name: Init conda env
238+
uses: conda-incubator/setup-miniconda@v2
239+
with:
240+
miniconda-version: "latest"
241+
activate-environment: examples
242+
environment-file: third_party/deps.yml
243+
auto-activate-base: false
244+
245+
- name: Configure CMake
246+
shell: bash -el {0}
247+
run: >
248+
cmake
249+
-B${{github.workspace}}/build
250+
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
251+
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
252+
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
253+
-DUR_BUILD_ADAPTER_${{matrix.adapter.name}}=ON
254+
-DUR_BUILD_EXAMPLE_CODEGEN=ON
255+
-DUR_DEVELOPER_MODE=ON
256+
257+
- name: Build
258+
run: cmake --build ${{github.workspace}}/build -j $(nproc)
259+
260+
- name: Test codegen example
261+
working-directory: ${{github.workspace}}/build
262+
run: bin/codegen
263+
218264
windows-build:
219265
name: Build - Windows
220266
strategy:

0 commit comments

Comments
 (0)