From 0cf03ed451f1af826ddf39b87a7c13006330248d Mon Sep 17 00:00:00 2001 From: bcsgh <33939446+bcsgh@users.noreply.github.com> Date: Fri, 19 Jan 2024 09:16:05 -0800 Subject: [PATCH 1/2] Make cmake.c++20*.test actualy use C++20 and add cmake.c++23*.test --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++ ci/do_ci.sh | 28 ++++++++++++++++++++- 2 files changed, 80 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0b0121f56..0c47430130 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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-20.04 + 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 diff --git a/ci/do_ci.sh b/ci/do_ci.sh index fa8249563c..4a3b616c8a 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -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" @@ -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" From 8c060284d52477015ce05e7cafca2bdc7d96d2c9 Mon Sep 17 00:00:00 2001 From: bcsgh <33939446+bcsgh@users.noreply.github.com> Date: Mon, 22 Jan 2024 12:51:36 -0800 Subject: [PATCH 2/2] Run C++23 CI on latest. --- .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 0c47430130..2e4fc46b58 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -360,7 +360,7 @@ jobs: cmake_test_cxx23_gcc: name: CMake C++23 test(GCC) - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: