From 71d4b87bb0502c2f198c78a3b871d35cceb11f32 Mon Sep 17 00:00:00 2001 From: George Arama <50641385+gearama@users.noreply.github.com> Date: Tue, 25 Jan 2022 14:26:10 -0800 Subject: [PATCH] fix build (#3270) * fix build * add build samples to ci --- CMakeSettings.json | 5 +++++ eng/pipelines/templates/jobs/archetype-sdk-tests.yml | 8 ++++---- .../sample2-backup-restore/sample2_backup_restore.cpp | 1 + .../sample3-delete-recover/sample3_delete_recover.cpp | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CMakeSettings.json b/CMakeSettings.json index eae3e9380..6141da95d 100644 --- a/CMakeSettings.json +++ b/CMakeSettings.json @@ -170,6 +170,11 @@ "name": "BUILD_PERFORMANCE_TESTS", "value": "True", "type": "BOOL" + }, + { + "name": "BUILD_SAMPLES", + "value": "True", + "type": "BOOL" } ] }, diff --git a/eng/pipelines/templates/jobs/archetype-sdk-tests.yml b/eng/pipelines/templates/jobs/archetype-sdk-tests.yml index 8a7fc310b..1e2617404 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-tests.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-tests.yml @@ -59,7 +59,7 @@ jobs: OSVmImage: MMSUbuntu18.04 VcpkgInstall: 'curl[ssl] libxml2 openssl' VCPKG_DEFAULT_TRIPLET: 'x64-linux' - CmakeArgs: ' -DBUILD_TESTING=ON -DBUILD_PERFORMANCE_TESTS=ON -DRUN_LONG_UNIT_TESTS=ON -DCMAKE_BUILD_TYPE=Release' + CmakeArgs: ' -DBUILD_TESTING=ON -DBUILD_PERFORMANCE_TESTS=ON -DRUN_LONG_UNIT_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_SAMPLES=ON' AZURE_CORE_ENABLE_JSON_TESTS: 1 BuildArgs: '-j 4' Ubuntu20_samples: @@ -95,7 +95,7 @@ jobs: VCPKG_DEFAULT_TRIPLET: 'x86-windows-static' CMAKE_GENERATOR: 'Visual Studio 16 2019' CMAKE_GENERATOR_PLATFORM: Win32 - CmakeArgs: ' -DBUILD_RTTI=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON' + CmakeArgs: ' -DBUILD_RTTI=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DBUILD_SAMPLES=ON' BuildArgs: '-v --parallel 8' Win_x64_with_unit_test_winHttp: Pool: azsdk-pool-mms-win-2019-general @@ -103,7 +103,7 @@ jobs: VCPKG_DEFAULT_TRIPLET: 'x64-windows-static' CMAKE_GENERATOR: 'Visual Studio 16 2019' CMAKE_GENERATOR_PLATFORM: x64 - CmakeArgs: ' -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON ' + CmakeArgs: ' -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON -DBUILD_SAMPLES=ON' BuildArgs: '-v --parallel 8' AZURE_CORE_ENABLE_JSON_TESTS: 1 # specify libcurl to be used on Windows @@ -132,7 +132,7 @@ jobs: OSVmImage: 'macOS-10.15' VcpkgInstall: 'curl[ssl] libxml2 openssl' VCPKG_DEFAULT_TRIPLET: 'x64-osx' - CmakeArgs: ' -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON ' + CmakeArgs: ' -DBUILD_TESTING=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_PERFORMANCE_TESTS=ON -DBUILD_SAMPLES=ON' AZURE_CORE_ENABLE_JSON_TESTS: 1 BuildArgs: '-j 4' pool: diff --git a/sdk/keyvault/azure-security-keyvault-secrets/test/samples/sample2-backup-restore/sample2_backup_restore.cpp b/sdk/keyvault/azure-security-keyvault-secrets/test/samples/sample2-backup-restore/sample2_backup_restore.cpp index 9bd6b7762..dd2ed1fb0 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/test/samples/sample2-backup-restore/sample2_backup_restore.cpp +++ b/sdk/keyvault/azure-security-keyvault-secrets/test/samples/sample2-backup-restore/sample2_backup_restore.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/sdk/keyvault/azure-security-keyvault-secrets/test/samples/sample3-delete-recover/sample3_delete_recover.cpp b/sdk/keyvault/azure-security-keyvault-secrets/test/samples/sample3-delete-recover/sample3_delete_recover.cpp index d06fc2bca..d5bb1db78 100644 --- a/sdk/keyvault/azure-security-keyvault-secrets/test/samples/sample3-delete-recover/sample3_delete_recover.cpp +++ b/sdk/keyvault/azure-security-keyvault-secrets/test/samples/sample3-delete-recover/sample3_delete_recover.cpp @@ -20,9 +20,9 @@ #include #include +#include #include #include - using namespace Azure::Security::KeyVault::Secrets; using namespace std::chrono_literals; void AssertSecretsEqual(KeyVaultSecret const& expected, KeyVaultSecret const& actual);