Skip to content

Commit 699396d

Browse files
committed
labs/lsg: package runtime registry and compiled profiles
1 parent 23f51e4 commit 699396d

3 files changed

Lines changed: 28 additions & 10 deletions

File tree

‎.github/workflows/lsg-android.yml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,14 @@ jobs:
190190
grep 'RMS0 DEBUG MERGE PASS' labs/lsg/viewer/android/app/build/outputs/lsg-debug-merge-profile-$PROFILE.txt
191191
done
192192
193+
mkdir -p labs/lsg/viewer/android/app/src/main/assets/profiles
193194
build-lsg-host/lsg_compile labs/lsg/assets/profiles/character_0.lsg.json /tmp/character_0.lsg
194195
build-lsg-host/lsg_compile labs/lsg/assets/profiles/character_1.lsg.json /tmp/character_1.lsg
195196
build-lsg-host/lsg_compile labs/lsg/assets/profiles/character_2_ada.lsg.json /tmp/character_2.lsg
197+
cp /tmp/character_0.lsg labs/lsg/viewer/android/app/src/main/assets/profiles/character_0.lsg
198+
cp /tmp/character_1.lsg labs/lsg/viewer/android/app/src/main/assets/profiles/character_1.lsg
199+
cp /tmp/character_2.lsg labs/lsg/viewer/android/app/src/main/assets/profiles/character_2.lsg
200+
cp labs/lsg/assets/registry.lsgr labs/lsg/viewer/android/app/src/main/assets/registry.lsgr
196201
test -s labs/lsg/viewer/android/app/src/main/assets/meshes/human_carrier_male.rmesh
197202
test -s labs/lsg/viewer/android/app/src/main/assets/meshes/human_carrier_female.rmesh
198203
test -s labs/lsg/viewer/android/app/src/main/assets/meshes/eye_carrier_male.rmesh
@@ -250,6 +255,10 @@ jobs:
250255
grep 'assets/shaders/eye.frag.spv' /tmp/apk-files.txt
251256
grep 'assets/meshes/eye_carrier_male.rmesh' /tmp/apk-files.txt
252257
grep 'assets/meshes/eye_carrier_female.rmesh' /tmp/apk-files.txt
258+
grep 'assets/registry.lsgr' /tmp/apk-files.txt
259+
grep 'assets/profiles/character_0.lsg' /tmp/apk-files.txt
260+
grep 'assets/profiles/character_1.lsg' /tmp/apk-files.txt
261+
grep 'assets/profiles/character_2.lsg' /tmp/apk-files.txt
253262
if grep -Eq 'assets/meshes/(human|eye)_profile_2\.rmesh' /tmp/apk-files.txt; then
254263
echo 'unexpected Character 2 carrier duplicate found in APK'
255264
exit 1

