From a7d6b8818c5ee6b6ea601068fbe91c6509596226 Mon Sep 17 00:00:00 2001 From: cyjseagull Date: Sat, 14 Sep 2024 11:06:21 +0800 Subject: [PATCH] fix macos coverage failed --- .github/workflows/cpp_workflow.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cpp_workflow.yml b/.github/workflows/cpp_workflow.yml index 300c18f8..76bbe236 100644 --- a/.github/workflows/cpp_workflow.yml +++ b/.github/workflows/cpp_workflow.yml @@ -131,10 +131,14 @@ jobs: run: | brew install lcov bash cpp/tools/install_depends.sh -o macos - mkdir -p cpp/build && cd cpp/build && cmake -DTESTS=ON -DCOVERAGE=ON -DBUILD_SDK=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../ + mkdir -p cpp/build && cd cpp/build && cmake -DTESTS=ON -DCOVERAGE=OFF -DBUILD_SDK=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../ make -j3 - name: Test - if: runner.os != 'Windows' + if: runner.os == 'macOS' + run: | + cd cpp/build && CTEST_OUTPUT_ON_FAILURE=TRUE make test + - name: Test and upload coverage + if: runner.os == 'Linux' run: | cd cpp/build && CTEST_OUTPUT_ON_FAILURE=TRUE make test make coverage