Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/actions/codecov/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
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:
- name: Generate coverage report
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
uses: codecov/codecov-action@v5.5.0
with:
token: ${{ inputs.codecov_token }}
fail_ci_if_error: true

6 changes: 5 additions & 1 deletion .github/workflows/camp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ 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:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
8 changes: 6 additions & 2 deletions .github/workflows/cloud_parcel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ 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 -v shared-data:/build -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 }}
6 changes: 5 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ 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:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
6 changes: 5 additions & 1 deletion .github/workflows/mpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ 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:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
6 changes: 5 additions & 1 deletion .github/workflows/tchem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ 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:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
5 changes: 3 additions & 2 deletions Dockerfile.camp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile.cloud_parcel
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -16,8 +17,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 \
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile.mpi
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.tchem
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
Loading