From 89aa7ec7831a9917e867898343ebfb80fee5f9ba Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Fri, 6 Oct 2023 11:16:49 +0200 Subject: [PATCH 01/25] Update tests_and_coverage.yml Signed-off-by: Stephane Rigaud --- .github/workflows/tests_and_coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests_and_coverage.yml b/.github/workflows/tests_and_coverage.yml index d38163964..271cf672f 100644 --- a/.github/workflows/tests_and_coverage.yml +++ b/.github/workflows/tests_and_coverage.yml @@ -58,7 +58,7 @@ jobs: shell: bash run: | cd ${{ runner.workspace }}/build - gcovr --root .. --output coverage.xml + gcovr --root .. --exclude 'tests' --output coverage.xml - name: Upload coverage report uses: codecov/codecov-action@v3 From 94360793d3a4739bee756bca12b547e8b2c1b371 Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Fri, 13 Oct 2023 15:15:22 +0200 Subject: [PATCH 02/25] Create codecov.yaml Signed-off-by: Stephane Rigaud --- codecov.yaml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 codecov.yaml diff --git a/codecov.yaml b/codecov.yaml new file mode 100644 index 000000000..995db1754 --- /dev/null +++ b/codecov.yaml @@ -0,0 +1,2 @@ +ignore: + - "./tests/" From 266b6c19deb303238eb46121a67a00ebd5029fde Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Fri, 13 Oct 2023 15:33:37 +0200 Subject: [PATCH 03/25] Update tests_and_coverage.yml Signed-off-by: Stephane Rigaud --- .github/workflows/tests_and_coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests_and_coverage.yml b/.github/workflows/tests_and_coverage.yml index 271cf672f..d38163964 100644 --- a/.github/workflows/tests_and_coverage.yml +++ b/.github/workflows/tests_and_coverage.yml @@ -58,7 +58,7 @@ jobs: shell: bash run: | cd ${{ runner.workspace }}/build - gcovr --root .. --exclude 'tests' --output coverage.xml + gcovr --root .. --output coverage.xml - name: Upload coverage report uses: codecov/codecov-action@v3 From b33745cdc1a2bad523a4f853702b8dfb176e5772 Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Fri, 13 Oct 2023 13:45:46 +0000 Subject: [PATCH 04/25] update cov and ci --- .github/workflows/build-test.yml | 32 ++++++++++++++++---------------- codecov.yaml | 24 +++++++++++++++++++++++- 2 files changed, 39 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index da11ae0fd..fedb5f32d 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -70,12 +70,12 @@ jobs: cmake --build "./OpenCL-ICD-Loader/build" --parallel 6 --target install --config Release shell: bash -l {0} - - name: Install cuda toolkit (windows) - if: matrix.os == 'windows-latest' - uses: Jimver/cuda-toolkit@v0.2.10 - id: cuda-toolkit - with: - cuda: '12.1.0' + # - name: Install cuda toolkit (windows) + # if: matrix.os == 'windows-latest' + # uses: Jimver/cuda-toolkit@v0.2.10 + # id: cuda-toolkit + # with: + # cuda: '12.1.0' - name: Install ocl-icd-loader - linux if: matrix.os == 'ubuntu-latest' @@ -89,16 +89,16 @@ jobs: sudo cmake --build "./OpenCL-ICD-Loader/build" --parallel 6 --target install --config Release shell: bash -l {0} - - name: Install cuda toolkit (ubuntu) - if: matrix.os == 'ubuntu-latest' - run: | - wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin - sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600 - wget https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda-repo-ubuntu2204-12-1-local_12.1.1-530.30.02-1_amd64.deb - sudo dpkg -i cuda-repo-ubuntu2204-12-1-local_12.1.1-530.30.02-1_amd64.deb - sudo cp /var/cuda-repo-ubuntu2204-12-1-local/cuda-*-keyring.gpg /usr/share/keyrings/ - sudo apt-get update - sudo apt-get -y install cuda + # - name: Install cuda toolkit (ubuntu) + # if: matrix.os == 'ubuntu-latest' + # run: | + # wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin + # sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600 + # wget https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda-repo-ubuntu2204-12-1-local_12.1.1-530.30.02-1_amd64.deb + # sudo dpkg -i cuda-repo-ubuntu2204-12-1-local_12.1.1-530.30.02-1_amd64.deb + # sudo cp /var/cuda-repo-ubuntu2204-12-1-local/cuda-*-keyring.gpg /usr/share/keyrings/ + # sudo apt-get update + # sudo apt-get -y install cuda - uses: actions/checkout@v4 with: diff --git a/codecov.yaml b/codecov.yaml index 995db1754..e1252710d 100644 --- a/codecov.yaml +++ b/codecov.yaml @@ -1,2 +1,24 @@ +codecov: + require_ci_to_pass: yes # Require CI build to pass before uploading coverage reports + +coverage: + precision: 2 # Set the precision for coverage percentages + ignore: - - "./tests/" + - "tests/*" # Ignore test files and directories + +# You can specify which files to include in coverage reports +files: + - "clic/src/*" + +comment: + layout: "header, diff, sunburst, changes, tree" # Specify which sections of the comment to include + behavior: default # Comment behavior (you can customize this) + +parsers: + gcov: + branch_detection: + conditional: yes + loop: yes + method: no + macro: no From 81d5f471d65b29aece721538c1bf5fdbba79abb6 Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Fri, 13 Oct 2023 13:51:33 +0000 Subject: [PATCH 05/25] todo: mix linking cuda and ocl create issue --- .github/workflows/build-test.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index fedb5f32d..fefcdbb3e 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -89,16 +89,16 @@ jobs: sudo cmake --build "./OpenCL-ICD-Loader/build" --parallel 6 --target install --config Release shell: bash -l {0} - # - name: Install cuda toolkit (ubuntu) - # if: matrix.os == 'ubuntu-latest' - # run: | - # wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin - # sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600 - # wget https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda-repo-ubuntu2204-12-1-local_12.1.1-530.30.02-1_amd64.deb - # sudo dpkg -i cuda-repo-ubuntu2204-12-1-local_12.1.1-530.30.02-1_amd64.deb - # sudo cp /var/cuda-repo-ubuntu2204-12-1-local/cuda-*-keyring.gpg /usr/share/keyrings/ - # sudo apt-get update - # sudo apt-get -y install cuda + - name: Install cuda toolkit (ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin + sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600 + wget https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda-repo-ubuntu2204-12-1-local_12.1.1-530.30.02-1_amd64.deb + sudo dpkg -i cuda-repo-ubuntu2204-12-1-local_12.1.1-530.30.02-1_amd64.deb + sudo cp /var/cuda-repo-ubuntu2204-12-1-local/cuda-*-keyring.gpg /usr/share/keyrings/ + sudo apt-get update + sudo apt-get -y install cuda - uses: actions/checkout@v4 with: From 4015c14eb3a398eb125a259daf2a772de5bd137b Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Fri, 13 Oct 2023 13:56:24 +0000 Subject: [PATCH 06/25] put back cuda otherwise fail --- .github/workflows/build-test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index fefcdbb3e..da11ae0fd 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -70,12 +70,12 @@ jobs: cmake --build "./OpenCL-ICD-Loader/build" --parallel 6 --target install --config Release shell: bash -l {0} - # - name: Install cuda toolkit (windows) - # if: matrix.os == 'windows-latest' - # uses: Jimver/cuda-toolkit@v0.2.10 - # id: cuda-toolkit - # with: - # cuda: '12.1.0' + - name: Install cuda toolkit (windows) + if: matrix.os == 'windows-latest' + uses: Jimver/cuda-toolkit@v0.2.10 + id: cuda-toolkit + with: + cuda: '12.1.0' - name: Install ocl-icd-loader - linux if: matrix.os == 'ubuntu-latest' From 68d14eba615955f7f9748c5fcaefc913db16d9ef Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Fri, 13 Oct 2023 13:57:32 +0000 Subject: [PATCH 07/25] test fix yaml --- codecov.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/codecov.yaml b/codecov.yaml index e1252710d..a54527351 100644 --- a/codecov.yaml +++ b/codecov.yaml @@ -7,10 +7,6 @@ coverage: ignore: - "tests/*" # Ignore test files and directories -# You can specify which files to include in coverage reports -files: - - "clic/src/*" - comment: layout: "header, diff, sunburst, changes, tree" # Specify which sections of the comment to include behavior: default # Comment behavior (you can customize this) From 6e899c73b467a58f3b5cc99cfa4e53ce01dfab87 Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Fri, 13 Oct 2023 14:11:52 +0000 Subject: [PATCH 08/25] test ignore tests --- codecov.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codecov.yaml b/codecov.yaml index a54527351..fa99409bf 100644 --- a/codecov.yaml +++ b/codecov.yaml @@ -5,7 +5,7 @@ coverage: precision: 2 # Set the precision for coverage percentages ignore: - - "tests/*" # Ignore test files and directories + - "*/tests/*" # Ignore test files and directories comment: layout: "header, diff, sunburst, changes, tree" # Specify which sections of the comment to include From f498ee24a4981d2c9e39e4705b4d7a45a6511ecc Mon Sep 17 00:00:00 2001 From: StRigaud Date: Fri, 13 Oct 2023 16:38:56 +0200 Subject: [PATCH 09/25] clean up ci --- .github/dependabot.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c0a815f66..90e05c40d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,8 +9,3 @@ updates: directory: "/" # Location of package manifests schedule: interval: "weekly" - - # - package-ecosystem: "gitsubmodule" # See documentation for possible values - # directory: "/" # Location of package manifests - # schedule: - # interval: "weekly" From 101b751557cd963490ed2638c3e6351079691c4c Mon Sep 17 00:00:00 2001 From: StRigaud Date: Fri, 13 Oct 2023 17:51:44 +0200 Subject: [PATCH 10/25] update ci? --- .github/workflows/tests_and_coverage.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/tests_and_coverage.yml b/.github/workflows/tests_and_coverage.yml index d38163964..9b143b0ab 100644 --- a/.github/workflows/tests_and_coverage.yml +++ b/.github/workflows/tests_and_coverage.yml @@ -57,8 +57,7 @@ jobs: - name: Format coverage shell: bash run: | - cd ${{ runner.workspace }}/build - gcovr --root .. --output coverage.xml + gcovr --root . --output coverage.xml - name: Upload coverage report uses: codecov/codecov-action@v3 From ad9fe0ce56cc314732a903d2d4c6b3149acd0ca4 Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Mon, 16 Oct 2023 17:31:30 +0200 Subject: [PATCH 11/25] replace gcovr with lcov --- .github/workflows/tests_and_coverage.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests_and_coverage.yml b/.github/workflows/tests_and_coverage.yml index 9b143b0ab..00373d50a 100644 --- a/.github/workflows/tests_and_coverage.yml +++ b/.github/workflows/tests_and_coverage.yml @@ -46,18 +46,17 @@ jobs: run: | cd ${{ runner.workspace }}/build && ctest -C ${{ matrix.buildtype }} --output-on-failure - # - name: Format coverage - # shell: bash - # run: | - # cd ${{ runner.workspace }}/build - # lcov --directory . --capture --output-file coverage.info - # lcov --remove coverage.info '/usr/*' "${HOME}"'/.cache/*' --output-file coverage.info - # lcov --list coverage.info - - name: Format coverage shell: bash run: | - gcovr --root . --output coverage.xml + lcov --directory . --capture --output-file coverage.info + lcov --remove coverage.info '/usr/*' "${HOME}"'/.cache/*' '*/tests/*' --output-file coverage.info + lcov --list coverage.info + + # - name: Format coverage + # shell: bash + # run: | + # gcovr --root . --output coverage.xml - name: Upload coverage report uses: codecov/codecov-action@v3 From e5c20746a7dbd67e54ae60db1298ca72509d0406 Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Mon, 16 Oct 2023 17:40:22 +0200 Subject: [PATCH 12/25] update lcov cmd --- .github/workflows/tests_and_coverage.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests_and_coverage.yml b/.github/workflows/tests_and_coverage.yml index 00373d50a..ee203e562 100644 --- a/.github/workflows/tests_and_coverage.yml +++ b/.github/workflows/tests_and_coverage.yml @@ -49,8 +49,9 @@ jobs: - name: Format coverage shell: bash run: | + cd ${{ runner.workspace }}/build lcov --directory . --capture --output-file coverage.info - lcov --remove coverage.info '/usr/*' "${HOME}"'/.cache/*' '*/tests/*' --output-file coverage.info + lcov --remove coverage.info "${HOME}"'/.cache/*' '*/tests/*' --output-file coverage.info lcov --list coverage.info # - name: Format coverage From bd8067a1ebd54b8d46d009d184c6d36758de36ca Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Mon, 16 Oct 2023 17:45:10 +0200 Subject: [PATCH 13/25] test only on clic/src --- .github/workflows/tests_and_coverage.yml | 7 +++++-- codecov.yaml | 20 ++++++++++++-------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests_and_coverage.yml b/.github/workflows/tests_and_coverage.yml index ee203e562..242b4c8cb 100644 --- a/.github/workflows/tests_and_coverage.yml +++ b/.github/workflows/tests_and_coverage.yml @@ -51,8 +51,11 @@ jobs: run: | cd ${{ runner.workspace }}/build lcov --directory . --capture --output-file coverage.info - lcov --remove coverage.info "${HOME}"'/.cache/*' '*/tests/*' --output-file coverage.info - lcov --list coverage.info + lcov --extract coverage.info './clic/src/*' --output-file coverage.info.filtered + lcov --list coverage.info.filtered + # lcov --directory . --capture --output-file coverage.info + # lcov --remove coverage.info "${HOME}"'/.cache/*' '*/tests/*' --output-file coverage.info + # lcov --list coverage.info # - name: Format coverage # shell: bash diff --git a/codecov.yaml b/codecov.yaml index fa99409bf..2189bb197 100644 --- a/codecov.yaml +++ b/codecov.yaml @@ -1,15 +1,19 @@ codecov: - require_ci_to_pass: yes # Require CI build to pass before uploading coverage reports + require_ci_to_pass: yes coverage: - precision: 2 # Set the precision for coverage percentages - -ignore: - - "*/tests/*" # Ignore test files and directories + precision: 2 + status: + project: + default: + target: auto + threshold: 1% # You can adjust the threshold value + paths: + - "clic/src/*" comment: - layout: "header, diff, sunburst, changes, tree" # Specify which sections of the comment to include - behavior: default # Comment behavior (you can customize this) + layout: "header, diff, sunburst, changes, tree" + behavior: default parsers: gcov: @@ -17,4 +21,4 @@ parsers: conditional: yes loop: yes method: no - macro: no + macro: no \ No newline at end of file From 83d2cd1f87b7f8dd07e0630396f512f837141435 Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Mon, 16 Oct 2023 17:56:59 +0200 Subject: [PATCH 14/25] rm /usr/include from coverage --- .github/workflows/tests_and_coverage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests_and_coverage.yml b/.github/workflows/tests_and_coverage.yml index 242b4c8cb..bc40a0065 100644 --- a/.github/workflows/tests_and_coverage.yml +++ b/.github/workflows/tests_and_coverage.yml @@ -51,6 +51,7 @@ jobs: run: | cd ${{ runner.workspace }}/build lcov --directory . --capture --output-file coverage.info + lcov --remove coverage.info '/usr/include/*' -o coverage.info lcov --extract coverage.info './clic/src/*' --output-file coverage.info.filtered lcov --list coverage.info.filtered # lcov --directory . --capture --output-file coverage.info From 54efd24b5cd744b82e1900d2866b4df4b559a70d Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Mon, 16 Oct 2023 18:01:49 +0200 Subject: [PATCH 15/25] test update brew --- .github/workflows/tests_and_coverage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests_and_coverage.yml b/.github/workflows/tests_and_coverage.yml index bc40a0065..47cc8b37b 100644 --- a/.github/workflows/tests_and_coverage.yml +++ b/.github/workflows/tests_and_coverage.yml @@ -29,6 +29,7 @@ jobs: - name: Install packages shell: bash run: | + brew update brew install ${{ matrix.packages }} - name: Cmake configure From 6eaac5d026bda1a033c3baba09b1616f8d44586d Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Mon, 16 Oct 2023 18:07:36 +0200 Subject: [PATCH 16/25] test -no=-esternal --- .github/workflows/tests_and_coverage.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests_and_coverage.yml b/.github/workflows/tests_and_coverage.yml index 47cc8b37b..fc531ec6b 100644 --- a/.github/workflows/tests_and_coverage.yml +++ b/.github/workflows/tests_and_coverage.yml @@ -29,7 +29,6 @@ jobs: - name: Install packages shell: bash run: | - brew update brew install ${{ matrix.packages }} - name: Cmake configure @@ -51,10 +50,10 @@ jobs: shell: bash run: | cd ${{ runner.workspace }}/build - lcov --directory . --capture --output-file coverage.info - lcov --remove coverage.info '/usr/include/*' -o coverage.info + lcov --no-external --capture --directory . --output-file ./coverage.info lcov --extract coverage.info './clic/src/*' --output-file coverage.info.filtered lcov --list coverage.info.filtered + # lcov --remove coverage.info '/usr/include/*' -o coverage.info # lcov --directory . --capture --output-file coverage.info # lcov --remove coverage.info "${HOME}"'/.cache/*' '*/tests/*' --output-file coverage.info # lcov --list coverage.info From f9c179bbcbc372b99d3b58f40e39decc63ea08da Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Mon, 16 Oct 2023 18:10:42 +0200 Subject: [PATCH 17/25] fix inc/excl options --- .github/workflows/tests_and_coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests_and_coverage.yml b/.github/workflows/tests_and_coverage.yml index fc531ec6b..a6a79f9f0 100644 --- a/.github/workflows/tests_and_coverage.yml +++ b/.github/workflows/tests_and_coverage.yml @@ -51,7 +51,7 @@ jobs: run: | cd ${{ runner.workspace }}/build lcov --no-external --capture --directory . --output-file ./coverage.info - lcov --extract coverage.info './clic/src/*' --output-file coverage.info.filtered + lcov --extract coverage.info '*/clic/src/*' --output-file coverage.info.filtered lcov --list coverage.info.filtered # lcov --remove coverage.info '/usr/include/*' -o coverage.info # lcov --directory . --capture --output-file coverage.info From a83bcf0cc6aa28dec6390e19f96293160ea0e1d4 Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Mon, 16 Oct 2023 18:14:51 +0200 Subject: [PATCH 18/25] forgot codecov --- codecov.yaml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/codecov.yaml b/codecov.yaml index 2189bb197..fa99409bf 100644 --- a/codecov.yaml +++ b/codecov.yaml @@ -1,19 +1,15 @@ codecov: - require_ci_to_pass: yes + require_ci_to_pass: yes # Require CI build to pass before uploading coverage reports coverage: - precision: 2 - status: - project: - default: - target: auto - threshold: 1% # You can adjust the threshold value - paths: - - "clic/src/*" + precision: 2 # Set the precision for coverage percentages + +ignore: + - "*/tests/*" # Ignore test files and directories comment: - layout: "header, diff, sunburst, changes, tree" - behavior: default + layout: "header, diff, sunburst, changes, tree" # Specify which sections of the comment to include + behavior: default # Comment behavior (you can customize this) parsers: gcov: @@ -21,4 +17,4 @@ parsers: conditional: yes loop: yes method: no - macro: no \ No newline at end of file + macro: no From c2aaed97908440a777f6b19623e4e30f79d00406 Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Mon, 16 Oct 2023 18:27:37 +0200 Subject: [PATCH 19/25] test rm --no-external --- cmake/CMakeSetEnv.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/CMakeSetEnv.cmake b/cmake/CMakeSetEnv.cmake index 063457a28..3d10f670b 100644 --- a/cmake/CMakeSetEnv.cmake +++ b/cmake/CMakeSetEnv.cmake @@ -49,7 +49,7 @@ if (WIN32 AND BUILD_SHARED_LIBS) endif() # set Code coverage options (default: OFF) -option(BUILD_COVERAGE "Enable coverage reporting" OFF) +option(BUILD_COVERAGE "Enable coverage reporting" ON) message(STATUS "Build project code coverage: ${BUILD_COVERAGE}") if (BUILD_COVERAGE) set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} " --coverage -g -O0") From f261163a8da3604cc0f249f8f6940dd3635fc857 Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Mon, 16 Oct 2023 18:33:41 +0200 Subject: [PATCH 20/25] rm codecov --- .github/workflows/tests_and_coverage.yml | 5 +++-- codecov.yaml | 20 -------------------- 2 files changed, 3 insertions(+), 22 deletions(-) delete mode 100644 codecov.yaml diff --git a/.github/workflows/tests_and_coverage.yml b/.github/workflows/tests_and_coverage.yml index a6a79f9f0..b0fd0aa20 100644 --- a/.github/workflows/tests_and_coverage.yml +++ b/.github/workflows/tests_and_coverage.yml @@ -50,9 +50,10 @@ jobs: shell: bash run: | cd ${{ runner.workspace }}/build - lcov --no-external --capture --directory . --output-file ./coverage.info + lcov --capture --directory . --output-file ./coverage.info lcov --extract coverage.info '*/clic/src/*' --output-file coverage.info.filtered lcov --list coverage.info.filtered + # lcov --remove coverage.info '/usr/include/*' -o coverage.info # lcov --directory . --capture --output-file coverage.info # lcov --remove coverage.info "${HOME}"'/.cache/*' '*/tests/*' --output-file coverage.info @@ -67,5 +68,5 @@ jobs: uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos - files: ${{ runner.workspace }}/build/coverage.xml + files: ${{ runner.workspace }}/build/coverage.info.filtered fail_ci_if_error: true # optional (default = false) diff --git a/codecov.yaml b/codecov.yaml deleted file mode 100644 index fa99409bf..000000000 --- a/codecov.yaml +++ /dev/null @@ -1,20 +0,0 @@ -codecov: - require_ci_to_pass: yes # Require CI build to pass before uploading coverage reports - -coverage: - precision: 2 # Set the precision for coverage percentages - -ignore: - - "*/tests/*" # Ignore test files and directories - -comment: - layout: "header, diff, sunburst, changes, tree" # Specify which sections of the comment to include - behavior: default # Comment behavior (you can customize this) - -parsers: - gcov: - branch_detection: - conditional: yes - loop: yes - method: no - macro: no From 6d9babe16d3cf996a4797ed1916ec47191a75efc Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Mon, 16 Oct 2023 18:38:10 +0200 Subject: [PATCH 21/25] gen cov.info --- .github/workflows/tests_and_coverage.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests_and_coverage.yml b/.github/workflows/tests_and_coverage.yml index b0fd0aa20..1a8938807 100644 --- a/.github/workflows/tests_and_coverage.yml +++ b/.github/workflows/tests_and_coverage.yml @@ -50,10 +50,10 @@ jobs: shell: bash run: | cd ${{ runner.workspace }}/build - lcov --capture --directory . --output-file ./coverage.info - lcov --extract coverage.info '*/clic/src/*' --output-file coverage.info.filtered - lcov --list coverage.info.filtered - + lcov --no-external --capture --directory . --output-file ./coverage.info + # lcov --extract coverage.info '*/clic/src/*' --output-file coverage.info.filtered + # lcov --list coverage.info.filtered + # lcov --remove coverage.info '/usr/include/*' -o coverage.info # lcov --directory . --capture --output-file coverage.info # lcov --remove coverage.info "${HOME}"'/.cache/*' '*/tests/*' --output-file coverage.info From 2b4498eb62a3216bc9542d1664716cedf4976df0 Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Mon, 16 Oct 2023 18:42:44 +0200 Subject: [PATCH 22/25] rm no-external --- .github/workflows/tests_and_coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests_and_coverage.yml b/.github/workflows/tests_and_coverage.yml index 1a8938807..067c9d3ea 100644 --- a/.github/workflows/tests_and_coverage.yml +++ b/.github/workflows/tests_and_coverage.yml @@ -50,7 +50,7 @@ jobs: shell: bash run: | cd ${{ runner.workspace }}/build - lcov --no-external --capture --directory . --output-file ./coverage.info + lcov --capture --directory . --output-file ./coverage.info # lcov --extract coverage.info '*/clic/src/*' --output-file coverage.info.filtered # lcov --list coverage.info.filtered From c81e488370326f47c607bbe717ee08d360c61de3 Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Mon, 16 Oct 2023 19:03:23 +0200 Subject: [PATCH 23/25] tests gcovr --- .github/workflows/tests_and_coverage.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests_and_coverage.yml b/.github/workflows/tests_and_coverage.yml index 067c9d3ea..4ae73624f 100644 --- a/.github/workflows/tests_and_coverage.yml +++ b/.github/workflows/tests_and_coverage.yml @@ -50,9 +50,11 @@ jobs: shell: bash run: | cd ${{ runner.workspace }}/build - lcov --capture --directory . --output-file ./coverage.info - # lcov --extract coverage.info '*/clic/src/*' --output-file coverage.info.filtered - # lcov --list coverage.info.filtered + gcovr -r . --filter='.*/clic/src/.*' --xml -o coverage.xml + + # lcov --capture --directory . --output-file ./coverage.info + # lcov --extract coverage.info '*/clic/src/*' --output-file coverage.info.filtered + # lcov --list coverage.info.filtered # lcov --remove coverage.info '/usr/include/*' -o coverage.info # lcov --directory . --capture --output-file coverage.info @@ -68,5 +70,5 @@ jobs: uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos - files: ${{ runner.workspace }}/build/coverage.info.filtered + files: ${{ runner.workspace }}/build/coverage.xml fail_ci_if_error: true # optional (default = false) From 34f6dfa3a757780939edb3fadc874d6d4911eacb Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Tue, 17 Oct 2023 10:38:44 +0200 Subject: [PATCH 24/25] style cleanup before merge --- .github/workflows/tests_and_coverage.yml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/workflows/tests_and_coverage.yml b/.github/workflows/tests_and_coverage.yml index 4ae73624f..f6afe8177 100644 --- a/.github/workflows/tests_and_coverage.yml +++ b/.github/workflows/tests_and_coverage.yml @@ -52,20 +52,6 @@ jobs: cd ${{ runner.workspace }}/build gcovr -r . --filter='.*/clic/src/.*' --xml -o coverage.xml - # lcov --capture --directory . --output-file ./coverage.info - # lcov --extract coverage.info '*/clic/src/*' --output-file coverage.info.filtered - # lcov --list coverage.info.filtered - - # lcov --remove coverage.info '/usr/include/*' -o coverage.info - # lcov --directory . --capture --output-file coverage.info - # lcov --remove coverage.info "${HOME}"'/.cache/*' '*/tests/*' --output-file coverage.info - # lcov --list coverage.info - - # - name: Format coverage - # shell: bash - # run: | - # gcovr --root . --output coverage.xml - - name: Upload coverage report uses: codecov/codecov-action@v3 with: From f729c43aba3c2efc1085cdd806d880d550615b0b Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Tue, 17 Oct 2023 10:39:32 +0200 Subject: [PATCH 25/25] set coverage default option back --- cmake/CMakeSetEnv.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/CMakeSetEnv.cmake b/cmake/CMakeSetEnv.cmake index 3d10f670b..063457a28 100644 --- a/cmake/CMakeSetEnv.cmake +++ b/cmake/CMakeSetEnv.cmake @@ -49,7 +49,7 @@ if (WIN32 AND BUILD_SHARED_LIBS) endif() # set Code coverage options (default: OFF) -option(BUILD_COVERAGE "Enable coverage reporting" ON) +option(BUILD_COVERAGE "Enable coverage reporting" OFF) message(STATUS "Build project code coverage: ${BUILD_COVERAGE}") if (BUILD_COVERAGE) set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} " --coverage -g -O0")