From 8fe701ab9e1169b4d1263b6e0397a75f3f86b6f0 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Thu, 28 Aug 2025 19:06:55 +0200 Subject: [PATCH 01/13] add code coverage analysis using codecov.io --- .github/actions/codecov/action.yml | 16 ++++++++++++++++ .github/workflows/camp.yml | 3 +++ .github/workflows/cloud_parcel.yml | 2 ++ .github/workflows/main.yml | 3 +++ .github/workflows/mpi.yml | 2 ++ .github/workflows/tchem.yml | 3 +++ Dockerfile | 5 +++-- Dockerfile.camp | 5 +++-- Dockerfile.cloud_parcel | 4 ++-- Dockerfile.mpi | 5 +++-- Dockerfile.tchem | 4 ++-- 11 files changed, 42 insertions(+), 10 deletions(-) create mode 100644 .github/actions/codecov/action.yml diff --git a/.github/actions/codecov/action.yml b/.github/actions/codecov/action.yml new file mode 100644 index 000000000..92eaaca25 --- /dev/null +++ b/.github/actions/codecov/action.yml @@ -0,0 +1,16 @@ +name: 'Upload Coverage Report' +description: 'Generates and uploads code coverage to Codecov' + +runs: + using: "composite" + steps: + - name: Generate coverage report + run: lcov --capture --directory /build --output-file coverage.info --no-external + shell: bash + + - name: Upload coverage report to codecov.io + uses: codecov/codecov-action@v5.5.0 + with: + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true + diff --git a/.github/workflows/camp.yml b/.github/workflows/camp.yml index 5be147c55..8c6dc3596 100644 --- a/.github/workflows/camp.yml +++ b/.github/workflows/camp.yml @@ -13,3 +13,6 @@ jobs: run: docker build -f Dockerfile.camp -t partmc-test . - name: Run the tests in the docker container run: docker run -t partmc-test bash -c 'cd /build; make test' + - name: Generate and upload coverage report + uses: ./.github/actions/upload-coverage + diff --git a/.github/workflows/cloud_parcel.yml b/.github/workflows/cloud_parcel.yml index 095b43d61..a433d419f 100644 --- a/.github/workflows/cloud_parcel.yml +++ b/.github/workflows/cloud_parcel.yml @@ -13,3 +13,5 @@ jobs: run: docker build -f Dockerfile.cloud_parcel -t partmc-cloud-parcel . - name: Run the tests in the docker container run: docker run -t partmc-cloud-parcel bash -c 'cd /build; make test' + - name: Generate and upload coverage report + uses: ./.github/actions/upload-coverage diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 585ee5d79..37831bb39 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,3 +13,6 @@ jobs: run: docker build -t partmc-test . - name: Run the tests in the docker container run: docker run -t partmc-test bash -c 'cd /build; make test' + - name: Generate and upload coverage report + uses: ./.github/actions/upload-coverage + diff --git a/.github/workflows/mpi.yml b/.github/workflows/mpi.yml index fc875d044..3351efc38 100644 --- a/.github/workflows/mpi.yml +++ b/.github/workflows/mpi.yml @@ -13,3 +13,5 @@ jobs: run: docker build -f Dockerfile.mpi -t partmc-test . - name: Run the tests in the docker container run: docker run -t partmc-test bash -c 'cd /build; CTEST_OUTPUT_ON_FAILURE=1 OMPI_MCA_rmaps_base_oversubscribe=false make test' + - name: Generate and upload coverage report + uses: ./.github/actions/upload-coverage diff --git a/.github/workflows/tchem.yml b/.github/workflows/tchem.yml index e7abf74d1..69a4237cc 100644 --- a/.github/workflows/tchem.yml +++ b/.github/workflows/tchem.yml @@ -13,3 +13,6 @@ jobs: run: docker build -f Dockerfile.tchem -t partmc-test . - name: Run the tests in the docker container run: docker run -t partmc-test bash -c 'export CTEST_PARALLEL_LEVEL=4; cd /build; make test' + - name: Generate and upload coverage report + uses: ./.github/actions/upload-coverage + diff --git a/Dockerfile b/Dockerfile index 5f775eae0..aed42ec36 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,7 @@ RUN dnf -y update \ netcdf-fortran-devel \ gsl-devel \ cmake \ + lcov \ && dnf clean all # NOTE: Modify .dockerignore to whitelist files/directories to copy. @@ -17,8 +18,8 @@ COPY . /partmc/ RUN mkdir /build \ && cd /build \ && cmake -D CMAKE_BUILD_TYPE=release \ - -D CMAKE_C_FLAGS_RELEASE="-O2 -g -Werror -Wall -Wextra" \ - -D CMAKE_Fortran_FLAGS_RELEASE="-O2 -g -Werror -fimplicit-none -Wall -Wextra -Wconversion -Wunderflow -Wimplicit-interface -Wno-compare-reals -Wno-unused -Wno-unused-parameter -Wno-unused-dummy-argument -fbounds-check" \ + -D CMAKE_C_FLAGS_RELEASE="-O2 -g -Werror -Wall -Wextra --coverage" \ + -D CMAKE_Fortran_FLAGS_RELEASE="-O2 -g -Werror -fimplicit-none -Wall -Wextra -Wconversion -Wunderflow -Wimplicit-interface -Wno-compare-reals -Wno-unused -Wno-unused-parameter -Wno-unused-dummy-argument -fbounds-check --coverage" \ -D ENABLE_GSL:BOOL=TRUE \ /partmc \ && make diff --git a/Dockerfile.camp b/Dockerfile.camp index 99180a908..68016a823 100644 --- a/Dockerfile.camp +++ b/Dockerfile.camp @@ -12,6 +12,7 @@ RUN dnf -y update \ openblas-devel \ gsl-devel \ cmake \ + lcov \ && dnf clean all # Build the SuiteSparse libraries for sparse matrix support @@ -76,8 +77,8 @@ RUN mkdir /build \ && cmake -D CMAKE_BUILD_TYPE=release \ -D CMAKE_C_FLAGS_DEBUG="-g" \ -D CMAKE_Fortran_FLAGS_DEBUG="-g" \ - -D CMAKE_C_FLAGS_RELEASE="-O2 -g -Werror -Wall -Wextra" \ - -D CMAKE_Fortran_FLAGS_RELEASE="-O2 -g -Werror -fimplicit-none -Wall -Wextra -Wconversion -Wunderflow -Wimplicit-interface -Wno-compare-reals -Wno-unused -Wno-unused-parameter -Wno-unused-dummy-argument -fbounds-check" \ + -D CMAKE_C_FLAGS_RELEASE="-O2 -g -Werror -Wall -Wextra --coverage" \ + -D CMAKE_Fortran_FLAGS_RELEASE="-O2 -g -Werror -fimplicit-none -Wall -Wextra -Wconversion -Wunderflow -Wimplicit-interface -Wno-compare-reals -Wno-unused -Wno-unused-parameter -Wno-unused-dummy-argument -fbounds-check --coverage" \ -D ENABLE_GSL:BOOL=TRUE \ -D ENABLE_CAMP:BOOL=TRUE \ /partmc \ diff --git a/Dockerfile.cloud_parcel b/Dockerfile.cloud_parcel index ac372bb89..798da28ad 100644 --- a/Dockerfile.cloud_parcel +++ b/Dockerfile.cloud_parcel @@ -16,8 +16,8 @@ COPY . /partmc/ RUN mkdir /build \ && cd /build \ && cmake -D CMAKE_BUILD_TYPE=release \ - -D CMAKE_C_FLAGS_RELEASE="-O2 -g -Werror -Wall -Wextra" \ - -D CMAKE_Fortran_FLAGS_RELEASE="-O2 -g -Werror -fimplicit-none -Wall -Wextra -Wconversion -Wunderflow -Wimplicit-interface -Wno-compare-reals -Wno-unused -Wno-unused-parameter -Wno-unused-dummy-argument -fbounds-check" \ + -D CMAKE_C_FLAGS_RELEASE="-O2 -g -Werror -Wall -Wextra --coverage" \ + -D CMAKE_Fortran_FLAGS_RELEASE="-O2 -g -Werror -fimplicit-none -Wall -Wextra -Wconversion -Wunderflow -Wimplicit-interface -Wno-compare-reals -Wno-unused -Wno-unused-parameter -Wno-unused-dummy-argument -fbounds-check --coverage" \ -D ENABLE_GSL:BOOL=TRUE \ -D ENABLE_SUNDIALS:BOOL=TRUE \ /partmc \ diff --git a/Dockerfile.mpi b/Dockerfile.mpi index c1b2ba30e..fdf0aeaff 100644 --- a/Dockerfile.mpi +++ b/Dockerfile.mpi @@ -9,6 +9,7 @@ RUN dnf -y update \ gsl-devel \ openmpi-devel \ cmake \ + lcov \ && dnf clean all # NOTE: Modify .dockerignore to whitelist files/directories to copy. @@ -24,8 +25,8 @@ ENV CC=mpicc RUN mkdir /build \ && cd /build \ && cmake -D CMAKE_BUILD_TYPE=release \ - -D CMAKE_C_FLAGS_RELEASE="-O2 -g -Werror -Wall -Wextra" \ - -D CMAKE_Fortran_FLAGS_RELEASE="-O2 -g -Werror -fimplicit-none -Wall -Wextra -Wconversion -Wunderflow -Wimplicit-interface -Wno-compare-reals -Wno-unused -Wno-unused-parameter -Wno-unused-dummy-argument -fbounds-check" \ + -D CMAKE_C_FLAGS_RELEASE="-O2 -g -Werror -Wall -Wextra --coverage" \ + -D CMAKE_Fortran_FLAGS_RELEASE="-O2 -g -Werror -fimplicit-none -Wall -Wextra -Wconversion -Wunderflow -Wimplicit-interface -Wno-compare-reals -Wno-unused -Wno-unused-parameter -Wno-unused-dummy-argument -fbounds-check --coverage" \ -D ENABLE_GSL:BOOL=TRUE \ -D ENABLE_MPI:BOOL=TRUE \ /partmc \ diff --git a/Dockerfile.tchem b/Dockerfile.tchem index b34de0eb8..e31123791 100644 --- a/Dockerfile.tchem +++ b/Dockerfile.tchem @@ -165,8 +165,8 @@ RUN cd /build \ && cmake -DCMAKE_BUILD_TYPE=release \ -DCMAKE_C_COMPILER=gcc \ -DCMAKE_Fortran_COMPILER=gfortran \ - -DCMAKE_C_FLAGS_RELEASE="-O2 -g -Werror -Wall -Wextra" \ - -DCMAKE_Fortran_FLAGS_RELEASE="-O2 -g -Werror -fimplicit-none -Wall -Wextra -Wconversion -Wunderflow -Wimplicit-interface -Wno-compare-reals -Wno-unused -Wno-unused-parameter -Wno-unused-dummy-argument -fbounds-check" \ + -DCMAKE_C_FLAGS_RELEASE="-O2 -g -Werror -Wall -Wextra --coverage" \ + -DCMAKE_Fortran_FLAGS_RELEASE="-O2 -g -Werror -fimplicit-none -Wall -Wextra -Wconversion -Wunderflow -Wimplicit-interface -Wno-compare-reals -Wno-unused -Wno-unused-parameter -Wno-unused-dummy-argument -fbounds-check --coverage" \ -D ENABLE_GSL:BOOL=TRUE \ -D ENABLE_TCHEM:BOOL=TRUE \ -D ENABLE_SUNDIALS:BOOL=TRUE \ From f1e697c787b39d81bb7db04b52e0bd399a1fb146 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Thu, 28 Aug 2025 19:12:17 +0200 Subject: [PATCH 02/13] fix action name --- .github/workflows/camp.yml | 2 +- .github/workflows/cloud_parcel.yml | 2 +- .github/workflows/main.yml | 2 +- .github/workflows/mpi.yml | 2 +- .github/workflows/tchem.yml | 3 +-- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/camp.yml b/.github/workflows/camp.yml index 8c6dc3596..67de92fd6 100644 --- a/.github/workflows/camp.yml +++ b/.github/workflows/camp.yml @@ -14,5 +14,5 @@ jobs: - name: Run the tests in the docker container run: docker run -t partmc-test bash -c 'cd /build; make test' - name: Generate and upload coverage report - uses: ./.github/actions/upload-coverage + uses: ./.github/actions/codecov diff --git a/.github/workflows/cloud_parcel.yml b/.github/workflows/cloud_parcel.yml index a433d419f..c03d4a1cc 100644 --- a/.github/workflows/cloud_parcel.yml +++ b/.github/workflows/cloud_parcel.yml @@ -14,4 +14,4 @@ jobs: - name: Run the tests in the docker container run: docker run -t partmc-cloud-parcel bash -c 'cd /build; make test' - name: Generate and upload coverage report - uses: ./.github/actions/upload-coverage + uses: ./.github/actions/codecov diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 37831bb39..7482aa9ea 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,5 +14,5 @@ jobs: - name: Run the tests in the docker container run: docker run -t partmc-test bash -c 'cd /build; make test' - name: Generate and upload coverage report - uses: ./.github/actions/upload-coverage + uses: ./.github/actions/codecov diff --git a/.github/workflows/mpi.yml b/.github/workflows/mpi.yml index 3351efc38..d94746fe7 100644 --- a/.github/workflows/mpi.yml +++ b/.github/workflows/mpi.yml @@ -14,4 +14,4 @@ jobs: - name: Run the tests in the docker container run: docker run -t partmc-test bash -c 'cd /build; CTEST_OUTPUT_ON_FAILURE=1 OMPI_MCA_rmaps_base_oversubscribe=false make test' - name: Generate and upload coverage report - uses: ./.github/actions/upload-coverage + uses: ./.github/actions/codecov diff --git a/.github/workflows/tchem.yml b/.github/workflows/tchem.yml index 69a4237cc..43a4b2bd6 100644 --- a/.github/workflows/tchem.yml +++ b/.github/workflows/tchem.yml @@ -14,5 +14,4 @@ jobs: - name: Run the tests in the docker container run: docker run -t partmc-test bash -c 'export CTEST_PARALLEL_LEVEL=4; cd /build; make test' - name: Generate and upload coverage report - uses: ./.github/actions/upload-coverage - + uses: ./.github/actions/codecov From b56cdaf30c3bf11ca8e806b5c1cb95c006966532 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Thu, 28 Aug 2025 19:21:55 +0200 Subject: [PATCH 03/13] pass token from workflows --- .github/actions/codecov/action.yml | 7 ++++++- .github/workflows/camp.yml | 3 ++- .github/workflows/cloud_parcel.yml | 2 ++ .github/workflows/main.yml | 3 ++- .github/workflows/mpi.yml | 2 ++ .github/workflows/tchem.yml | 2 ++ 6 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/actions/codecov/action.yml b/.github/actions/codecov/action.yml index 92eaaca25..34753a6b1 100644 --- a/.github/actions/codecov/action.yml +++ b/.github/actions/codecov/action.yml @@ -1,6 +1,11 @@ name: 'Upload Coverage Report' description: 'Generates and uploads code coverage to Codecov' +inputs: + codecov_token: + description: 'Codecov upload token' + required: true + runs: using: "composite" steps: @@ -11,6 +16,6 @@ runs: - name: Upload coverage report to codecov.io uses: codecov/codecov-action@v5.5.0 with: - token: ${{ secrets.CODECOV_TOKEN }} + token: ${{ inputs.codecov_token }} fail_ci_if_error: true diff --git a/.github/workflows/camp.yml b/.github/workflows/camp.yml index 67de92fd6..5df42f5c4 100644 --- a/.github/workflows/camp.yml +++ b/.github/workflows/camp.yml @@ -15,4 +15,5 @@ jobs: run: docker run -t partmc-test bash -c 'cd /build; make test' - name: Generate and upload coverage report uses: ./.github/actions/codecov - + with: + codecov_token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/cloud_parcel.yml b/.github/workflows/cloud_parcel.yml index c03d4a1cc..4e1fcc259 100644 --- a/.github/workflows/cloud_parcel.yml +++ b/.github/workflows/cloud_parcel.yml @@ -15,3 +15,5 @@ jobs: run: docker run -t partmc-cloud-parcel bash -c 'cd /build; make test' - name: Generate and upload coverage report uses: ./.github/actions/codecov + with: + codecov_token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7482aa9ea..45946325c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,4 +15,5 @@ jobs: run: docker run -t partmc-test bash -c 'cd /build; make test' - name: Generate and upload coverage report uses: ./.github/actions/codecov - + with: + codecov_token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/mpi.yml b/.github/workflows/mpi.yml index d94746fe7..4e418c184 100644 --- a/.github/workflows/mpi.yml +++ b/.github/workflows/mpi.yml @@ -15,3 +15,5 @@ jobs: run: docker run -t partmc-test bash -c 'cd /build; CTEST_OUTPUT_ON_FAILURE=1 OMPI_MCA_rmaps_base_oversubscribe=false make test' - name: Generate and upload coverage report uses: ./.github/actions/codecov + with: + codecov_token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/tchem.yml b/.github/workflows/tchem.yml index 43a4b2bd6..359e5eab5 100644 --- a/.github/workflows/tchem.yml +++ b/.github/workflows/tchem.yml @@ -15,3 +15,5 @@ jobs: run: docker run -t partmc-test bash -c 'export CTEST_PARALLEL_LEVEL=4; cd /build; make test' - name: Generate and upload coverage report uses: ./.github/actions/codecov + with: + codecov_token: ${{ secrets.CODECOV_TOKEN }} From f972f708826916590442e71e391783b5d1e2cbe7 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Thu, 28 Aug 2025 19:29:40 +0200 Subject: [PATCH 04/13] add missing lcov install --- Dockerfile.cloud_parcel | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile.cloud_parcel b/Dockerfile.cloud_parcel index 798da28ad..1309e723e 100644 --- a/Dockerfile.cloud_parcel +++ b/Dockerfile.cloud_parcel @@ -8,6 +8,7 @@ RUN dnf -y update \ sundials-devel \ gsl-devel \ cmake \ + lcov \ && dnf clean all # NOTE: Modify .dockerignore to whitelist files/directories to copy. From b4dd2d61bd3f38c39caf1599260bbac52c962021 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Wed, 3 Sep 2025 04:36:44 +0200 Subject: [PATCH 05/13] run lcov within docker --- .github/actions/codecov/action.yml | 2 +- .github/workflows/cloud_parcel.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/codecov/action.yml b/.github/actions/codecov/action.yml index 34753a6b1..911db1d44 100644 --- a/.github/actions/codecov/action.yml +++ b/.github/actions/codecov/action.yml @@ -10,7 +10,7 @@ runs: using: "composite" steps: - name: Generate coverage report - run: lcov --capture --directory /build --output-file coverage.info --no-external + run: docker run -t partmc-test bash -c "lcov --capture --directory /build --output-file coverage.info --no-external" shell: bash - name: Upload coverage report to codecov.io diff --git a/.github/workflows/cloud_parcel.yml b/.github/workflows/cloud_parcel.yml index 4e1fcc259..7c875b2f0 100644 --- a/.github/workflows/cloud_parcel.yml +++ b/.github/workflows/cloud_parcel.yml @@ -10,9 +10,9 @@ jobs: steps: - uses: actions/checkout@v1 - name: Build the testing docker image - run: docker build -f Dockerfile.cloud_parcel -t partmc-cloud-parcel . + run: docker build -f Dockerfile.cloud_parcel -t partmc-test . - name: Run the tests in the docker container - run: docker run -t partmc-cloud-parcel bash -c 'cd /build; make test' + run: docker run -t partmc-test bash -c 'cd /build; make test' - name: Generate and upload coverage report uses: ./.github/actions/codecov with: From 48cd33693ba982043268094aba8d222d470bf3f1 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Wed, 3 Sep 2025 07:42:06 +0200 Subject: [PATCH 06/13] add a debug directory listing to look for coverage files --- .github/actions/codecov/action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions/codecov/action.yml b/.github/actions/codecov/action.yml index 911db1d44..5db1f6a61 100644 --- a/.github/actions/codecov/action.yml +++ b/.github/actions/codecov/action.yml @@ -10,7 +10,9 @@ runs: using: "composite" steps: - name: Generate coverage report - run: docker run -t partmc-test bash -c "lcov --capture --directory /build --output-file coverage.info --no-external" + run: | + find /build + docker run -t partmc-test bash -c "lcov --capture --directory /build --output-file coverage.info --no-external" shell: bash - name: Upload coverage report to codecov.io From ea9c6447beff240e5ec68456b490a474d26e0a0c Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Wed, 3 Sep 2025 07:49:58 +0200 Subject: [PATCH 07/13] fixpath --- .github/actions/codecov/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/codecov/action.yml b/.github/actions/codecov/action.yml index 5db1f6a61..6c87cbddf 100644 --- a/.github/actions/codecov/action.yml +++ b/.github/actions/codecov/action.yml @@ -11,7 +11,7 @@ runs: steps: - name: Generate coverage report run: | - find /build + docker run -t partmc-test bash -c "find /build" docker run -t partmc-test bash -c "lcov --capture --directory /build --output-file coverage.info --no-external" shell: bash From 69506eecf97242e341dc3315b2dc7af41d8fb559 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Wed, 3 Sep 2025 07:59:00 +0200 Subject: [PATCH 08/13] set path will all subdirectories --- .github/actions/codecov/action.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/actions/codecov/action.yml b/.github/actions/codecov/action.yml index 6c87cbddf..292ec5e4e 100644 --- a/.github/actions/codecov/action.yml +++ b/.github/actions/codecov/action.yml @@ -10,9 +10,7 @@ runs: using: "composite" steps: - name: Generate coverage report - run: | - docker run -t partmc-test bash -c "find /build" - docker run -t partmc-test bash -c "lcov --capture --directory /build --output-file coverage.info --no-external" + run: docker run -t partmc-test bash -c "lcov --capture --directory /build/CMakeFiles/partmc.dir/src --output-file coverage.info --no-external" shell: bash - name: Upload coverage report to codecov.io From 7b4cb6849f016f9f82c2df0f071fb3563bfb0cb3 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Wed, 3 Sep 2025 08:23:25 +0200 Subject: [PATCH 09/13] try to find gcda files --- .github/actions/codecov/action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions/codecov/action.yml b/.github/actions/codecov/action.yml index 292ec5e4e..7d5827b6c 100644 --- a/.github/actions/codecov/action.yml +++ b/.github/actions/codecov/action.yml @@ -10,7 +10,9 @@ runs: using: "composite" steps: - name: Generate coverage report - run: docker run -t partmc-test bash -c "lcov --capture --directory /build/CMakeFiles/partmc.dir/src --output-file coverage.info --no-external" + run: | + docker run -t partmc-test bash -c "find / -name \\*.gcda" + docker run -t partmc-test bash -c "lcov --capture --directory /build/CMakeFiles/partmc.dir/src --output-file coverage.info --no-external" shell: bash - name: Upload coverage report to codecov.io From 15a4de3409b08695e1b556365160b234bad049d4 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Wed, 3 Sep 2025 08:29:58 +0200 Subject: [PATCH 10/13] try without backslashes... --- .github/actions/codecov/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/codecov/action.yml b/.github/actions/codecov/action.yml index 7d5827b6c..53aeec48f 100644 --- a/.github/actions/codecov/action.yml +++ b/.github/actions/codecov/action.yml @@ -11,7 +11,7 @@ runs: steps: - name: Generate coverage report run: | - docker run -t partmc-test bash -c "find / -name \\*.gcda" + docker run -t partmc-test bash -c "find / -name *.gcda" docker run -t partmc-test bash -c "lcov --capture --directory /build/CMakeFiles/partmc.dir/src --output-file coverage.info --no-external" shell: bash From 150e407facc2220125144509e521700448a4df63 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Thu, 4 Sep 2025 05:11:27 +0200 Subject: [PATCH 11/13] use docker shared-data --- .github/actions/codecov/action.yml | 4 +--- .github/workflows/camp.yml | 2 +- .github/workflows/cloud_parcel.yml | 2 +- .github/workflows/main.yml | 2 +- .github/workflows/mpi.yml | 2 +- .github/workflows/tchem.yml | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/actions/codecov/action.yml b/.github/actions/codecov/action.yml index 53aeec48f..eaa5346aa 100644 --- a/.github/actions/codecov/action.yml +++ b/.github/actions/codecov/action.yml @@ -10,9 +10,7 @@ runs: using: "composite" steps: - name: Generate coverage report - run: | - docker run -t partmc-test bash -c "find / -name *.gcda" - docker run -t partmc-test bash -c "lcov --capture --directory /build/CMakeFiles/partmc.dir/src --output-file coverage.info --no-external" + run: docker run -v shared-data:/build -t partmc-test bash -c "lcov --capture --directory /build --output-file coverage.info --no-external" shell: bash - name: Upload coverage report to codecov.io diff --git a/.github/workflows/camp.yml b/.github/workflows/camp.yml index 5df42f5c4..0eb399891 100644 --- a/.github/workflows/camp.yml +++ b/.github/workflows/camp.yml @@ -12,7 +12,7 @@ jobs: - name: Build the testing docker image run: docker build -f Dockerfile.camp -t partmc-test . - name: Run the tests in the docker container - run: docker run -t partmc-test bash -c 'cd /build; make test' + run: docker run -v shared-data:/build -t partmc-test bash -c 'cd /build; make test' - name: Generate and upload coverage report uses: ./.github/actions/codecov with: diff --git a/.github/workflows/cloud_parcel.yml b/.github/workflows/cloud_parcel.yml index 7c875b2f0..7a4336755 100644 --- a/.github/workflows/cloud_parcel.yml +++ b/.github/workflows/cloud_parcel.yml @@ -12,7 +12,7 @@ jobs: - name: Build the testing docker image run: docker build -f Dockerfile.cloud_parcel -t partmc-test . - name: Run the tests in the docker container - run: docker run -t partmc-test bash -c 'cd /build; make test' + run: docker run -v shared-data:/build -t partmc-test bash -c 'cd /build; make test' - name: Generate and upload coverage report uses: ./.github/actions/codecov with: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 45946325c..895b995d3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ jobs: - name: Build the testing docker image run: docker build -t partmc-test . - name: Run the tests in the docker container - run: docker run -t partmc-test bash -c 'cd /build; make test' + run: docker run -v shared-data:/build -t partmc-test bash -c 'cd /build; make test' - name: Generate and upload coverage report uses: ./.github/actions/codecov with: diff --git a/.github/workflows/mpi.yml b/.github/workflows/mpi.yml index 4e418c184..95f5a04a2 100644 --- a/.github/workflows/mpi.yml +++ b/.github/workflows/mpi.yml @@ -12,7 +12,7 @@ jobs: - name: Build the testing docker image run: docker build -f Dockerfile.mpi -t partmc-test . - name: Run the tests in the docker container - run: docker run -t partmc-test bash -c 'cd /build; CTEST_OUTPUT_ON_FAILURE=1 OMPI_MCA_rmaps_base_oversubscribe=false make test' + run: docker run -v shared-data:/build -t partmc-test bash -c 'cd /build; CTEST_OUTPUT_ON_FAILURE=1 OMPI_MCA_rmaps_base_oversubscribe=false make test' - name: Generate and upload coverage report uses: ./.github/actions/codecov with: diff --git a/.github/workflows/tchem.yml b/.github/workflows/tchem.yml index 359e5eab5..176afab2c 100644 --- a/.github/workflows/tchem.yml +++ b/.github/workflows/tchem.yml @@ -12,7 +12,7 @@ jobs: - name: Build the testing docker image run: docker build -f Dockerfile.tchem -t partmc-test . - name: Run the tests in the docker container - run: docker run -t partmc-test bash -c 'export CTEST_PARALLEL_LEVEL=4; cd /build; make test' + run: docker run -v shared-data:/build -t partmc-test bash -c 'export CTEST_PARALLEL_LEVEL=4; cd /build; make test' - name: Generate and upload coverage report uses: ./.github/actions/codecov with: From b991460fcdecc9203573e379c55064d811615d48 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Thu, 4 Sep 2025 05:22:57 +0200 Subject: [PATCH 12/13] export report file --- .github/actions/codecov/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/codecov/action.yml b/.github/actions/codecov/action.yml index eaa5346aa..1c9b2c9a8 100644 --- a/.github/actions/codecov/action.yml +++ b/.github/actions/codecov/action.yml @@ -10,7 +10,7 @@ runs: using: "composite" steps: - name: Generate coverage report - run: docker run -v shared-data:/build -t partmc-test bash -c "lcov --capture --directory /build --output-file coverage.info --no-external" + run: docker run -v shared-data:/build -v $(pwd):/codecov -t partmc-test bash -c "lcov --capture --directory /build --output-file /codecov/coverage.info --no-external" shell: bash - name: Upload coverage report to codecov.io From cc8d7ccfbbfb51f5d12bd074815ea8cf4902a1f5 Mon Sep 17 00:00:00 2001 From: Jeffrey Curtis Date: Fri, 5 Sep 2025 11:18:30 -0500 Subject: [PATCH 13/13] empty commit to try new codecov token