Skip to content

Commit

Permalink
Fix scripts after review comments #2114
Browse files Browse the repository at this point in the history
  • Loading branch information
cngzhnp committed Jul 4, 2023
1 parent 9e0ddaf commit 262aacf
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 29 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:
path: /home/runner/.cache/bazel
key: bazel_benchmark
- name: setup
env:
GOOGLETEST_VERSION: 1.13.0
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_ci_environment.sh
Expand Down
22 changes: 2 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
env:
CC: /usr/bin/gcc-10
CXX: /usr/bin/g++-10
GOOGLETEST_VERSION: 1.13.0
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_ci_environment.sh
Expand Down Expand Up @@ -77,7 +76,6 @@ jobs:
env:
CC: /usr/bin/gcc-12
CXX: /usr/bin/g++-12
GOOGLETEST_VERSION: 1.13.0
PROTOBUF_VERSION: 21.12
run: |
sudo -E ./ci/setup_cmake.sh
Expand Down Expand Up @@ -110,7 +108,6 @@ jobs:
env:
CC: /usr/bin/gcc-12
CXX: /usr/bin/g++-12
GOOGLETEST_VERSION: 1.13.0
PROTOBUF_VERSION: 21.12
run: |
sudo -E ./ci/setup_cmake.sh
Expand Down Expand Up @@ -143,7 +140,6 @@ jobs:
env:
CC: /usr/bin/clang-14
CXX: /usr/bin/clang++-14
GOOGLETEST_VERSION: 1.13.0
PROTOBUF_VERSION: 21.12
run: |
sudo -E ./ci/setup_cmake.sh
Expand Down Expand Up @@ -176,7 +172,6 @@ jobs:
env:
CC: /usr/bin/clang-14
CXX: /usr/bin/clang++-14
GOOGLETEST_VERSION: 1.13.0
PROTOBUF_VERSION: 21.12
run: |
sudo -E ./ci/setup_cmake.sh
Expand Down Expand Up @@ -223,7 +218,6 @@ jobs:
env:
CC: /usr/bin/gcc-10
CXX: /usr/bin/g++-10
GOOGLETEST_VERSION: 1.13.0
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_ci_environment.sh
Expand All @@ -242,8 +236,6 @@ jobs:
with:
submodules: 'recursive'
- name: setup
env:
GOOGLETEST_VERSION: 1.13.0
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_ci_environment.sh
Expand All @@ -260,8 +252,6 @@ jobs:
with:
submodules: 'recursive'
- name: setup
env:
GOOGLETEST_VERSION: 1.13.0
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_ci_environment.sh
Expand Down Expand Up @@ -293,6 +283,7 @@ jobs:
env:
CC: /usr/bin/gcc-4.8
CXX: /usr/bin/g++-4.8
GOOGLETEST_VERSION: 1.10.0
run: ./ci/do_ci.sh cmake.legacy.test

cmake_gcc_48_otlp_exporter_test:
Expand Down Expand Up @@ -321,6 +312,7 @@ jobs:
env:
CC: /usr/bin/gcc-4.8
CXX: /usr/bin/g++-4.8
GOOGLETEST_VERSION: 1.10.0
run: ./ci/do_ci.sh cmake.legacy.exporter.otprotocol.test

cmake_test_cxx20_gcc:
Expand All @@ -333,7 +325,6 @@ jobs:
- name: setup
env:
CMAKE_VERSION: 3.20.6
GOOGLETEST_VERSION: 1.13.0
run: |
sudo -E ./ci/setup_ci_environment.sh
sudo -E ./ci/setup_cmake.sh
Expand All @@ -355,7 +346,6 @@ jobs:
CXX: /usr/bin/clang++
CXXFLAGS: "-stdlib=libc++"
CMAKE_VERSION: 3.20.6
GOOGLETEST_VERSION: 1.13.0
run: |
sudo -E ./ci/setup_ci_environment.sh
sudo -E ./ci/setup_cmake.sh
Expand All @@ -380,8 +370,6 @@ jobs:
with:
submodules: 'recursive'
- name: setup
env:
GOOGLETEST_VERSION: 1.13.0
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_ci_environment.sh
Expand All @@ -398,8 +386,6 @@ jobs:
with:
submodules: 'recursive'
- name: setup
env:
GOOGLETEST_VERSION: 1.13.0
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_ci_environment.sh
Expand All @@ -416,8 +402,6 @@ jobs:
with:
submodules: 'recursive'
- name: setup
env:
GOOGLETEST_VERSION: 1.13.0
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_ci_environment.sh
Expand All @@ -437,7 +421,6 @@ jobs:
env:
CC: /usr/bin/gcc-10
CXX: /usr/bin/g++-10
GOOGLETEST_VERSION: 1.13.0
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_ci_environment.sh
Expand Down Expand Up @@ -767,7 +750,6 @@ jobs:
env:
CC: /usr/bin/gcc-10
CXX: /usr/bin/g++-10
GOOGLETEST_VERSION: 1.13.0
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_ci_environment.sh
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
env:
CC: /usr/bin/gcc-10
CXX: /usr/bin/g++-10
GOOGLETEST_VERSION: 1.13.0
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_ci_environment.sh
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ list(APPEND CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}")

include(CTest)
if(BUILD_TESTING)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD 14)
add_definitions(-DENABLE_TEST)
if(EXISTS ${CMAKE_BINARY_DIR}/lib/libgtest.a)
# Prefer GTest from build tree. GTest is not always working with
Expand Down
13 changes: 8 additions & 5 deletions ci/setup_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@ export DEBIAN_FRONTEND=noninteractive
apt-get update

if [ "x$CMAKE_VERSION" = "x" ]; then
# By default, CMake version set the following version.
export CMAKE_VERSION=3.15.2
fi

# This variable not set on CI pipeline for only legacy environment(GCC 4.8).
# With 1.13.0 version, C++14 must be set which does not supported by legacy environment anymore.
# Also with this version, release version path needs to be adapted.
if [ "x$GOOGLETEST_VERSION" = "x" ]; then
export GOOGLETEST_VERSION=1.10.0
GOOGLETEST_VERSION_PATH="release-${GOOGLETEST_VERSION}"
GOOGLETEST_FOLDER_PATH="googletest-release-${GOOGLETEST_VERSION}"
else
if [ -z "${GOOGLETEST_VERSION}" ]; then
# By default, GoogleTest version set the following version.
export GOOGLETEST_VERSION=1.13.0
GOOGLETEST_VERSION_PATH="v${GOOGLETEST_VERSION}"
GOOGLETEST_FOLDER_PATH="googletest-${GOOGLETEST_VERSION}"
else
GOOGLETEST_VERSION_PATH="release-${GOOGLETEST_VERSION}"
GOOGLETEST_FOLDER_PATH="googletest-release-${GOOGLETEST_VERSION}"

fi

cmake_install() {
Expand Down

0 comments on commit 262aacf

Please sign in to comment.