Skip to content

copy examples to CE container in the build time #886

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tools/nsc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ endif()

make_directory("${NBL_DOCKER_CTX_DIR}/Runtimes")
make_directory("${NBL_DOCKER_CTX_DIR}/Nabla")
make_directory("${NBL_DOCKER_CTX_DIR}/Examples")
execute_process(
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${DXIL_DLL}" "${NBL_DOCKER_CTX_DIR}/Runtimes"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${UCRTBASED_DLL}" "${NBL_DOCKER_CTX_DIR}/Runtimes"
Expand Down Expand Up @@ -206,6 +207,9 @@ COPY --link --from=compress ["C:/pack/windows-artifacts.tar.zst", "C:/pack/"]
COPY --link --from=compress ["C:/pack/nabla-artifacts.tar.zst", "C:/pack/"]
COPY hlsl.local.properties.cmake C:/Compiler-Explorer/etc/config/hlsl.local.properties

# counting sort
COPY --link Examples/ C:/Compiler-Explorer/examples/hlsl/

ENV NBL_INSTALL_DIRECTORY=@NBL_DOCKER_CT_NSC_VOLUME_TARGET@ `
NBL_EXPLICIT_MODULE_LOAD_LOG=ON

Expand Down Expand Up @@ -263,6 +267,8 @@ set(NBL_CE_HEALTHY_CHECK_PY "${NBL_ROOT_PATH}/docker/compiler-explorer/ce_health
set(NBL_CE_ENDPOINT_PY "${NBL_ROOT_PATH}/docker/compiler-explorer/endpoint.py")
set(NBL_NSC_BASIC_HLSL_JPAYLOAD "${CMAKE_CURRENT_SOURCE_DIR}/docker/godbolt/hlsl-basic-compile-payload.json")

get_target_property(NBL_CE_COUNTING_SORT_EXAMPLE_PATH countingsort SOURCE_DIR)

# to avoid "too long input" errors we proxy build instructions to CMake script and write it to build directory
string(CONFIGURE [=[
message(STATUS "Killing remaining NSC orphans")
Expand Down Expand Up @@ -306,6 +312,11 @@ execute_process(COMMAND "@CMAKE_COMMAND@" -E copy_directory_if_different
COMMAND_ERROR_IS_FATAL ANY
)

message(STATUS "Copying examples")
execute_process(
COMMAND "@CMAKE_COMMAND@" -E copy_directory_if_different "@NBL_CE_COUNTING_SORT_EXAMPLE_PATH@/app_resources/" "@NBL_DOCKER_CTX_DIR@/Examples/"
)

message(STATUS "Building NSC Godbolt image")
string(TIMESTAMP BUILD_TIMESTAMP "%Y-%m-%dT%H:%M:%SZ" UTC)
execute_process(COMMAND "@DOCKER_EXE@" build --isolation process
Expand Down
Loading