diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index 4b91f1a9a5..7933ef687b 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -44,6 +44,10 @@ parameters: - name: MatrixFile type: string default: eng/pipelines/templates/stages/platform-matrix.json + # A second matrix file, built beside MatrixFile. Empty means no second job set. + - name: AdditionalMatrixFile + type: string + default: '' - name: JobName type: string default: Validate @@ -78,6 +82,38 @@ jobs: PreTestSteps: ${{ parameters.PreTestSteps }} PostTestSteps: ${{ parameters.PostTestSteps }} + # A separate call, not a second MatrixConfigs entry above: generate-job-matrix + # passes one AdditionalParameters object to every config, and ci.tests.yml + # names each job "_", so two configs in one call would + # declare the same job identifier twice. + - ${{ if ne(parameters.AdditionalMatrixFile, '') }}: + - template: /eng/common/pipelines/templates/jobs/generate-job-matrix.yml + parameters: + GenerateJobName: ${{ parameters.JobName }}_uamqp_generate_matrix + MatrixConfigs: + - Name: uamqp + Path: ${{ parameters.AdditionalMatrixFile }} + Selection: all + GenerateVMJobs: true + JobTemplatePath: /eng/pipelines/templates/jobs/ci.tests.yml + OsVmImage: $(LINUXVMIMAGE) + Pool: $(LINUXPOOL) + AdditionalParameters: + DisplayName: ${{ parameters.JobName }}_uamqp + Artifacts: ${{ parameters.Artifacts }} + ServiceDirectory: ${{ parameters.ServiceDirectory }} + TestPipeline: ${{ parameters.TestPipeline }} + CtestRegex: ${{ parameters.CtestRegex }} + CtestExcludeRegex: ${{ parameters.CtestExcludeRegex }} + CoverageReportPath: ${{ parameters.CoverageReportPath }} + # The coverage targets are calibrated against the Rust build. + CoverageEnabled: false + LineCoverageTarget: ${{ parameters.LineCoverageTarget }} + BranchCoverageTarget: ${{ parameters.BranchCoverageTarget }} + TestEnv: ${{ parameters.TestEnv }} + PreTestSteps: ${{ parameters.PreTestSteps }} + PostTestSteps: ${{ parameters.PostTestSteps }} + # Disable build for cpp - client - ${{ if and(eq(parameters.RunMetaJobs, 'true'), ne(parameters.ServiceDirectory, 'not-specified' )) }}: - job: GenerateReleaseArtifacts diff --git a/eng/pipelines/templates/stages/archetype-sdk-client.yml b/eng/pipelines/templates/stages/archetype-sdk-client.yml index 76c51cc412..96517959d0 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-client.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-client.yml @@ -82,6 +82,11 @@ parameters: - name: UseFederatedAuth type: boolean default: true + # A second matrix file. The Build stage passes it; PrePublishBuild does not, + # so pull request feedback stays fast. + - name: AdditionalMatrixFile + type: string + default: '' extends: ${{ if eq(variables['System.TeamProject'], 'internal') }}: @@ -172,6 +177,7 @@ extends: # Code coverage is enabled by default for live tests parameters: MatrixFile: eng/pipelines/templates/stages/platform-matrix.json + AdditionalMatrixFile: ${{ parameters.AdditionalMatrixFile }} JobName: Validate ServiceDirectory: ${{ parameters.ServiceDirectory }} Artifacts: ${{ parameters.Artifacts }} diff --git a/eng/pipelines/templates/stages/platform-matrix-uamqp.json b/eng/pipelines/templates/stages/platform-matrix-uamqp.json new file mode 100644 index 0000000000..2bd94c6def --- /dev/null +++ b/eng/pipelines/templates/stages/platform-matrix-uamqp.json @@ -0,0 +1,48 @@ +{ + "displayNames": { + "_": "" + }, + "include": [ + { + "StaticConfigs": { + "Ubuntu22": { + "OSVmImage": "env:LINUXVMIMAGE", + "Pool": "env:LINUXPOOL", + "VCPKG_DEFAULT_TRIPLET": "x64-linux", + "BuildArgs": "-j 10", + "CMAKE_BUILD_TYPE": "Debug", + "CmakeArgs": " -DBUILD_TESTING=ON -DDISABLE_RUST_IN_BUILD=ON" + } + }, + "BuildSettings": { + "gpp-9": { + "AptDependencies": "g++-9", + "CC": "/usr/bin/gcc-9", + "CXX": "/usr/bin/g++-9" + }, + "clang-15": { + "AptDependencies": "clang-15", + "CC": "/usr/bin/clang-15", + "CXX": "/usr/bin/clang++-15" + } + } + }, + { + "StaticConfigs": { + "Win2022": { + "OSVmImage": "env:WINDOWSVMIMAGE", + "Pool": "env:WINDOWSPOOL", + "CMAKE_GENERATOR": "Visual Studio 17 2022", + "BuildArgs": "--parallel 8 --config Debug" + } + }, + "TargetArchitecture": { + "x64": { + "CMAKE_GENERATOR_PLATFORM": "x64", + "VCPKG_DEFAULT_TRIPLET": "x64-windows-static", + "CmakeArgs": " -DBUILD_TESTING=ON -DMSVC_USE_STATIC_CRT=ON -DDISABLE_RUST_IN_BUILD=ON" + } + } + } + ] +} diff --git a/sdk/core/azure-core-amqp/src/impl/uamqp/vendor/azure-uamqp-c/CMakeLists.txt b/sdk/core/azure-core-amqp/src/impl/uamqp/vendor/azure-uamqp-c/CMakeLists.txt index 74c05d44ae..2497c3340b 100644 --- a/sdk/core/azure-core-amqp/src/impl/uamqp/vendor/azure-uamqp-c/CMakeLists.txt +++ b/sdk/core/azure-core-amqp/src/impl/uamqp/vendor/azure-uamqp-c/CMakeLists.txt @@ -1,7 +1,9 @@ #Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. -cmake_minimum_required(VERSION 3.5) +if(NOT DEFINED CMAKE_MINIMUM_REQUIRED_VERSION) + cmake_minimum_required(VERSION 3.18) +endif() project(uamqp) FILE(READ ${CMAKE_CURRENT_LIST_DIR}/version.txt UAMQP_VERSION) diff --git a/sdk/core/ci.yml b/sdk/core/ci.yml index d7e7be89cc..5e4ba4f71b 100644 --- a/sdk/core/ci.yml +++ b/sdk/core/ci.yml @@ -47,6 +47,7 @@ extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: core + AdditionalMatrixFile: eng/pipelines/templates/stages/platform-matrix-uamqp.json # CI has static code analysis disabled, while LiveTest will have it enabled # In the case of changes to core we want to re-run all CI tests for all # libraries to check for potential regressions everywhere. diff --git a/sdk/eventhubs/ci.yml b/sdk/eventhubs/ci.yml index a87a348b36..e3fd90e511 100644 --- a/sdk/eventhubs/ci.yml +++ b/sdk/eventhubs/ci.yml @@ -27,6 +27,7 @@ extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: eventhubs + AdditionalMatrixFile: eng/pipelines/templates/stages/platform-matrix-uamqp.json CtestRegex: "azure-messaging-eventhubs.*" LiveTestCtestRegex: "azure-messaging-eventhubs.*" LiveTestTimeoutInMinutes: 120