From 33435b7200aa9a773d0970be7d5f5b484283fdd7 Mon Sep 17 00:00:00 2001 From: Eric Wolz Date: Mon, 21 Aug 2023 16:52:15 -0700 Subject: [PATCH] Move to devops osx, enable CodeQL tasks (#2522) * Support OSX DevOps * update cutil * add codeql * codeql * codeql * increase timeout * enable ql * increase timeout * CodeQL.Enabled to main branch * suppress curl_easy_perform * move to VS2022 --- build/.vsts-ci.yml | 25 ++++++++++++------- c-utility | 2 +- .../tests/global_valgrind_suppression.supp | 17 +++++++++++-- .../tests/codefirst_cpp_ut/CMakeLists.txt | 2 ++ .../CMakeLists.txt | 4 ++- 5 files changed, 37 insertions(+), 13 deletions(-) diff --git a/build/.vsts-ci.yml b/build/.vsts-ci.yml index 8c33e77ae3..0eec7f573a 100644 --- a/build/.vsts-ci.yml +++ b/build/.vsts-ci.yml @@ -55,7 +55,7 @@ jobs: displayName: 'Check Submodules Match' - job: windowsx86 pool: - name: 'sdk-c--win-vs2017' + name: 'sdk-c--win-vs2022' displayName: "Windows x86" steps: - script: | @@ -92,7 +92,7 @@ jobs: condition: succeededOrFailed() - job: windowsx64debug pool: - name: 'sdk-c--win-vs2017' + name: 'sdk-c--win-vs2022' displayName: 'Windows x64 (Debug)' steps: - script: | @@ -131,16 +131,20 @@ jobs: testRunTitle: 'windowsx64' condition: succeededOrFailed() - job: windowsx64release + timeoutInMinutes: 150 variables: - CodeQL.Enabled: true + CodeQL.Enabled: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')] CodeQL.Language: cpp pool: - name: 'sdk-c--win-vs2017' + name: 'sdk-c--win-vs2022' displayName: 'Windows x64 (Release)' steps: + - task: CodeQL3000Init@0 - script: | call jenkins\windows_c_release.cmd --platform x64 displayName: 'Build' + - task: CodeQL3000Finalize@0 + condition: always() - script: | call jenkins\windows_c_VsDevCmd.cmd x64 cd cmake && ctest -T test --no-compress-output -C "Release" -V -j 16 --schedule-random @@ -175,7 +179,7 @@ jobs: condition: succeededOrFailed() - job: windowsdynamic pool: - name: 'sdk-c--win-vs2017' + name: 'sdk-c--win-vs2022' displayName: "Windows Dynamic" steps: - script: | @@ -838,7 +842,7 @@ jobs: variables: CodeQL.Enabled: false pool: - name: OSX + vmImage: 'macOS-11' steps: - script: | ./jenkins/osx_gcc_openssl.sh @@ -883,7 +887,7 @@ jobs: variables: CodeQL.Enabled: false pool: - name: OSX + vmImage: 'macOS-11' displayName: "Xcode Native" steps: - script: | @@ -988,11 +992,12 @@ jobs: - job: DotNET displayName: .NET variables: - CodeQL.Enabled: true - CodeQL.Language: csharp + Codeql.Enabled: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')] + Codeql.Language: csharp,python pool: vmImage: 'windows-latest' steps: + - task: CodeQL3000Init@0 - task: NuGetCommand@2 inputs: command: 'restore' @@ -1003,3 +1008,5 @@ jobs: inputs: command: 'build' projects: 'tools\traceabilitytool\traceabilitytool.sln' + - task: CodeQL3000Finalize@0 + condition: always() diff --git a/c-utility b/c-utility index 8ee0e5d88d..1aa49d3c1c 160000 --- a/c-utility +++ b/c-utility @@ -1 +1 @@ -Subproject commit 8ee0e5d88d1771d33e36d38d392ec9d9ae13ea55 +Subproject commit 1aa49d3c1cbe1c8ef152ecf53d4cb8fcb71925fc diff --git a/iothub_client/tests/global_valgrind_suppression.supp b/iothub_client/tests/global_valgrind_suppression.supp index c49136e7a8..e21b259e92 100644 --- a/iothub_client/tests/global_valgrind_suppression.supp +++ b/iothub_client/tests/global_valgrind_suppression.supp @@ -656,7 +656,7 @@ fun:IoTHubMessaging_LL_SendMessageComplete ... } - { + { drd:ConflictingAccess ... @@ -664,4 +664,17 @@ fun:openCompleteCallback fun:IoTHubMessaging_LL_ReceiverStateChanged ... - } \ No newline at end of file +} +{ + + Memcheck:Leak + match-leak-kinds: possible + ... + fun:curl_multi_perform + fun:curl_easy_perform + fun:HTTPAPI_ExecuteRequest + ... + fun:ThreadWrapper + fun:start_thread + fun:clone +} diff --git a/serializer/tests/codefirst_cpp_ut/CMakeLists.txt b/serializer/tests/codefirst_cpp_ut/CMakeLists.txt index bf7e45cb46..5efb28dbc3 100644 --- a/serializer/tests/codefirst_cpp_ut/CMakeLists.txt +++ b/serializer/tests/codefirst_cpp_ut/CMakeLists.txt @@ -32,6 +32,8 @@ set(${theseTestsName}_h_files #C compiler doesn't like to complain about the same thing if(WIN32) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4505") +elseif(LINUX OR MACOSX) + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations") endif() build_c_test_artifacts(${theseTestsName} ON "tests/UnitTests") diff --git a/serializer/tests/codefirst_withstructs_cpp_ut/CMakeLists.txt b/serializer/tests/codefirst_withstructs_cpp_ut/CMakeLists.txt index c7795caeb8..0cde0d10f4 100644 --- a/serializer/tests/codefirst_withstructs_cpp_ut/CMakeLists.txt +++ b/serializer/tests/codefirst_withstructs_cpp_ut/CMakeLists.txt @@ -23,6 +23,8 @@ set(${theseTestsName}_h_files #C compiler doesn't like to complain about the same thing if(WIN32) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4505") +elseif(LINUX OR MACOSX) + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations") endif() -build_c_test_artifacts(${theseTestsName} ON "tests/UnitTests") \ No newline at end of file +build_c_test_artifacts(${theseTestsName} ON "tests/UnitTests")