Skip to content

Commit

Permalink
Only build gcovr report in one job
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderRichert-NOAA committed Jan 19, 2024
1 parent 8723888 commit 30a9f1b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/GCC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ jobs:

steps:

- name: decide-doc-build
# Only do Doxygen and gcovr build for one job
- name: decide-doc-gcovr-build
run: |
if [[ "${{ matrix.cmake_opts }}" == "-D32BIT=ON" && "${{ matrix.gcc_ver }}" == 11 && "${{ matrix.mpi }}" == mpich ]]; then
echo 'builddocs=ON' | tee -a ${GITHUB_ENV}
echo 'devbuild=ON' | tee -a ${GITHUB_ENV}
fi
- name: apt-install
Expand Down Expand Up @@ -84,7 +85,7 @@ jobs:
sed -i 's/doc /upp_doc /' upp/docs/CMakeLists.txt
mkdir ${GITHUB_WORKSPACE}/fv3atm/build
cd ${GITHUB_WORKSPACE}/fv3atm/build
cmake ${GITHUB_WORKSPACE}/fv3atm -DBUILD_TESTING=ON ${{ matrix.cmake_opts }} -DENABLE_DOCS=${{ env.builddocs }}
cmake ${GITHUB_WORKSPACE}/fv3atm -DBUILD_TESTING=ON ${{ matrix.cmake_opts }} -DENABLE_DOCS=${{ env.devbuild }}
make -j2
ls -l /home/runner/work/fv3atm/fv3atm/fv3atm/io
Expand All @@ -94,21 +95,23 @@ jobs:
ctest -j2 --output-on-failure --rerun-failed
- name: get-test-coverage
if: ${{ env.devbuild == 'ON' }}
run: |
f=${GITHUB_WORKSPACE}/fv3atm
cd $f/build
gcovr -r .. -v --html-details --exclude ${f}/tests --exclude $f/stochastic_physics_repo --exclude $f/build/ccpp --exclude $f/ccpp/physics --exclude $f/ccpp/framework --exclude $f/atmos_cubed_sphere --exclude CMakeFiles --print-summary -o test-coverage.html
- name: upload-test-coverage
uses: actions/upload-artifact@v4
if: ${{ env.devbuild == 'ON' }}
with:
name: test-coverage-fv3atm-${{ github.sha }}
path: |
${{ github.workspace }}/fv3atm/build/*.html
${{ github.workspace }}/fv3atm/build/*.css
- uses: actions/upload-artifact@v4
if: ${{ env.builddocs == 'ON' }}
if: ${{ env.devbuild == 'ON' }}
with:
name: docs
path: |
Expand Down

0 comments on commit 30a9f1b

Please sign in to comment.