Skip to content

Commit e2ba410

Browse files
committed
Add flattened release smoke support
1 parent 375d7c5 commit e2ba410

5 files changed

Lines changed: 440 additions & 14 deletions

File tree

.github/workflows/smoke.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,89 @@ jobs:
7474
--cache-root $env:NAM_CACHE_ROOT `
7575
--expected-mode ${{ matrix.link_mode }} `
7676
--forbid-tree .nam/media/assets
77+
78+
smoke-flatten:
79+
name: flatten / ${{ matrix.os }} / ${{ matrix.link_mode }}
80+
runs-on: ${{ matrix.os }}
81+
timeout-minutes: 20
82+
strategy:
83+
fail-fast: false
84+
matrix:
85+
os:
86+
- ubuntu-latest
87+
- windows-latest
88+
link_mode:
89+
- hardlink
90+
include:
91+
- os: ubuntu-latest
92+
native_build_arg: -j1
93+
- os: windows-latest
94+
native_build_arg: /m:1
95+
96+
env:
97+
GH_TOKEN: ${{ github.token }}
98+
NAM_CACHE_ROOT: ${{ github.workspace }}/.nam-cache-flat
99+
SMOKE_BUILD_DIR: ${{ github.workspace }}/smoke/build-flat
100+
SMOKE_MANIFEST_DIR: ${{ github.workspace }}/official-manifests
101+
102+
steps:
103+
- uses: actions/checkout@v6
104+
105+
- name: Download smoke-flatten manifests
106+
shell: pwsh
107+
run: |
108+
cmake -E rm -rf $env:SMOKE_MANIFEST_DIR
109+
cmake -E make_directory $env:SMOKE_MANIFEST_DIR
110+
gh release download smoke-flatten `
111+
--repo Devsh-Graphics-Programming/Nabla-Asset-Manifests `
112+
--pattern smoke-flatten-manifests.zip `
113+
--dir $env:GITHUB_WORKSPACE
114+
Expand-Archive `
115+
-Path "$env:GITHUB_WORKSPACE/smoke-flatten-manifests.zip" `
116+
-DestinationPath $env:SMOKE_MANIFEST_DIR `
117+
-Force
118+
119+
- name: Restore NAM flat cache
120+
uses: actions/cache@v5
121+
with:
122+
path: ${{ env.NAM_CACHE_ROOT }}
123+
key: nam-flat-cache-${{ runner.os }}-smoke-flatten-v1
124+
restore-keys: |
125+
nam-flat-cache-${{ runner.os }}-
126+
127+
- name: Configure flatten smoke
128+
shell: pwsh
129+
run: |
130+
cmake -E rm -rf $env:SMOKE_BUILD_DIR
131+
cmake -E make_directory $env:NAM_CACHE_ROOT
132+
$cmakeArgs = @(
133+
'-S', 'smoke',
134+
'-B', $env:SMOKE_BUILD_DIR,
135+
"-DNAM_SMOKE_CACHE_ROOT=$env:NAM_CACHE_ROOT",
136+
"-DNAM_SMOKE_MANIFEST_ROOT=$env:SMOKE_MANIFEST_DIR",
137+
'-DNAM_SMOKE_REPO=Devsh-Graphics-Programming/Nabla-Asset-Manifests',
138+
'-DNAM_SMOKE_TAG=smoke-flatten',
139+
'-DNAM_SMOKE_CHANNEL=smoke-flatten',
140+
'-DNAM_SMOKE_FLAT_RELEASE_ASSET_NAMES=ON',
141+
"-DNAM_SMOKE_LINK_MODE=${{ matrix.link_mode }}"
142+
)
143+
& cmake @cmakeArgs
144+
145+
- name: Build flatten smoke
146+
shell: pwsh
147+
run: cmake --build $env:SMOKE_BUILD_DIR --config Debug --target media -- ${{ matrix.native_build_arg }}
148+
149+
- name: Verify flatten materialization stats
150+
shell: pwsh
151+
run: |
152+
python smoke/ci/verify_materialization.py `
153+
--build-dir $env:SMOKE_BUILD_DIR `
154+
--cache-root $env:NAM_CACHE_ROOT `
155+
--expected-mode ${{ matrix.link_mode }} `
156+
--root-subdir smoke-flatten `
157+
--require-path alpha/config.dummy `
158+
--require-path gamma/tools/run.dummy `
159+
--require-path theta/one/two/three/value.dummy `
160+
--require-path lambda/modules/deep/config.dummy `
161+
--forbid-substring __ `
162+
--forbid-tree .nam/smoke-flatten/assets

0 commit comments

Comments
 (0)