From 0197567ebda8f1b0073086e3d9a5d903585c26c4 Mon Sep 17 00:00:00 2001 From: Kenneth Jia <48558845+kenneth-jia@users.noreply.github.com> Date: Mon, 1 Jul 2024 16:44:16 +0800 Subject: [PATCH] Try CI tests --- .clang-tidy | 3 +++ .github/workflows/kafka_api_ci_tests.yml | 4 ++++ .github/workflows/kafka_api_demo_conan_build.yml | 2 +- scripts/start-local-kafka-cluster.py | 2 +- tests/integration/TestKafkaConsumer.cc | 2 -- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 71c2b9b31..2700c8dcb 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -4,6 +4,7 @@ Checks: "*,\ -llvmlibc-restrict-system-libc-headers,\ -llvmlibc-callee-namespace,\ -llvmlibc-implementation-in-namespace,\ + -llvmlibc-inline-function-decl,\ -altera-*,\ -fuchsia-*,\ -google-readability-namespace-comments,\ @@ -46,5 +47,7 @@ Checks: "*,\ -bugprone-easily-swappable-parameters,\ -bugprone-exception-escape,\ -cert-err58-cpp,\ + -performance-avoid-endl,\ -clang-analyzer-optin.performance.Padding" + diff --git a/.github/workflows/kafka_api_ci_tests.yml b/.github/workflows/kafka_api_ci_tests.yml index 1ca2a5e40..4bee266ef 100644 --- a/.github/workflows/kafka_api_ci_tests.yml +++ b/.github/workflows/kafka_api_ci_tests.yml @@ -300,6 +300,10 @@ jobs: # Install googletest vcpkg install gtest + ls "C:\VCPKG\INSTALLED" + ls "C:\VCPKG\INSTALLED\x86-windows" + ls "C:\VCPKG\INSTALLED\x86-windows\lib" + cp -v "C:\VCPKG\INSTALLED\x86-windows\lib\manual-link\gtest_main*" "C:\VCPKG\INSTALLED\x86-windows\lib\" cp -v "C:\VCPKG\INSTALLED\x86-windows\lib\manual-link\gtest_main*" "C:\VCPKG\INSTALLED\x86-windows\lib\" diff --git a/.github/workflows/kafka_api_demo_conan_build.yml b/.github/workflows/kafka_api_demo_conan_build.yml index 8d13a0cd4..80a666aea 100644 --- a/.github/workflows/kafka_api_demo_conan_build.yml +++ b/.github/workflows/kafka_api_demo_conan_build.yml @@ -28,7 +28,7 @@ jobs: - name: Prepare run: | - pip3 install conan==1.59.0 + pip3 install conan - name: Build (non-windows) if: ${{!contains(matrix.os, 'windows')}} diff --git a/scripts/start-local-kafka-cluster.py b/scripts/start-local-kafka-cluster.py index 6856460b3..a39c0dec7 100755 --- a/scripts/start-local-kafka-cluster.py +++ b/scripts/start-local-kafka-cluster.py @@ -157,7 +157,7 @@ def main(): cmd = 'lsof -nP -iTCP:{0} | grep LISTEN'.format(brokerPort) cmdCall = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) (out, err) = cmdCall.communicate(); - matched = re.search('[^\s-]+ +([0-9]+) +.*', out.decode('utf-8')) + matched = re.search(r'[^\s-]+ +([0-9]+) +.*', out.decode('utf-8')) if matched: kafkaBrokerPids.append(matched.group(1)) diff --git a/tests/integration/TestKafkaConsumer.cc b/tests/integration/TestKafkaConsumer.cc index 516454200..dc584dc8d 100644 --- a/tests/integration/TestKafkaConsumer.cc +++ b/tests/integration/TestKafkaConsumer.cc @@ -5,8 +5,6 @@ #include "gtest/gtest.h" -#include - #include #include #include