From ae78b90fa3f28c736a0fb5b8c975cde591f728c7 Mon Sep 17 00:00:00 2001 From: Radek Zikmund Date: Tue, 19 Mar 2024 13:27:04 +0100 Subject: [PATCH 1/6] Use same base image for building HttpStress and SslStress as .NET runtime. --- eng/pipelines/libraries/stress/ssl.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/libraries/stress/ssl.yml b/eng/pipelines/libraries/stress/ssl.yml index 1052d3b04285c7..036c2ea8bcbaa7 100644 --- a/eng/pipelines/libraries/stress/ssl.yml +++ b/eng/pipelines/libraries/stress/ssl.yml @@ -62,13 +62,13 @@ extends: timeoutInMinutes: 120 pool: name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals 1es-windows-2022-open - variables: + demands: ImageOverride -equals windows.vs2022preview.amd64.open + # variables: # The 1es-windows-2022-open image has an issue where the Chocolatey-installed V1 docker-compose takes precendence over the # V2 docker-compose required by the stress tests, see: https://github.com/actions/runner-images/issues/7080 # This is worked around by handpicking the V2 executable. # The workaround should be removed when the official fix is propagated into 1es-windows-2022-open, or when we switch to another image. - DOCKER_COMPOSE_CMD: "C:/ProgramData/docker/cli-plugins/docker-compose.exe" + # DOCKER_COMPOSE_CMD: "C:/ProgramData/docker/cli-plugins/docker-compose.exe" steps: - checkout: self clean: true From 041abe4831df84ecb57cf7a9d5d13d8624f81227 Mon Sep 17 00:00:00 2001 From: Radek Zikmund Date: Tue, 19 Mar 2024 14:27:37 +0100 Subject: [PATCH 2/6] test --- eng/docker/build-docker-sdk.ps1 | 9 ++++++--- eng/pipelines/libraries/stress/ssl.yml | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/eng/docker/build-docker-sdk.ps1 b/eng/docker/build-docker-sdk.ps1 index 1a09343defbf6e..c942fc80fe2f69 100755 --- a/eng/docker/build-docker-sdk.ps1 +++ b/eng/docker/build-docker-sdk.ps1 @@ -18,6 +18,9 @@ $dockerFilePrefix="$PSScriptRoot/libraries-sdk" if ($buildWindowsContainers) { + write-host "Dumping present MSVC versions" + gci "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/*" + # Due to size concerns, we don't currently do docker builds on windows. # Build on the host machine, then simply copy artifacts to the target docker image. # This should result in significantly lower build times, for now. @@ -29,7 +32,7 @@ if ($buildWindowsContainers) } $dockerFile="$dockerFilePrefix.windows.Dockerfile" - + # Collect the following artifacts to folder, that will be used as build context for the container, # so projects can build and test against the live-built runtime: # 1. Reference assembly pack (microsoft.netcore.app.ref) @@ -54,13 +57,13 @@ if ($buildWindowsContainers) -Destination $dockerContext\targetingpacks.targets Copy-Item -Recurse -Path $REPO_ROOT_DIR\src\libraries\System.Net.Quic\src\System\Net\Quic\Interop ` -Destination $dockerContext\msquic-interop - + # In case of non-CI builds, testhost may already contain Microsoft.AspNetCore.App (see build-local.ps1 in HttpStress): $testHostAspNetCorePath="$dockerContext\testhost\net$dotNetVersion-windows-$configuration-x64/shared/Microsoft.AspNetCore.App" if (Test-Path $testHostAspNetCorePath) { Remove-Item -Recurse -Force $testHostAspNetCorePath } - + docker build --tag $imageName ` --build-arg CONFIGURATION=$configuration ` --file $dockerFile ` diff --git a/eng/pipelines/libraries/stress/ssl.yml b/eng/pipelines/libraries/stress/ssl.yml index 036c2ea8bcbaa7..1052d3b04285c7 100644 --- a/eng/pipelines/libraries/stress/ssl.yml +++ b/eng/pipelines/libraries/stress/ssl.yml @@ -62,13 +62,13 @@ extends: timeoutInMinutes: 120 pool: name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals windows.vs2022preview.amd64.open - # variables: + demands: ImageOverride -equals 1es-windows-2022-open + variables: # The 1es-windows-2022-open image has an issue where the Chocolatey-installed V1 docker-compose takes precendence over the # V2 docker-compose required by the stress tests, see: https://github.com/actions/runner-images/issues/7080 # This is worked around by handpicking the V2 executable. # The workaround should be removed when the official fix is propagated into 1es-windows-2022-open, or when we switch to another image. - # DOCKER_COMPOSE_CMD: "C:/ProgramData/docker/cli-plugins/docker-compose.exe" + DOCKER_COMPOSE_CMD: "C:/ProgramData/docker/cli-plugins/docker-compose.exe" steps: - checkout: self clean: true From 4bd0bde285f464c6106afce5a933942ecbd26f02 Mon Sep 17 00:00:00 2001 From: Radek Zikmund Date: Tue, 19 Mar 2024 14:57:03 +0100 Subject: [PATCH 3/6] test --- eng/docker/build-docker-sdk.ps1 | 5 +++++ eng/native/gen-buildsys.cmd | 2 ++ 2 files changed, 7 insertions(+) diff --git a/eng/docker/build-docker-sdk.ps1 b/eng/docker/build-docker-sdk.ps1 index c942fc80fe2f69..6af1a6ddf9a9ff 100755 --- a/eng/docker/build-docker-sdk.ps1 +++ b/eng/docker/build-docker-sdk.ps1 @@ -20,6 +20,11 @@ if ($buildWindowsContainers) { write-host "Dumping present MSVC versions" gci "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/*" + gi "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.38.33130" + gi "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.38.33130/bin" + gi "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.38.33130/bin/HostX64" + gi "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.38.33130/bin/HostX64/x64" + gi "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.38.33130/bin/HostX64/x64/cl.exe" # Due to size concerns, we don't currently do docker builds on windows. # Build on the host machine, then simply copy artifacts to the target docker image. diff --git a/eng/native/gen-buildsys.cmd b/eng/native/gen-buildsys.cmd index f67f17b8d47942..b830a17c11b2d8 100644 --- a/eng/native/gen-buildsys.cmd +++ b/eng/native/gen-buildsys.cmd @@ -106,6 +106,8 @@ if not "%__ConfigureOnly%" == "1" ( ) ) +echo %path% + if /i "%__UseEmcmake%" == "1" ( call "!EMSDK_PATH!/emsdk_env.bat" > nul 2>&1 && emcmake "%CMakePath%" %__ExtraCmakeParams% --no-warn-unused-cli -G "%__CmakeGenerator%" -B %__IntermediatesDir% -S %__SourceDir% ) else ( From ee8ddbb44889c37eaea9d35162a4d9308226a926 Mon Sep 17 00:00:00 2001 From: Radek Zikmund Date: Tue, 19 Mar 2024 19:18:47 +0100 Subject: [PATCH 4/6] another attempt --- eng/docker/build-docker-sdk.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eng/docker/build-docker-sdk.ps1 b/eng/docker/build-docker-sdk.ps1 index 6af1a6ddf9a9ff..19c16104fe0c62 100755 --- a/eng/docker/build-docker-sdk.ps1 +++ b/eng/docker/build-docker-sdk.ps1 @@ -20,12 +20,17 @@ if ($buildWindowsContainers) { write-host "Dumping present MSVC versions" gci "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/*" - gi "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.38.33130" + +# gi "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.38.33130" + gi "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.38.33130/bin" gi "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.38.33130/bin/HostX64" gi "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.38.33130/bin/HostX64/x64" gi "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.38.33130/bin/HostX64/x64/cl.exe" + write-host "Removing older MSVC versions" + rm -r -fo "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.37.32822" + # Due to size concerns, we don't currently do docker builds on windows. # Build on the host machine, then simply copy artifacts to the target docker image. # This should result in significantly lower build times, for now. From 5025e1c5eb093198a50eb447e8b367b476c45b0c Mon Sep 17 00:00:00 2001 From: Radek Zikmund Date: Tue, 19 Mar 2024 19:42:29 +0100 Subject: [PATCH 5/6] try controlling MSVC version explicitly by CMAKE env vars --- eng/docker/build-docker-sdk.ps1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/eng/docker/build-docker-sdk.ps1 b/eng/docker/build-docker-sdk.ps1 index 19c16104fe0c62..56c6a9ee7ef108 100755 --- a/eng/docker/build-docker-sdk.ps1 +++ b/eng/docker/build-docker-sdk.ps1 @@ -19,6 +19,7 @@ $dockerFilePrefix="$PSScriptRoot/libraries-sdk" if ($buildWindowsContainers) { write-host "Dumping present MSVC versions" + gci "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/*" # gi "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.38.33130" @@ -28,8 +29,10 @@ if ($buildWindowsContainers) gi "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.38.33130/bin/HostX64/x64" gi "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.38.33130/bin/HostX64/x64/cl.exe" - write-host "Removing older MSVC versions" - rm -r -fo "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.37.32822" + write-host "specifying explicit MSVC version" + + $ENV:CMAKE_VS_PLATFORM_TOOLSET="v143,version=14.38" + $ENV:CMAKE_GENERATOR_TOOLSET="v143,version=14.38" # Due to size concerns, we don't currently do docker builds on windows. # Build on the host machine, then simply copy artifacts to the target docker image. From 0daac3d08456aa975d42addc5427084532180635 Mon Sep 17 00:00:00 2001 From: Radek Zikmund Date: Tue, 19 Mar 2024 20:12:52 +0100 Subject: [PATCH 6/6] Specify generator --- eng/docker/build-docker-sdk.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/docker/build-docker-sdk.ps1 b/eng/docker/build-docker-sdk.ps1 index 56c6a9ee7ef108..4f12264e521425 100755 --- a/eng/docker/build-docker-sdk.ps1 +++ b/eng/docker/build-docker-sdk.ps1 @@ -33,6 +33,7 @@ if ($buildWindowsContainers) $ENV:CMAKE_VS_PLATFORM_TOOLSET="v143,version=14.38" $ENV:CMAKE_GENERATOR_TOOLSET="v143,version=14.38" + $ENV:CMAKE_GENERATOR="Visual Studio 17 2022" # Due to size concerns, we don't currently do docker builds on windows. # Build on the host machine, then simply copy artifacts to the target docker image.