Skip to content

Commit f72f449

Browse files
authored
Merge pull request #685 from lukaszstolarczuk/revamp-readme
[UR] Revamp README file a little
2 parents bee9f64 + d367c68 commit f72f449

File tree

2 files changed

+63
-47
lines changed

2 files changed

+63
-47
lines changed

README.md

Lines changed: 59 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
11
# Unified Runtime
22

3-
[![GHA build status](https://github.com/oneapi-src/unified-runtime/actions/workflows/cmake.yml/badge.svg?branch=main)](https://github.com/oneapi-src/unified-runtime/actions)
3+
[![Build and test](https://github.com/oneapi-src/unified-runtime/actions/workflows/cmake.yml/badge.svg)](https://github.com/oneapi-src/unified-runtime/actions/workflows/cmake.yml)
4+
[![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)
5+
[![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)
46

5-
> **Note**
6-
>
7-
> For those who intend to make a contribution to the project please read our
8-
> [Contribution Guide](https://oneapi-src.github.io/unified-runtime/core/CONTRIB.html)
9-
> for more information.
7+
<!-- TODO: add general description and purpose of the project -->
108

11-
## Contents
9+
## Table of contents
10+
11+
1. [Contents of the repo](#contents-of-the-repo)
12+
2. [Integration](#integration)
13+
- [Weekly tags](#weekly-tags)
14+
3. [Third-Party tools](#third-party-tools)
15+
4. [Building](#building)
16+
- [Windows](#windows)
17+
- [Linux](#linux)
18+
- [CMake standard options](#cmake-standard-options)
19+
- [Additional make targets](#additional-make-targets)
20+
5. [Contributions](#contributions)
21+
- [Adapter naming convention](#adapter-naming-convention)
22+
- [Source code generation](#source-code-generation)
23+
- [Documentation](#documentation)
24+
25+
26+
## Contents of the repo
1227

1328
This repo contains the following:
1429

@@ -41,55 +56,45 @@ add_executable(example example.cpp)
4156
target_link_libraries(example PUBLIC unified-runtime::headers)
4257
```
4358

44-
### Weekly Tags
59+
### Weekly tags
4560

4661
Each Friday at 23:00 UTC time a [prerelease
4762
tag](https://github.com/oneapi-src/unified-runtime/releases) is created which
4863
takes the form `weekly-YYYY-MM-DD`. These tags should be used by downstream
4964
projects which intend to track development closely but maintain a fixed point in
5065
history to avoid pulling potentially breaking changes from the `main` branch.
5166

52-
## Source Code Generation
53-
54-
Code is generated using included [Python scripts](/scripts/README.md).
55-
56-
## Documentation
57-
58-
Documentation is generated from source code using Sphinx.
59-
60-
## Third-Party Tools
67+
## Third-Party tools
6168

6269
Tools can be acquired via instructions in [third_party](/third_party/README.md).
6370

6471
## Building
6572

6673
Requirements:
6774
- C++ compiler with C++17 support
68-
- cmake >= 3.14.0
75+
- [CMake](https://cmake.org/) >= 3.14.0
6976
- clang-format-15.0 (can be installed with `python -m pip install clang-format==15.0.7`)
7077

71-
Project is defined using [CMake](https://cmake.org/).
72-
73-
**Windows**:
78+
### Windows
7479

75-
Generating Visual Studio Project. EXE and binaries will be in **build/bin/{build_config}**
80+
Generating Visual Studio Project. EXE and binaries will be in **build/bin/{build_config}**
7681

77-
~~~~
82+
```bash
7883
$ mkdir build
7984
$ cd build
8085
$ cmake {path_to_source_dir} -G "Visual Studio 15 2017 Win64"
81-
~~~~
86+
```
8287

83-
**Linux**:
88+
### Linux
8489

8590
Executable and binaries will be in **build/bin**
8691

87-
~~~~
92+
```bash
8893
$ mkdir build
8994
$ cd build
9095
$ cmake {path_to_source_dir}
9196
$ make
92-
~~~~
97+
```
9398

9499
### CMake standard options
95100

@@ -98,32 +103,36 @@ List of options provided by CMake:
98103
| Name | Description | Values | Default |
99104
| - | - | - | - |
100105
| UR_BUILD_TESTS | Build the tests | ON/OFF | ON |
106+
| UR_BUILD_TOOLS | Build tools | ON/OFF | ON |
101107
| UR_FORMAT_CPP_STYLE | Format code style | ON/OFF | OFF |
102108
| UR_DEVELOPER_MODE | Treat warnings as errors and enables additional checks | ON/OFF | OFF |
103109
| UR_USE_ASAN | Enable AddressSanitizer | ON/OFF | OFF |
104110
| UR_USE_UBSAN | Enable UndefinedBehavior Sanitizer | ON/OFF | OFF |
105111
| UR_USE_MSAN | Enable MemorySanitizer (clang only) | ON/OFF | OFF |
106112
| UR_ENABLE_TRACING | Enable XPTI-based tracing layer | ON/OFF | OFF |
107-
| UR_BUILD_TOOLS | Build tools | ON/OFF | ON |
108113

109-
**General**:
114+
### Additional make targets
115+
116+
To run automated code formatting, configure CMake with `UR_FORMAT_CPP_STYLE` option
117+
and then run a custom `cppformat` target:
110118

111-
To run automated code formatting build with option `UR_FORMAT_CPP_STYLE` and then run a custom `cppformat` target:
112-
~~~~
119+
```bash
113120
$ make cppformat
114-
~~~~
121+
```
115122

116-
If you've made modifications to the specification, you can also run a custom `generate-code` or `generate` target prior to building.
117-
This call will generate the source code:
118-
~~~~
119-
$ make generate-code
120-
~~~~
123+
If you've made modifications to the specification, you can also run
124+
a custom `generate` target prior to building.
125+
It will generate the source code **and** run automated code formatting:
121126

122-
This call will generate the source code and run automated code formatting:
123-
~~~~
127+
```bash
124128
$ make generate
125-
~~~~
126-
Note: `generate` target requires `UR_FORMAT_CPP_STYLE` to bet set.
129+
```
130+
131+
## Contributions
132+
133+
For those who intend to make a contribution to the project please read our
134+
[Contribution Guide](https://oneapi-src.github.io/unified-runtime/core/CONTRIB.html)
135+
for more information.
127136

128137
### Adapter naming convention
129138

@@ -132,3 +141,12 @@ to use the following naming convention:
132141

133142
* On Linux platforms, use `libur_adapter_[name].so`.
134143
* On Windows platforms, use `ur_adapter_[name].dll`.
144+
145+
### Source code generation
146+
147+
Code is generated using included [Python scripts](/scripts/README.md).
148+
149+
### Documentation
150+
151+
Documentation is generated from source code using Sphinx -
152+
see [scripts dir](/scripts/README.md) for details.

scripts/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ Python dependencies:
44
* [PyYAML](https://pyyaml.org/) v3.13
55
* [Sphinx](https://www.sphinx-doc.org/en/master/) v2.2.2
66

7-
Installing Python dependencies:
8-
~~~~
9-
* Install all python requirements.
10-
~~~~
11-
python -m pip install -r ../third_party/requirements.txt
12-
~~~~
7+
To install all Python dependencies, execute:
8+
```bash
9+
$ python -m pip install -r ../third_party/requirements.txt
10+
```
1311

1412
Documentation is generated from source code using Doxygen.
1513
* [Doxygen](http://www.doxygen.nl/) v1.8.15

0 commit comments

Comments
 (0)