‎.github/workflows/lsg-windows.yml‎

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,19 +163,21 @@ jobs:
163163
if ($LASTEXITCODE -ne 0) { throw "profile $profile debug merge failed" }
164164
}
165165
166-
& build-lsg-win\Release\lsg_compile.exe labs\lsg\assets\profiles\character_0.lsg.json build-lsg-win\Release\character_0.lsg
167-
& build-lsg-win\Release\lsg_compile.exe labs\lsg\assets\profiles\character_1.lsg.json build-lsg-win\Release\character_1.lsg
168-
& build-lsg-win\Release\lsg_compile.exe labs\lsg\assets\profiles\character_2_ada.lsg.json build-lsg-win\Release\character_2.lsg
166+
New-Item -ItemType Directory -Force build-lsg-win\Release\profiles | Out-Null
167+
& build-lsg-win\Release\lsg_compile.exe labs\lsg\assets\profiles\character_0.lsg.json build-lsg-win\Release\profiles\character_0.lsg
168+
& build-lsg-win\Release\lsg_compile.exe labs\lsg\assets\profiles\character_1.lsg.json build-lsg-win\Release\profiles\character_1.lsg
169+
& build-lsg-win\Release\lsg_compile.exe labs\lsg\assets\profiles\character_2_ada.lsg.json build-lsg-win\Release\profiles\character_2.lsg
170+
Copy-Item labs\lsg\assets\registry.lsgr build-lsg-win\Release\registry.lsgr -Force
169171
if (!(Test-Path 'build-lsg-win\Release\meshes\human_carrier_male.rmesh')) { throw 'Male carrier RMS0 missing' }
170172
if (!(Test-Path 'build-lsg-win\Release\meshes\human_carrier_female.rmesh')) { throw 'Female carrier RMS0 missing' }
171173
if (!(Test-Path 'build-lsg-win\Release\meshes\eye_carrier_male.rmesh')) { throw 'Male eye carrier RMS0 missing' }
172174
if (!(Test-Path 'build-lsg-win\Release\meshes\eye_carrier_female.rmesh')) { throw 'Female eye carrier RMS0 missing' }
173175
if ((Get-FileHash build-lsg-win\Release\meshes\human_carrier_male.rmesh).Hash -eq (Get-FileHash build-lsg-win\Release\meshes\human_carrier_female.rmesh).Hash) {
174176
throw 'macro profile meshes are unexpectedly identical'
175177
}
176-
if (!(Test-Path 'build-lsg-win\Release\character_0.lsg')) { throw 'Character 0 genome missing' }
177-
if (!(Test-Path 'build-lsg-win\Release\character_1.lsg')) { throw 'Character 1 genome missing' }
178-
if (!(Test-Path 'build-lsg-win\Release\character_2.lsg')) { throw 'Character 2 / Ada genome missing' }
178+
if (!(Test-Path 'build-lsg-win\Release\profiles\character_0.lsg')) { throw 'Character 0 genome missing' }
179+
if (!(Test-Path 'build-lsg-win\Release\profiles\character_1.lsg')) { throw 'Character 1 genome missing' }
180+
if (!(Test-Path 'build-lsg-win\Release\profiles\character_2.lsg')) { throw 'Character 2 / Ada genome missing' }
179181
180182
- name: Build tests and viewer
181183
run: cmake --build build-lsg-win --config Release --target rengine_lsg_tests lsg_shadow_filter_tests rengine_lsg_viewer --parallel 2
@@ -186,9 +188,9 @@ jobs:
186188
run: |
187189
& build-lsg-win\Release\lsg_report.exe `
188190
build-lsg-win\Release `
189-
build-lsg-win\Release\character_0.lsg `
190-
build-lsg-win\Release\character_1.lsg `
191-
build-lsg-win\Release\character_2.lsg `
191+
build-lsg-win\Release\profiles\character_0.lsg `
192+
build-lsg-win\Release\profiles\character_1.lsg `
193+
build-lsg-win\Release\profiles\character_2.lsg `
192194
| Tee-Object -FilePath build-lsg-win\Release\lsg-acceptance-report.txt
193195
if ($LASTEXITCODE -ne 0) { throw 'LSG storage contract failed' }
194196
if (-not (Select-String -Path build-lsg-win\Release\lsg-acceptance-report.txt -Pattern 'LSG STORAGE CONTRACT PASS' -Quiet)) {
@@ -220,6 +222,10 @@ jobs:
220222
if (!(Test-Path 'build-lsg-win\Release\meshes\eye_carrier_male.rmesh')) { throw 'Male eye carrier RMS0 missing beside EXE' }
221223
if (!(Test-Path 'build-lsg-win\Release\meshes\eye_carrier_female.rmesh')) { throw 'Female eye carrier RMS0 missing beside EXE' }
222224
if (Test-Path 'build-lsg-win\Release\meshes\eye_profile_2.rmesh') { throw 'Unexpected Character 2 eye carrier duplicate beside EXE' }
225+
if (!(Test-Path 'build-lsg-win\Release\registry.lsgr')) { throw 'runtime registry missing beside EXE' }
226+
if (!(Test-Path 'build-lsg-win\Release\profiles\character_0.lsg')) { throw 'runtime profile 0 missing beside EXE' }
227+
if (!(Test-Path 'build-lsg-win\Release\profiles\character_1.lsg')) { throw 'runtime profile 1 missing beside EXE' }
228+
if (!(Test-Path 'build-lsg-win\Release\profiles\character_2.lsg')) { throw 'runtime profile 2 missing beside EXE' }
223229
if (!(Test-Path 'build-lsg-win\Release\lsg-acceptance-report.txt')) { throw 'storage report missing' }
224230
if (!(Test-Path 'build-lsg-win\Release\lsg-mesh-audit-profile-0.txt')) { throw 'Character 0 mesh continuity report missing' }
225231
if (!(Test-Path 'build-lsg-win\Release\lsg-mesh-audit-profile-1.txt')) { throw 'Character 1 mesh continuity report missing' }
@@ -230,6 +236,8 @@ jobs:
230236
build-lsg-win/Release/rengine_lsg_viewer.exe
231237
build-lsg-win/Release/shaders
232238
build-lsg-win/Release/meshes
239+
build-lsg-win/Release/profiles
240+
build-lsg-win/Release/registry.lsgr
233241
build-lsg-win/Release/lsg-acceptance-report.txt
234242
build-lsg-win/Release/lsg-mesh-audit-profile-0.txt
235243
build-lsg-win/Release/lsg-mesh-audit-profile-1.txt

‎labs/lsg/CMakeLists.txt‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ elseif(WIN32 AND RENGINE_LSG_BUILD_VIEWER)
150150
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LSG_VERTEX_SPV} "$<TARGET_FILE_DIR:rengine_lsg_viewer>/shaders/human.vert.spv"
151151
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LSG_FRAGMENT_SPV} "$<TARGET_FILE_DIR:rengine_lsg_viewer>/shaders/human.frag.spv"
152152
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LSG_EYE_VERTEX_SPV} "$<TARGET_FILE_DIR:rengine_lsg_viewer>/shaders/eye.vert.spv"
153-
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LSG_EYE_FRAGMENT_SPV} "$<TARGET_FILE_DIR:rengine_lsg_viewer>/shaders/eye.frag.spv")
153+
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LSG_EYE_FRAGMENT_SPV} "$<TARGET_FILE_DIR:rengine_lsg_viewer>/shaders/eye.frag.spv"
154+
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/assets/registry.lsgr "$<TARGET_FILE_DIR:rengine_lsg_viewer>/registry.lsgr")
154155
elseif(RENGINE_LSG_BUILD_VIEWER)
155156
message(STATUS "LSG desktop viewer currently targets Win32; non-Windows viewer skipped")
156157
endif()

0 commit comments

Comments
 (0)