Skip to content

Commit

Permalink
[CI] Make cmake.c++20*.test actualy use C++20 and add cmake.c++23*.te…
Browse files Browse the repository at this point in the history
…st (#2496)
  • Loading branch information
bcsgh authored Jan 22, 2024
1 parent 02b984a commit 8f88553
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 1 deletion.
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,59 @@ jobs:
CXX_STANDARD: '20'
run: ./ci/do_ci.sh cmake.c++20.stl.test

cmake_test_cxx23_gcc:
name: CMake C++23 test(GCC)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: setup
env:
CMAKE_VERSION: 3.20.6
run: |
sudo -E ./ci/setup_ci_environment.sh
sudo -E ./ci/setup_cmake.sh
- name: run tests
env:
CXX_STANDARD: '23'
run: ./ci/do_ci.sh cmake.c++23.test
- name: run tests (enable stl)
env:
CXX_STANDARD: '23'
run: ./ci/do_ci.sh cmake.c++23.stl.test

cmake_test_cxx23_clang:
name: CMake C++23 test(Clang with libc++)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: setup
env:
CC: /usr/bin/clang
CXX: /usr/bin/clang++
CXXFLAGS: "-stdlib=libc++"
CMAKE_VERSION: 3.20.6
run: |
sudo -E ./ci/setup_ci_environment.sh
sudo -E ./ci/setup_cmake.sh
- name: run tests
env:
CC: /usr/bin/clang
CXX: /usr/bin/clang++
CXXFLAGS: "-stdlib=libc++"
CXX_STANDARD: '23'
run: ./ci/do_ci.sh cmake.c++23.test
- name: run tests (enable stl)
env:
CC: /usr/bin/clang
CXX: /usr/bin/clang++
CXXFLAGS: "-stdlib=libc++"
CXX_STANDARD: '23'
run: ./ci/do_ci.sh cmake.c++23.stl.test

cmake_otprotocol_test:
name: CMake test (with otlp-exporter)
runs-on: ubuntu-20.04
Expand Down
28 changes: 27 additions & 1 deletion ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,19 @@ elif [[ "$1" == "cmake.c++20.test" ]]; then
cmake ${CMAKE_OPTIONS[@]} \
-DCMAKE_CXX_FLAGS="-Werror $CXXFLAGS" \
-DWITH_ASYNC_EXPORT_PREVIEW=ON \
-DWITH_STL=CXX20 \
${IWYU} \
"${SRC_DIR}"
eval "$MAKE_COMMAND"
make test
exit 0
elif [[ "$1" == "cmake.c++23.test" ]]; then
cd "${BUILD_DIR}"
rm -rf *
cmake ${CMAKE_OPTIONS[@]} \
-DCMAKE_CXX_FLAGS="-Werror $CXXFLAGS" \
-DWITH_ASYNC_EXPORT_PREVIEW=ON \
-DWITH_STL=CXX23 \
${IWYU} \
"${SRC_DIR}"
eval "$MAKE_COMMAND"
Expand Down Expand Up @@ -267,7 +280,20 @@ elif [[ "$1" == "cmake.c++20.stl.test" ]]; then
-DWITH_METRICS_EXEMPLAR_PREVIEW=ON \
-DCMAKE_CXX_FLAGS="-Werror $CXXFLAGS" \
-DWITH_ASYNC_EXPORT_PREVIEW=ON \
-DWITH_STL=ON \
-DWITH_STL=CXX20 \
${IWYU} \
"${SRC_DIR}"
eval "$MAKE_COMMAND"
make test
exit 0
elif [[ "$1" == "cmake.c++23.stl.test" ]]; then
cd "${BUILD_DIR}"
rm -rf *
cmake ${CMAKE_OPTIONS[@]} \
-DWITH_METRICS_EXEMPLAR_PREVIEW=ON \
-DCMAKE_CXX_FLAGS="-Werror $CXXFLAGS" \
-DWITH_ASYNC_EXPORT_PREVIEW=ON \
-DWITH_STL=CXX23 \
${IWYU} \
"${SRC_DIR}"
eval "$MAKE_COMMAND"
Expand Down

2 comments on commit 8f88553

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'OpenTelemetry-cpp api Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 8f88553 Previous: 02b984a Ratio
BM_SpinLockThrashing/1/process_time/real_time 0.8871631622314453 ms/iter 0.09430164382571266 ms/iter 9.41

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'OpenTelemetry-cpp sdk Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 8f88553 Previous: 02b984a Ratio
BM_BaselineBuffer/1 4640138.626098633 ns/iter 890443.0866241455 ns/iter 5.21
BM_LockFreeBuffer/1 1709410.6674194336 ns/iter 668368.3395385742 ns/iter 2.56

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.