Skip to content

Commit b045532

Browse files
authored
documentation: Add readme on tests and loader versioning (#445)
Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
1 parent f06734a commit b045532

2 files changed

Lines changed: 444 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,80 @@ To generate the code from the scripts, run the following commands:
4747

4848
These scripts update the code with what would be generated in the next specification update.
4949

50+
## Updating the Loader Version
51+
52+
When releasing a new version of the Level Zero Loader, the following steps must be performed:
53+
54+
### 1. Update the Version Number
55+
56+
The loader version is defined in the root [CMakeLists.txt](CMakeLists.txt) file using semantic versioning (https://semver.org/):
57+
58+
```cmake
59+
project(level-zero VERSION 1.28.3)
60+
```
61+
62+
Update the version number according to the type of changes:
63+
* **MAJOR version** (X.0.0): Incompatible API changes
64+
* **MINOR version** (1.X.0): Add functionality in a backward compatible manner
65+
* **PATCH version** (1.28.X): Backward compatible bug fixes
66+
67+
### 2. Update the CHANGELOG.md
68+
69+
Add a new version section at the top of [CHANGELOG.md](CHANGELOG.md) following this format:
70+
71+
```markdown
72+
## v1.28.3
73+
* Brief description of change 1
74+
* Brief description of change 2 with PR reference (#123)
75+
* feature: Description for new features
76+
* fix: Description for bug fixes
77+
```
78+
79+
Guidelines for changelog entries:
80+
* Use present tense for descriptions
81+
* Prefix feature additions with `feature:`
82+
* Prefix bug fixes with `fix:`
83+
* Include PR numbers when applicable using `(#123)` format
84+
* List the most significant changes first
85+
* Keep descriptions concise and user-focused
86+
87+
### 3. Product GUID Management
88+
89+
The `PRODUCT_GUID.txt` file in the root directory stores the version number and a unique GUID for Windows installer packages. **This is managed automatically by CMake** when you update the version:
90+
91+
**Automatic GUID Generation Process:**
92+
1. When CMake runs, it checks if `PRODUCT_GUID.txt` exists
93+
2. If the version in the file doesn't match `PROJECT_VERSION` in CMakeLists.txt, CMake automatically:
94+
* Generates a new UUID using `scripts/generate_wix_guid.py`
95+
* Updates `PRODUCT_GUID.txt` with the new version and GUID
96+
3. The GUID is used for Windows WiX installer generation via `CPACK_WIX_PRODUCT_GUID`
97+
98+
**Manual GUID Update (Rarely Needed):**
99+
If you need to manually generate a new GUID:
100+
```bash
101+
python3 scripts/generate_wix_guid.py
102+
```
103+
104+
Then update `PRODUCT_GUID.txt` with:
105+
```
106+
<version>
107+
<new-guid>
108+
```
109+
110+
**Important Notes:**
111+
* The PRODUCT_GUID should change with each version to ensure proper Windows installer upgrade behavior
112+
* The automatic update happens during CMake configuration, so the file may change after running cmake
113+
* Commit the updated `PRODUCT_GUID.txt` along with version changes
114+
115+
### 4. Version Update Checklist
116+
117+
When preparing a version release:
118+
- [ ] Update version number in [CMakeLists.txt](CMakeLists.txt)
119+
- [ ] Add new version section to [CHANGELOG.md](CHANGELOG.md) with all changes
120+
- [ ] Run CMake to automatically update PRODUCT_GUID.txt
121+
- [ ] Commit all version-related file changes together
122+
- [ ] Create a git tag for the release: `git tag -a v1.28.3 -m "Release v1.28.3"`
123+
- [ ] Verify the version is correctly reflected in build outputs
50124

51125
## Code Review
52126

0 commit comments

Comments
 (0)