diff --git a/eng/pipelines/templates/jobs/ci.tests.yml b/eng/pipelines/templates/jobs/ci.tests.yml index 19d7dd6535..b5778797e0 100644 --- a/eng/pipelines/templates/jobs/ci.tests.yml +++ b/eng/pipelines/templates/jobs/ci.tests.yml @@ -76,6 +76,8 @@ jobs: value: "" - name: CmakeArgs value: "" + - name: VcpkgArgs + value: "" # Apply to all services running public pipeline - name: AZURE_TEST_MODE value: "PLAYBACK" @@ -142,6 +144,7 @@ jobs: ServiceDirectory: ${{ parameters.ServiceDirectory }} GenerateArgs: "$(CmakeArgs)" BuildArgs: "$(BuildArgs)" + VcpkgArgs: "$(VcpkgArgs)" Env: "$(CmakeEnvArg)" - ${{ parameters.PreTestSteps }} @@ -223,6 +226,7 @@ jobs: -OsVMImage '$(OSVmImage)' -CmakeEnvArg '$(CmakeEnvArg)' -BuildArgs '$(BuildArgs)' + -VcpkgArgs '$(VcpkgArgs)' -Job '$(Agent.JobName)' -BuildReason '$(Build.Reason)' -SourceBranch '$(Build.SourceBranch)' diff --git a/eng/pipelines/templates/jobs/live.tests.yml b/eng/pipelines/templates/jobs/live.tests.yml index d9783e7b89..ec366dfb52 100644 --- a/eng/pipelines/templates/jobs/live.tests.yml +++ b/eng/pipelines/templates/jobs/live.tests.yml @@ -62,6 +62,7 @@ jobs: CMOCKA_MESSAGE_OUTPUT: "xml" AZURE_ENABLE_STATIC_ANALYSIS: 1 BuildArgs: "" + VcpkgArgs: "" WindowsCtestConfig: "" CmakeEnvArg: "" CmakeArgs: "" @@ -119,6 +120,7 @@ jobs: parameters: ServiceDirectory: ${{ parameters.ServiceDirectory }} GenerateArgs: $(CmakeArgs) + VcpkgArgs: "$(VcpkgArgs)" BuildArgs: "$(BuildArgs)" Env: "$(CmakeEnvArg)" diff --git a/eng/pipelines/templates/stages/platform-matrix.json b/eng/pipelines/templates/stages/platform-matrix.json index d6b762e9b8..8c6315f643 100644 --- a/eng/pipelines/templates/stages/platform-matrix.json +++ b/eng/pipelines/templates/stages/platform-matrix.json @@ -182,7 +182,7 @@ }, "openssl_111n": { "CMAKE_BUILD_TYPE": "Release", - "BuildArgs": " -DVCPKG_MANIFEST_MODE=ON -DVCPKG_OVERLAY_PORTS=$(Build.SourcesDirectory)/vcpkg-custom-ports -DVCPKG_MANIFEST_DIR=$(Build.SourcesDirectory)" + "VcpkgArgs": " -DVCPKG_MANIFEST_MODE=ON -DVCPKG_OVERLAY_PORTS=$(Build.SourcesDirectory)/vcpkg-custom-ports -DVCPKG_MANIFEST_DIR=$(Build.SourcesDirectory)" } } } diff --git a/eng/pipelines/templates/steps/cmake-build.yml b/eng/pipelines/templates/steps/cmake-build.yml index 9918d7f511..d846ab4183 100644 --- a/eng/pipelines/templates/steps/cmake-build.yml +++ b/eng/pipelines/templates/steps/cmake-build.yml @@ -3,6 +3,7 @@ parameters: GenerateArgs: '' Build: true BuildArgs: '' + VcpkgArgs: '' ServiceDirectory: '' @@ -23,13 +24,13 @@ steps: # Core should build all cmake tagets - ${{ if and(eq(parameters.Build, true), eq(parameters.ServiceDirectory, 'core')) }}: - - script: cmake --build . ${{ parameters.BuildArgs }} + - script: cmake --build . ${{ parameters.VcpkgArgs }} ${{ parameters.BuildArgs }} workingDirectory: build displayName: cmake build All # Non-core services define the list of targets to build - ${{ if and(eq(parameters.Build, true) , ne(parameters.ServiceDirectory, 'core')) }}: - - pwsh: cmake --build . ${{ parameters.BuildArgs }} --target (Get-Content ${{ parameters.ServiceDirectory }}-targets-build.txt) + - pwsh: cmake --build . ${{ parameters.VcpkgArgs }} ${{ parameters.BuildArgs }} --target (Get-Content ${{ parameters.ServiceDirectory }}-targets-build.txt) workingDirectory: build displayName: cmake build Targets diff --git a/eng/scripts/Get-BinarySizes.ps1 b/eng/scripts/Get-BinarySizes.ps1 index bbe5be472f..d27910f9ed 100644 --- a/eng/scripts/Get-BinarySizes.ps1 +++ b/eng/scripts/Get-BinarySizes.ps1 @@ -18,6 +18,9 @@ param( [Parameter()] [string] $BuildArgs, + [Parameter()] + [string] $VcpkgArgs + [Parameter()] [string] $Job,