From da5d4dd129d67094846063846c9cd4e6c5b7ea36 Mon Sep 17 00:00:00 2001 From: Kimmy Mu Date: Tue, 12 Jan 2021 11:16:19 -0500 Subject: [PATCH 1/5] Use coverall for codecoverage with github action --- .github/workflows/main.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 69a4049ed..521d51bba 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,5 @@ # This is a basic workflow to help you get started with Actions +# CodeCoverage result can be found at https://coveralls.io/github/HDFGroup/hermes name: GitHub Actions @@ -47,6 +48,7 @@ jobs: sudo apt-get install -y autoconf sudo apt-get install -y automake sudo apt-get install -y mpich + sudo apt-get install -y lcov sudo apt-get install -y zlib1g-dev sudo apt-get install -y libsdl2-dev @@ -55,4 +57,14 @@ jobs: run: ci/install_deps.sh - name: Build and Test - run: ci/install_hermes.sh + run: | + ci/install_hermes.sh + mkdir -p "${GITHUB_WORKSPACE}/coverage" + pushd build/src/CMakeFiles/hermes.dir + gcov -r buffer_pool.cc.gcno + lcov -c -d . -o "${GITHUB_WORKSPACE}/coverage/lcov.info" + + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} From 337029e655483f9f1185d2a2e8d3bf25a369e650 Mon Sep 17 00:00:00 2001 From: jya-kmu <53388330+jya-kmu@users.noreply.github.com> Date: Tue, 12 Jan 2021 16:47:08 -0500 Subject: [PATCH 2/5] Update main.yml space issue --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 521d51bba..127b5105b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -66,5 +66,5 @@ jobs: - name: Coveralls uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} + with: + github-token: ${{ secrets.GITHUB_TOKEN }} From c29f6df18125e68a2f999fbb73edaa3d74151a38 Mon Sep 17 00:00:00 2001 From: jya-kmu <53388330+jya-kmu@users.noreply.github.com> Date: Tue, 12 Jan 2021 16:59:39 -0500 Subject: [PATCH 3/5] Update main.yml --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 127b5105b..52dd5b61c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,7 +61,6 @@ jobs: ci/install_hermes.sh mkdir -p "${GITHUB_WORKSPACE}/coverage" pushd build/src/CMakeFiles/hermes.dir - gcov -r buffer_pool.cc.gcno lcov -c -d . -o "${GITHUB_WORKSPACE}/coverage/lcov.info" - name: Coveralls From 3f6c72d5492fde1c8f22c07b349f67713b907f10 Mon Sep 17 00:00:00 2001 From: jya-kmu <53388330+jya-kmu@users.noreply.github.com> Date: Tue, 12 Jan 2021 17:55:49 -0500 Subject: [PATCH 4/5] Update install_hermes.sh add HERMES_ENABLE_COVERAGE --- ci/install_hermes.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/install_hermes.sh b/ci/install_hermes.sh index 4c139847a..9023f7496 100755 --- a/ci/install_hermes.sh +++ b/ci/install_hermes.sh @@ -19,6 +19,7 @@ cmake \ -DCMAKE_CXX_COMPILER=`which mpicxx` \ -DCMAKE_C_COMPILER=`which mpicc` \ -DBUILD_SHARED_LIBS=ON \ + -DHERMES_ENABLE_COVERAGE=ON \ -DHERMES_INTERCEPT_IO=ON \ -DHERMES_COMMUNICATION_MPI=ON \ -DHERMES_BUILD_BUFFER_POOL_VISUALIZER=ON \ From c7930222eb97b10c55455df6d5dfa5228e1e7406 Mon Sep 17 00:00:00 2001 From: jya-kmu <53388330+jya-kmu@users.noreply.github.com> Date: Tue, 12 Jan 2021 18:01:08 -0500 Subject: [PATCH 5/5] remove word duplication and extra space --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e3d177164..3840915c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -152,7 +152,7 @@ option(HERMES_MDM_STORAGE_STBDS option(HERMES_DEBUG_HEAP "Store Heap debug information for visualization." OFF) option(HERMES_BUILD_BENCHMARKS "Build the Hermes benchmark suite." OFF) option(HERMES_ENABLE_TIMING "Turn on timing of selected functions." OFF) -option(HERMES_ENABLE_COVERAGE "Enable codecode coverage." OFF) +option(HERMES_ENABLE_COVERAGE "Enable code coverage." OFF) # Calculate code coverage with debug mode if(HERMES_ENABLE_COVERAGE) if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")