Skip to content

Commit a32be71

Browse files
committed
Merge branch 'main' into merge-some-main-changes-into-adapters-third-patch
2 parents 2a11e49 + 26e98b5 commit a32be71

File tree

16 files changed

+1765
-1665
lines changed

16 files changed

+1765
-1665
lines changed

.github/workflows/cmake.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,10 @@ jobs:
288288
- os: 'windows-2019'
289289
adapter: {name: L0, var: '-DUR_BUILD_ADAPTER_L0=ON'}
290290
build_type: [Debug, Release]
291-
compiler: [{c: cl.exe, cxx: cl.exe}, {c: clang-cl.exe, cxx: clang-cl.exe}]
291+
compiler: [{c: cl, cxx: cl}, {c: clang-cl, cxx: clang-cl}]
292+
include:
293+
- compiler: {c: clang-cl, cxx: clang-cl}
294+
toolset: "-T ClangCL"
292295
runs-on: ${{matrix.os}}
293296

294297
steps:
@@ -312,6 +315,7 @@ jobs:
312315
run: >
313316
cmake
314317
-B${{github.workspace}}/build
318+
${{matrix.toolset}}
315319
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
316320
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
317321
-DCMAKE_POLICY_DEFAULT_CMP0094=NEW
@@ -327,7 +331,7 @@ jobs:
327331
# run: cmake --build ${{github.workspace}}/build --target check-generated --config ${{matrix.build_type}}
328332

329333
- name: Build all
330-
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} -j 2
334+
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS
331335

332336
- name: Test
333337
working-directory: ${{github.workspace}}/build

.github/workflows/coverage.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Coverage
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
ubuntu-build:
7+
name: Build - Ubuntu
8+
strategy:
9+
matrix:
10+
os: ['ubuntu-22.04']
11+
build_type: [Debug]
12+
compiler: [{c: gcc, cxx: g++}]
13+
libbacktrace: ['-DVAL_USE_LIBBACKTRACE_BACKTRACE=ON']
14+
pool_tracking: ['-DUMF_ENABLE_POOL_TRACKING=ON']
15+
16+
runs-on: ${{matrix.os}}
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- name: Install apt packages
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y doxygen ${{matrix.compiler.c}}
25+
26+
- name: Install pip packages
27+
run: pip install -r third_party/requirements.txt
28+
29+
- name: Install libbacktrace
30+
if: matrix.libbacktrace == '-DVAL_USE_LIBBACKTRACE_BACKTRACE=ON'
31+
run: |
32+
git clone https://github.com/ianlancetaylor/libbacktrace.git
33+
cd libbacktrace
34+
./configure
35+
make
36+
sudo make install
37+
cd ..
38+
39+
- name: Download DPC++
40+
run: |
41+
sudo apt install libncurses5
42+
wget -O ${{github.workspace}}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/sycl-nightly%2F20230626/dpcpp-compiler.tar.gz
43+
tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz
44+
45+
- name: Configure CMake
46+
run: >
47+
cmake
48+
-B${{github.workspace}}/build
49+
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
50+
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
51+
-DUR_ENABLE_TRACING=ON
52+
-DUR_DEVELOPER_MODE=ON
53+
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
54+
-DUR_BUILD_TESTS=ON
55+
-DUR_FORMAT_CPP_STYLE=ON
56+
-DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++
57+
-DCMAKE_CXX_FLAGS="--coverage -fkeep-inline-functions -fkeep-static-functions"
58+
-DCMAKE_EXE_LINKER_FLAGS="--coverage"
59+
-DCMAKE_SHARED_LINKER_FLAGS="--coverage"
60+
${{matrix.libbacktrace}}
61+
${{matrix.pool_tracking}}
62+
63+
- name: Build
64+
run: cmake --build ${{github.workspace}}/build -j $(nproc)
65+
66+
- name: Test
67+
working-directory: ${{github.workspace}}/build
68+
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "python|umf|loader|validation|tracing|unit|urtrace"
69+
70+
- name: Quick Coverage Info
71+
working-directory: ${{github.workspace}}/build
72+
run: ctest -T Coverage
73+
74+
- name: Upload coverage to Codecov
75+
uses: codecov/codecov-action@v3
76+
with:
77+
gcov: true
78+
gcov_include: source

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
[![CodeQL](https://github.com/oneapi-src/unified-runtime/actions/workflows/codeql.yml/badge.svg)](https://github.com/oneapi-src/unified-runtime/actions/workflows/codeql.yml)
55
[![Bandit](https://github.com/oneapi-src/unified-runtime/actions/workflows/bandit.yml/badge.svg)](https://github.com/oneapi-src/unified-runtime/actions/workflows/bandit.yml)
66
[![Coverity](https://scan.coverity.com/projects/28213/badge.svg)](https://scan.coverity.com/projects/oneapi-src-unified-runtime)
7+
[![codecov.io](https://codecov.io/github/oneapi-src/unified-runtime/coverage.svg?branch=main)](https://codecov.io/github/oneapi-src/unified-runtime?branch=master)
78

89
## Adapters
910
Adapter implementations for Unified Runtime currently reside in the [SYCL repository](https://github.com/intel/llvm/tree/sycl/sycl/plugins/unified_runtime/ur). This branch contains scripts to automatically

0 commit comments

Comments
 (0)