From 6ad45a9a69171b409514d4bc3105e507832368fe Mon Sep 17 00:00:00 2001 From: Ehsan Saei <71217171+esigo@users.noreply.github.com> Date: Sat, 10 Sep 2022 18:30:17 +0200 Subject: [PATCH 1/5] gRPC latest release test --- .github/workflows/ci.yml | 18 +++++++++++++++++- ci/do_ci.sh | 13 +++++++++++++ ci/setup_grpc.sh | 7 ++++++- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d723ea2fe1..84314f55a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI on: push: - branches: [ main ] + branches: [ main, gRPC-latest ] pull_request: branches: [ main ] @@ -146,6 +146,22 @@ jobs: sudo ./ci/setup_grpc.sh ./ci/do_ci.sh cmake.exporter.otprotocol.test + cmake_grpc_latest_test: + name: CMake test (with otlp-exporter and latest gRPC) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: setup + run: | + sudo ./ci/setup_cmake.sh + sudo ./ci/setup_ci_environment.sh + - name: run otlp exporter tests + run: | + sudo ./ci/setup_grpc.sh -r v1.48.1 + ./ci/do_ci.sh cmake.exporter.otlp.grpc.latest.test + plugin_test: name: Plugin -> CMake runs-on: ubuntu-latest diff --git a/ci/do_ci.sh b/ci/do_ci.sh index bf775fa564..8a82ef450e 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -334,6 +334,19 @@ elif [[ "$1" == "code.coverage" ]]; then lcov --remove coverage.info '*/ext/http/server/*'> tmp_coverage.info 2>/dev/null cp tmp_coverage.info coverage.info exit 0 +elif [[ "$1" == "cmake.exporter.otlp.grpc.latest.test" ]]; then + cd "${BUILD_DIR}" + rm -rf * + cmake -DCMAKE_BUILD_TYPE=Debug \ + -DWITH_OTLP=ON \ + -DENABLE_LOGS_PREVIEW \ + "${SRC_DIR}" + grpc_cpp_plugin=`which grpc_cpp_plugin` + proto_make_file="CMakeFiles/opentelemetry_proto.dir/build.make" + sed -i "s~gRPC_CPP_PLUGIN_EXECUTABLE-NOTFOUND~$grpc_cpp_plugin~" ${proto_make_file} #fixme + make -j $(nproc) + cd exporters/otlp && make test + exit 0 elif [[ "$1" == "third_party.tags" ]]; then echo "gRPC=v1.43.2" > third_party_release echo "thrift=0.14.1" >> third_party_release diff --git a/ci/setup_grpc.sh b/ci/setup_grpc.sh index d42fbb7d2e..2d2311ad4a 100755 --- a/ci/setup_grpc.sh +++ b/ci/setup_grpc.sh @@ -8,12 +8,13 @@ export DEBIAN_FRONTEND=noninteractive old_grpc_version='v1.33.2' new_grpc_version='v1.43.2' gcc_version_for_new_grpc='5.1' +std_version='11' install_grpc_version=${new_grpc_version} grpc_version='v1.39.0' install_dir='/usr/local/' usage() { echo "Usage: $0 [-v ] [-i "] 1>&2; exit 1;} -while getopts ":v:i:" o; do +while getopts ":v:i:r:" o; do case "${o}" in v) gcc_version=${OPTARG} @@ -21,6 +22,10 @@ while getopts ":v:i:" o; do i) install_dir=${OPTARG} ;; + r) + install_grpc_version=${OPTARG} + std_version='14' + ;; *) usage ;; From ec4ba212ebd12e2d730591bf5c0b3a8453f80e0a Mon Sep 17 00:00:00 2001 From: Ehsan Saei <71217171+esigo@users.noreply.github.com> Date: Sat, 10 Sep 2022 18:41:17 +0200 Subject: [PATCH 2/5] c++ 14 --- ci/setup_grpc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/setup_grpc.sh b/ci/setup_grpc.sh index 2d2311ad4a..7efac9c5cd 100755 --- a/ci/setup_grpc.sh +++ b/ci/setup_grpc.sh @@ -57,7 +57,7 @@ cmake -DCMAKE_BUILD_TYPE=Release \ make -j${nproc} install && popd mkdir -p build && pushd build cmake -DgRPC_INSTALL=ON \ - -DCMAKE_CXX_STANDARD=11 \ + -DCMAKE_CXX_STANDARD=${std_version} \ -DgRPC_BUILD_TESTS=OFF \ -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \ -DCMAKE_PREFIX_PATH=$INSTALL_DIR \ From 728e4f3625b2b0c7db01b2cf3fe3a4c575d702bc Mon Sep 17 00:00:00 2001 From: Ehsan Saei <71217171+esigo@users.noreply.github.com> Date: Sat, 10 Sep 2022 18:56:16 +0200 Subject: [PATCH 3/5] fix CI --- .github/workflows/ci.yml | 2 +- ci/do_ci.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84314f55a1..ac0c138419 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -147,7 +147,7 @@ jobs: ./ci/do_ci.sh cmake.exporter.otprotocol.test cmake_grpc_latest_test: - name: CMake test (with otlp-exporter and latest gRPC) + name: CMake test (with otlp-exporter and latest gRPC release) runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/ci/do_ci.sh b/ci/do_ci.sh index 8a82ef450e..7f8ad42a2d 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -339,7 +339,7 @@ elif [[ "$1" == "cmake.exporter.otlp.grpc.latest.test" ]]; then rm -rf * cmake -DCMAKE_BUILD_TYPE=Debug \ -DWITH_OTLP=ON \ - -DENABLE_LOGS_PREVIEW \ + -DENABLE_LOGS_PREVIEW=ON \ "${SRC_DIR}" grpc_cpp_plugin=`which grpc_cpp_plugin` proto_make_file="CMakeFiles/opentelemetry_proto.dir/build.make" From 030524cee34d517f261a455e15503b3dec4b9300 Mon Sep 17 00:00:00 2001 From: Ehsan Saei <71217171+esigo@users.noreply.github.com> Date: Sat, 10 Sep 2022 19:24:32 +0200 Subject: [PATCH 4/5] clean --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac0c138419..fb0be047bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI on: push: - branches: [ main, gRPC-latest ] + branches: [ main ] pull_request: branches: [ main ] From cb64d1a82ef7b5f61a9d5ed450263c838ae88f65 Mon Sep 17 00:00:00 2001 From: Ehsan Saei <71217171+esigo@users.noreply.github.com> Date: Thu, 15 Sep 2022 21:53:30 +0200 Subject: [PATCH 5/5] default v1.48.1 --- .github/workflows/ci.yml | 16 ---------------- ci/do_ci.sh | 13 ------------- ci/setup_grpc.sh | 11 +++++++---- 3 files changed, 7 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a1cd714b5..3a1c419334 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -146,22 +146,6 @@ jobs: sudo ./ci/setup_grpc.sh ./ci/do_ci.sh cmake.exporter.otprotocol.test - cmake_grpc_latest_test: - name: CMake test (with otlp-exporter and latest gRPC release) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: setup - run: | - sudo ./ci/setup_cmake.sh - sudo ./ci/setup_ci_environment.sh - - name: run otlp exporter tests - run: | - sudo ./ci/setup_grpc.sh -r v1.48.1 - ./ci/do_ci.sh cmake.exporter.otlp.grpc.latest.test - plugin_test: name: Plugin -> CMake runs-on: ubuntu-latest diff --git a/ci/do_ci.sh b/ci/do_ci.sh index 7f8ad42a2d..bf775fa564 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -334,19 +334,6 @@ elif [[ "$1" == "code.coverage" ]]; then lcov --remove coverage.info '*/ext/http/server/*'> tmp_coverage.info 2>/dev/null cp tmp_coverage.info coverage.info exit 0 -elif [[ "$1" == "cmake.exporter.otlp.grpc.latest.test" ]]; then - cd "${BUILD_DIR}" - rm -rf * - cmake -DCMAKE_BUILD_TYPE=Debug \ - -DWITH_OTLP=ON \ - -DENABLE_LOGS_PREVIEW=ON \ - "${SRC_DIR}" - grpc_cpp_plugin=`which grpc_cpp_plugin` - proto_make_file="CMakeFiles/opentelemetry_proto.dir/build.make" - sed -i "s~gRPC_CPP_PLUGIN_EXECUTABLE-NOTFOUND~$grpc_cpp_plugin~" ${proto_make_file} #fixme - make -j $(nproc) - cd exporters/otlp && make test - exit 0 elif [[ "$1" == "third_party.tags" ]]; then echo "gRPC=v1.43.2" > third_party_release echo "thrift=0.14.1" >> third_party_release diff --git a/ci/setup_grpc.sh b/ci/setup_grpc.sh index 7efac9c5cd..6e86f20cb9 100755 --- a/ci/setup_grpc.sh +++ b/ci/setup_grpc.sh @@ -6,15 +6,15 @@ set -e export DEBIAN_FRONTEND=noninteractive old_grpc_version='v1.33.2' -new_grpc_version='v1.43.2' +new_grpc_version='v1.48.1' gcc_version_for_new_grpc='5.1' -std_version='11' +std_version='14' install_grpc_version=${new_grpc_version} grpc_version='v1.39.0' install_dir='/usr/local/' usage() { echo "Usage: $0 [-v ] [-i "] 1>&2; exit 1;} -while getopts ":v:i:r:" o; do +while getopts ":v:i:r:s:" o; do case "${o}" in v) gcc_version=${OPTARG} @@ -24,7 +24,9 @@ while getopts ":v:i:r:" o; do ;; r) install_grpc_version=${OPTARG} - std_version='14' + ;; + s) + std_version=${OPTARG} ;; *) usage @@ -36,6 +38,7 @@ if [ -z "${gcc_version}" ]; then fi if [[ "${gcc_version}" < "${gcc_version_for_new_grpc}" ]]; then echo "less" + std_version='11' install_grpc_version=${old_grpc_version} fi if ! type cmake > /dev/null; then