Skip to content
Draft
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .pipelines/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
displayName: "CMake ${{ parameters.platform }}"
inputs:
workingDirectory: "."
cmakeArgs: . --fresh -A ${{ parameters.platform }} -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_VERSION=10.0.26100.0 -DPACKAGE_VERSION=$(version.WSL_PACKAGE_VERSION) -DWSL_NUGET_PACKAGE_VERSION=$(version.WSL_NUGET_PACKAGE_VERSION) -DSKIP_PACKAGE_SIGNING=${{ parameters.isRelease }} -DOFFICIAL_BUILD=${{ parameters.isRelease }} -DINCLUDE_PACKAGE_STAGE=${{ or(parameters.isRelease, parameters.isNightly) }} -DPIPELINE_BUILD_ID=$(Build.BuildId) -DVSO_ORG=${{ parameters.vsoOrg }} -DVSO_PROJECT=${{ parameters.vsoProject }} -DWSL_BUILD_WSL_SETTINGS=true -DWSL_INCLUDE_SDK_CSHARP=true $(packageInputDirArg)\${{ parameters.platform }}
cmakeArgs: . --fresh -A ${{ parameters.platform }} -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_VERSION=10.0.26100.0 -DPACKAGE_VERSION=$(version.WSL_PACKAGE_VERSION) -DWSL_NUGET_PACKAGE_VERSION=$(version.WSL_NUGET_PACKAGE_VERSION) -DSKIP_PACKAGE_SIGNING=${{ parameters.isRelease }} -DOFFICIAL_BUILD=${{ parameters.isRelease }} -DINCLUDE_PACKAGE_STAGE=${{ or(parameters.isRelease, parameters.isNightly) }} -DPIPELINE_BUILD_ID=$(Build.BuildId) -DVSO_ORG=${{ parameters.vsoOrg }} -DVSO_PROJECT=${{ parameters.vsoProject }} -DWSL_BUILD_WSL_SETTINGS=true -DWSL_INCLUDE_SDK_CSHARP=true -DWSL_E2E_UNITY_BUILD=ON $(packageInputDirArg)\${{ parameters.platform }}

# Workaround for WSL Settings NuGet restore authentication issue
- script: _deps\nuget.exe restore -NonInteractive
Expand Down
20 changes: 20 additions & 0 deletions test/windows/wslc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,26 @@ set_source_files_properties(${WSLC_TEST_SOURCES}
COMPILE_FLAGS "/Yuprecomp.h"
)

# Opt-in unity build for the e2e tests (~2x faster clean recompile; CI enables it).
option(WSL_E2E_UNITY_BUILD "Unity-batch the wslc e2e test sources" OFF)
set(WSL_E2E_UNITY_BATCH_SIZE 8 CACHE STRING "Unity batch size for wslc e2e tests")

if(WSL_E2E_UNITY_BUILD)
# GROUP mode only batches sources tagged with UNITY_GROUP, so tag e2e sources and leave every other wsltests source untouched.
set_target_properties(wsltests PROPERTIES UNITY_BUILD ON UNITY_BUILD_MODE GROUP)
Comment thread
AmelBawa-msft marked this conversation as resolved.

file(GLOB WSLC_E2E_SOURCES CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/e2e/*.cpp)
set(_e2eIndex 0)
foreach(_e2eSource IN LISTS WSLC_E2E_SOURCES)
math(EXPR _e2eGroup "${_e2eIndex} / ${WSL_E2E_UNITY_BATCH_SIZE}")
set_source_files_properties(${_e2eSource}
TARGET_DIRECTORY wsltests
PROPERTIES UNITY_GROUP "wslc_e2e_${_e2eGroup}"
)
math(EXPR _e2eIndex "${_e2eIndex} + 1")
endforeach()
endif()

# Add include directories needed for WSLC tests.
target_include_directories(wsltests PRIVATE
${CMAKE_SOURCE_DIR}/test
Expand Down
Loading