Skip to content

Commit 0b88c57

Browse files
committed
Refresh README documentation
1 parent 452935b commit 0b88c57

2 files changed

Lines changed: 85 additions & 4 deletions

File tree

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<p align="center">
66
<a href="https://github.com/Devsh-Graphics-Programming/Nabla-Asset-Manifests/actions/workflows/smoke.yml">
7-
<img src="https://github.com/Devsh-Graphics-Programming/Nabla-Asset-Manifests/actions/workflows/smoke.yml/badge.svg" alt="Build Status" /></a>
7+
<img src="https://github.com/Devsh-Graphics-Programming/Nabla-Asset-Manifests/actions/workflows/smoke.yml/badge.svg" alt="Smoke Status" /></a>
88
<a href="https://opensource.org/licenses/Apache-2.0">
99
<img src="https://img.shields.io/badge/license-Apache%202.0-blue" alt="License: Apache 2.0" /></a>
1010
<a href="https://discord.gg/krsBcABm7u">
@@ -25,6 +25,19 @@ looks deceptively harmless because it is "just for examples", but it is already
2525

2626
The core argument is simple. Source control should keep code and small reviewable metadata. Heavy payloads should stay outside normal Git history.
2727

28+
Today this repository provides:
29+
30+
- the public consumer entrypoint `nam_add_channel_target(...)`
31+
- consumer integration based only on public `CMake ExternalData` APIs
32+
- `GitHub Release assets` as the first backend
33+
- standalone payloads published as files
34+
- bundle payloads published as `zip` files and kept as `zip` files in the build tree
35+
- build-time materialization that auto-detects the lightest supported file mode once per configure
36+
- a `NO_SYMLINKS` escape hatch for forced copy mode
37+
- a local `smoke/` consumer plus a `2 x 3` Windows/Linux CI matrix for `symlink`, `hardlink`, and `copy`
38+
39+
For consumer details see [cmake/README.md](cmake/README.md).
40+
2841
## Model
2942

3043
The intended direction is:

cmake/README.md

Lines changed: 71 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,11 @@ nam_add_channel_target(
5757
- `REPO = Devsh-Graphics-Programming/Nabla-Asset-Manifests`
5858
- `TAG = media`
5959
- `DESTINATION_ROOT = ${CMAKE_CURRENT_BINARY_DIR}`
60+
- `ITEMS = <all asset keys in CHANNEL>`
6061
- `CACHE_ROOT = <ENTRY>/nabla/assets`
6162
- `SHOW_PROGRESS = ON`
63+
- `NO_SYMLINKS = OFF`
64+
- `VERBOSE = OFF`
6265

6366
`<ENTRY>` resolves per platform:
6467

@@ -105,12 +108,17 @@ The resulting model is:
105108

106109
- one shared local object store per user
107110
- content-addressed objects under `.../objects/SHA256/<hash>`
108-
- generated content links under `nam-data/<target>/` in the consumer source tree
111+
- generated `.sha256` references under `<channel>/...` in the consumer source tree
112+
- intermediate `ExternalData` build outputs under `${CMAKE_CURRENT_BINARY_DIR}/.nam/<target>/assets`
109113
- normal build targets for consumers
110114

111115
During configure the module probes the current host once and selects the
112-
lightest supported file materialization mode. On the current Windows host this
113-
resolves to `hardlink`.
116+
lightest supported file materialization mode.
117+
118+
Current detection order is:
119+
120+
- Windows: `hardlink`, then `symlink`, then `copy`
121+
- non-Windows: `symlink`, then `hardlink`, then `copy`
114122

115123
At build time:
116124

@@ -128,6 +136,66 @@ By default the module prints only:
128136
- one short configure summary
129137
- the normal build-time `ExternalData` output
130138

139+
## Smoke consumer
140+
141+
The repository also includes a minimal smoke consumer under `smoke/`.
142+
143+
Its local options are:
144+
145+
- `NAM_SMOKE_LINK_MODE = auto|symlink|hardlink|copy`
146+
- `NAM_SMOKE_CACHE_ROOT = <path>`
147+
- `NAM_SMOKE_NO_SYMLINKS = ON|OFF`
148+
149+
Those options are for smoke verification only. They are not part of the public
150+
consumer module API.
151+
152+
The GitHub Actions workflow under `.github/workflows/smoke.yml` uses that smoke
153+
consumer to verify:
154+
155+
- Windows and Linux runners
156+
- explicit `symlink`, `hardlink`, and `copy` modes
157+
- shared cache reuse via `${{ github.workspace }}/.nam-cache`
158+
- post-build size and materialization statistics
159+
160+
Typical local smoke runs are:
161+
162+
```powershell
163+
cmake -S smoke -B smoke/build
164+
cmake --build smoke/build --config Debug --target media -- /m:1
165+
```
166+
167+
```bash
168+
cmake -S smoke -B smoke/build
169+
cmake --build smoke/build --target media -- -j1
170+
```
171+
172+
Forced copy mode:
173+
174+
```powershell
175+
cmake -S smoke -B smoke/build -DNAM_SMOKE_NO_SYMLINKS=ON
176+
cmake --build smoke/build --config Debug --target media -- /m:1
177+
```
178+
179+
```bash
180+
cmake -S smoke -B smoke/build -DNAM_SMOKE_NO_SYMLINKS=ON
181+
cmake --build smoke/build --target media -- -j1
182+
```
183+
184+
Explicit smoke-only mode overrides:
185+
186+
```powershell
187+
cmake -S smoke -B smoke/build -DNAM_SMOKE_LINK_MODE=symlink
188+
cmake -S smoke -B smoke/build -DNAM_SMOKE_LINK_MODE=hardlink
189+
cmake -S smoke -B smoke/build -DNAM_SMOKE_LINK_MODE=copy
190+
```
191+
192+
The smoke verification script then reports:
193+
194+
- per-tree materialization counts
195+
- logical size of the materialized tree
196+
- estimated extra disk cost of the chosen mode
197+
- explicit sample checks for `Stanford_Bunny.stl` and `yellowflower.zip`
198+
131199
## Maintainer flow
132200

133201
Maintainers do not maintain a separate consumer catalog.

0 commit comments

Comments
 (0)