File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : ' Upload Coverage Report'
2+ description : ' Generates and uploads code coverage to Codecov'
3+
4+ inputs :
5+ codecov_token :
6+ description : ' Codecov upload token'
7+ required : true
8+
9+ runs :
10+ using : " composite"
11+ steps :
12+ - name : Generate coverage report
13+ 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"
14+ shell : bash
15+
16+ - name : Upload coverage report to codecov.io
17+ uses : codecov/codecov-action@v5.5.0
18+ with :
19+ token : ${{ inputs.codecov_token }}
20+ fail_ci_if_error : true
21+
Original file line number Diff line number Diff line change 1212 - name : Build the testing docker image
1313 run : docker build -f Dockerfile.camp -t partmc-test .
1414 - name : Run the tests in the docker container
15- run : docker run -t partmc-test bash -c 'cd /build; make test'
15+ run : docker run -v shared-data:/build -t partmc-test bash -c 'cd /build; make test'
16+ - name : Generate and upload coverage report
17+ uses : ./.github/actions/codecov
18+ with :
19+ codecov_token : ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change 1010 steps :
1111 - uses : actions/checkout@v1
1212 - name : Build the testing docker image
13- run : docker build -f Dockerfile.cloud_parcel -t partmc-cloud-parcel .
13+ run : docker build -f Dockerfile.cloud_parcel -t partmc-test .
1414 - name : Run the tests in the docker container
15- run : docker run -t partmc-cloud-parcel bash -c 'cd /build; make test'
15+ run : docker run -v shared-data:/build -t partmc-test bash -c 'cd /build; make test'
16+ - name : Generate and upload coverage report
17+ uses : ./.github/actions/codecov
18+ with :
19+ codecov_token : ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change 1212 - name : Build the testing docker image
1313 run : docker build -t partmc-test .
1414 - name : Run the tests in the docker container
15- run : docker run -t partmc-test bash -c 'cd /build; make test'
15+ run : docker run -v shared-data:/build -t partmc-test bash -c 'cd /build; make test'
16+ - name : Generate and upload coverage report
17+ uses : ./.github/actions/codecov
18+ with :
19+ codecov_token : ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change 1212 - name : Build the testing docker image
1313 run : docker build -f Dockerfile.mpi -t partmc-test .
1414 - name : Run the tests in the docker container
15- run : docker run -t partmc-test bash -c 'cd /build; CTEST_OUTPUT_ON_FAILURE=1 OMPI_MCA_rmaps_base_oversubscribe=false make test'
15+ 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'
16+ - name : Generate and upload coverage report
17+ uses : ./.github/actions/codecov
18+ with :
19+ codecov_token : ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change 1212 - name : Build the testing docker image
1313 run : docker build -f Dockerfile.tchem -t partmc-test .
1414 - name : Run the tests in the docker container
15- run : docker run -t partmc-test bash -c 'export CTEST_PARALLEL_LEVEL=4; cd /build; make test'
15+ run : docker run -v shared-data:/build -t partmc-test bash -c 'export CTEST_PARALLEL_LEVEL=4; cd /build; make test'
16+ - name : Generate and upload coverage report
17+ uses : ./.github/actions/codecov
18+ with :
19+ codecov_token : ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ RUN dnf -y update \
99 netcdf-fortran-devel \
1010 gsl-devel \
1111 cmake \
12+ lcov \
1213 && dnf clean all
1314
1415# NOTE: Modify .dockerignore to whitelist files/directories to copy.
@@ -17,8 +18,8 @@ COPY . /partmc/
1718RUN mkdir /build \
1819 && cd /build \
1920 && cmake -D CMAKE_BUILD_TYPE=release \
20- -D CMAKE_C_FLAGS_RELEASE="-O2 -g -Werror -Wall -Wextra" \
21- -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" \
21+ -D CMAKE_C_FLAGS_RELEASE="-O2 -g -Werror -Wall -Wextra --coverage " \
22+ -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 " \
2223 -D ENABLE_GSL:BOOL=TRUE \
2324 /partmc \
2425 && make
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ RUN dnf -y update \
1212 openblas-devel \
1313 gsl-devel \
1414 cmake \
15+ lcov \
1516 && dnf clean all
1617
1718# Build the SuiteSparse libraries for sparse matrix support
@@ -76,8 +77,8 @@ RUN mkdir /build \
7677 && cmake -D CMAKE_BUILD_TYPE=release \
7778 -D CMAKE_C_FLAGS_DEBUG="-g" \
7879 -D CMAKE_Fortran_FLAGS_DEBUG="-g" \
79- -D CMAKE_C_FLAGS_RELEASE="-O2 -g -Werror -Wall -Wextra" \
80- -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" \
80+ -D CMAKE_C_FLAGS_RELEASE="-O2 -g -Werror -Wall -Wextra --coverage " \
81+ -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 " \
8182 -D ENABLE_GSL:BOOL=TRUE \
8283 -D ENABLE_CAMP:BOOL=TRUE \
8384 /partmc \
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ RUN dnf -y update \
88 sundials-devel \
99 gsl-devel \
1010 cmake \
11+ lcov \
1112 && dnf clean all
1213
1314# NOTE: Modify .dockerignore to whitelist files/directories to copy.
@@ -16,8 +17,8 @@ COPY . /partmc/
1617RUN mkdir /build \
1718 && cd /build \
1819 && cmake -D CMAKE_BUILD_TYPE=release \
19- -D CMAKE_C_FLAGS_RELEASE="-O2 -g -Werror -Wall -Wextra" \
20- -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" \
20+ -D CMAKE_C_FLAGS_RELEASE="-O2 -g -Werror -Wall -Wextra --coverage " \
21+ -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 " \
2122 -D ENABLE_GSL:BOOL=TRUE \
2223 -D ENABLE_SUNDIALS:BOOL=TRUE \
2324 /partmc \
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ RUN dnf -y update \
99 gsl-devel \
1010 openmpi-devel \
1111 cmake \
12+ lcov \
1213 && dnf clean all
1314
1415# NOTE: Modify .dockerignore to whitelist files/directories to copy.
@@ -24,8 +25,8 @@ ENV CC=mpicc
2425RUN mkdir /build \
2526 && cd /build \
2627 && cmake -D CMAKE_BUILD_TYPE=release \
27- -D CMAKE_C_FLAGS_RELEASE="-O2 -g -Werror -Wall -Wextra" \
28- -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" \
28+ -D CMAKE_C_FLAGS_RELEASE="-O2 -g -Werror -Wall -Wextra --coverage " \
29+ -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 " \
2930 -D ENABLE_GSL:BOOL=TRUE \
3031 -D ENABLE_MPI:BOOL=TRUE \
3132 /partmc \
You can’t perform that action at this time.
0 commit comments