From c9d4261c9a6219b63cb0d604657ef64e8e9598b0 Mon Sep 17 00:00:00 2001 From: Tom Tan Date: Wed, 20 Dec 2023 14:52:21 -0800 Subject: [PATCH 1/2] Add DLL build CI pipeline with CXX20 --- .github/workflows/ci.yml | 2 ++ ci/do_ci.ps1 | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81a9397e2e..f3ae8edfd9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -732,6 +732,8 @@ jobs: ./ci/install_windows_protobuf.ps1 - name: run cmake test (DLL build) run: ./ci/do_ci.ps1 cmake.dll.test + - name: run cmake cxx20 test (DLL build) + run: ./ci/do_ci.ps1 cmake.dll.cxx20.test - name: run otprotocol test (DLL build) run: ./ci/do_ci.ps1 cmake.exporter.otprotocol.dll.test diff --git a/ci/do_ci.ps1 b/ci/do_ci.ps1 index a1e8c10014..bdab94ae04 100644 --- a/ci/do_ci.ps1 +++ b/ci/do_ci.ps1 @@ -90,6 +90,44 @@ switch ($action) { exit $exit } } + "cmake.dll.cxx20.test" { + cd "$BUILD_DIR" + cmake $SRC_DIR ` + -DCMAKE_CXX_STANDARD=20 ` + -DVCPKG_TARGET_TRIPLET=x64-windows ` + -DOPENTELEMETRY_BUILD_DLL=1 ` + "-DCMAKE_TOOLCHAIN_FILE=$VCPKG_DIR/scripts/buildsystems/vcpkg.cmake" + $exit = $LASTEXITCODE + if ($exit -ne 0) { + exit $exit + } + cmake --build . -j $nproc + $exit = $LASTEXITCODE + if ($exit -ne 0) { + exit $exit + } + ctest -C Debug + $exit = $LASTEXITCODE + if ($exit -ne 0) { + exit $exit + } + $env:PATH = "$BUILD_DIR\ext\src\dll\Debug;$env:PATH" + examples\simple\Debug\example_simple.exe + $exit = $LASTEXITCODE + if ($exit -ne 0) { + exit $exit + } + examples\metrics_simple\Debug\metrics_ostream_example.exe + $exit = $LASTEXITCODE + if ($exit -ne 0) { + exit $exit + } + examples\logs_simple\Debug\example_logs_simple.exe + $exit = $LASTEXITCODE + if ($exit -ne 0) { + exit $exit + } + } "cmake.maintainer.test" { cd "$BUILD_DIR" cmake $SRC_DIR ` From a2bce545409cc2e36844eb7a53ae548c225fa80b Mon Sep 17 00:00:00 2001 From: Tom Tan Date: Wed, 20 Dec 2023 16:25:52 -0800 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11ba426024..bcece1b331 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,8 @@ Increment the: [#2449](https://github.com/open-telemetry/opentelemetry-cpp/pull/2449) * [BUILD] Introduce CXX 20 CI pipeline for MSVC/Windows [#2450](https://github.com/open-telemetry/opentelemetry-cpp/pull/2450) +* [BUILD] Add DLL build CI pipeline with CXX20 + [#2465](https://github.com/open-telemetry/opentelemetry-cpp/pull/2465) Important changes: