Skip to content

Commit bd4371b

Browse files
committed
copy examples to CE container in the build time
1 parent 3b3d45c commit bd4371b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tools/nsc/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ endif()
166166

167167
make_directory("${NBL_DOCKER_CTX_DIR}/Runtimes")
168168
make_directory("${NBL_DOCKER_CTX_DIR}/Nabla")
169+
make_directory("${NBL_DOCKER_CTX_DIR}/Examples")
169170
execute_process(
170171
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${DXIL_DLL}" "${NBL_DOCKER_CTX_DIR}/Runtimes"
171172
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${UCRTBASED_DLL}" "${NBL_DOCKER_CTX_DIR}/Runtimes"
@@ -206,6 +207,9 @@ COPY --link --from=compress ["C:/pack/windows-artifacts.tar.zst", "C:/pack/"]
206207
COPY --link --from=compress ["C:/pack/nabla-artifacts.tar.zst", "C:/pack/"]
207208
COPY hlsl.local.properties.cmake C:/Compiler-Explorer/etc/config/hlsl.local.properties
208209
210+
# counting sort
211+
COPY --link Examples/ C:/Compiler-Explorer/examples/hlsl/
212+
209213
ENV NBL_INSTALL_DIRECTORY=@NBL_DOCKER_CT_NSC_VOLUME_TARGET@ `
210214
NBL_EXPLICIT_MODULE_LOAD_LOG=ON
211215
@@ -263,6 +267,8 @@ set(NBL_CE_HEALTHY_CHECK_PY "${NBL_ROOT_PATH}/docker/compiler-explorer/ce_health
263267
set(NBL_CE_ENDPOINT_PY "${NBL_ROOT_PATH}/docker/compiler-explorer/endpoint.py")
264268
set(NBL_NSC_BASIC_HLSL_JPAYLOAD "${CMAKE_CURRENT_SOURCE_DIR}/docker/godbolt/hlsl-basic-compile-payload.json")
265269

270+
get_target_property(NBL_CE_COUNTING_SORT_EXAMPLE_PATH countingsort SOURCE_DIR)
271+
266272
# to avoid "too long input" errors we proxy build instructions to CMake script and write it to build directory
267273
string(CONFIGURE [=[
268274
message(STATUS "Killing remaining NSC orphans")
@@ -306,6 +312,11 @@ execute_process(COMMAND "@CMAKE_COMMAND@" -E copy_directory_if_different
306312
COMMAND_ERROR_IS_FATAL ANY
307313
)
308314
315+
message(STATUS "Copying examples")
316+
execute_process(
317+
COMMAND "@CMAKE_COMMAND@" -E copy_directory_if_different "@NBL_CE_COUNTING_SORT_EXAMPLE_PATH@/app_resources/" "@NBL_DOCKER_CTX_DIR@/Examples/"
318+
)
319+
309320
message(STATUS "Building NSC Godbolt image")
310321
string(TIMESTAMP BUILD_TIMESTAMP "%Y-%m-%dT%H:%M:%SZ" UTC)
311322
execute_process(COMMAND "@DOCKER_EXE@" build --isolation process

0 commit comments

Comments
 (0)