Skip to content

Commit

Permalink
Fast test of code coverage:
Browse files Browse the repository at this point in the history
  - add call to coverage action;
  - change download path of Mmg (remove mmg folder) to allow codecov to find project sources
  - disable long tests and enable only very short one
  • Loading branch information
Algiane committed Apr 9, 2024
1 parent e3f967e commit 688fc30
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/long-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ jobs:
uses: ./.github/workflows/main-job.yml
with:
cmake_build_type: RelWithAssert
add_cmake_cfg_args: -D LONG_TESTS=ON
add_cmake_cfg_args: -D VERY_SHORT_TESTS=ON
branch_name: ${{github.event.inputs.branch}}
code_coverage: true
98 changes: 52 additions & 46 deletions .github/workflows/main-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,17 +253,15 @@ jobs:
if: inputs.branch_name
with:
ref: ${{github.event.inputs.branch}}
path: mmg

# checkout the event branch for automatic workflows
- uses: actions/checkout@v3
if: inputs.branch_name == ''
with:
path: mmg

- name: Test compilation with shared libs linkage
run: |
cmake -Smmg -Bbuild_shared \
cmake -S. -Bbuild_shared \
${{ env.CMAKE_C_FLG }} \
${{ env.FORT_FLG }} \
-DCI_CONTEXT=ON \
Expand All @@ -285,7 +283,7 @@ jobs:

#- name: Test compilation without library linkage
# run: |
# cmake -Smmg -Bbuild_nolibs \
# cmake -S. -Bbuild_nolibs \
# ${{ env.C_FLG }} \
# ${{ env.FORT_FLG }} \
# -DCI_CONTEXT=ON \
Expand All @@ -306,7 +304,7 @@ jobs:
#
#- name: Configure Mmg with static libs (default behaviour)
# run: |
# cmake -Smmg -Bbuild \
# cmake -S. -Bbuild \
# ${{ env.C_FLG }} \
# ${{ env.FORT_FLG }} \
# -DCMAKE_INSTALL_PREFIX=mmg-install \
Expand All @@ -325,44 +323,52 @@ jobs:
# ${{ inputs.add_cmake_cfg_args }}
# shell: bash
#
#- name: Build Mmg
# run: |
# cmake --build build --config ${{ env.BUILD_TYPE }} -j ${{ env.NJOBS }}
#- name: Install Mmg
# run: |
# cmake --build build --target install --config ${{ env.BUILD_TYPE }} -j ${{ env.NJOBS }}
#
#- name: Archive production artifacts
# uses: actions/upload-artifact@v3
# with:
# name: Mmg-bin
# path: |
# build/bin
#
#- name: Test Mmg with in32_t integers
# # Run long tests only with vtk off and int32_t integers
# if: matrix.vtk == 'off' && matrix.int == 'int32_t'
# run: |
# cd build
# ctest --timeout 7200 -VV -C ${{ env.BUILD_TYPE }} -j ${{ env.NJOBS }}
#
#- name: Test Mmg with in64_t integers
# # Run long tests only on ubuntu with pattern off, scotch on, vtk on and int64_t integers
# if: matrix.os == 'ubuntu-20.04' && matrix.pattern == 'off' && matrix.scotch == 'on' && matrix.vtk == 'on' && matrix.int == 'int64_t'
# run: |
# cd build
# ctest --timeout 7200 -VV -C ${{ env.BUILD_TYPE }} -j ${{ env.NJOBS }}
#
#- name: Test non native I/Os of Mmg
# if: matrix.vtk == 'on'
# run: |
# cd build
# ctest -R "msh|vtk" -VV -C ${{ env.BUILD_TYPE }} -j ${{ env.NJOBS }}

# - name: Archive production artifacts for tests
# if: success() || failure()
# uses: actions/upload-artifact@v2
# with:
# name: Mmg-tests
# path: |
# build/TEST_OUTPUTS
- name: Build Mmg
run: |
cmake --build build --config ${{ env.BUILD_TYPE }} -j ${{ env.NJOBS }}
- name: Install Mmg
run: |
cmake --build build --target install --config ${{ env.BUILD_TYPE }} -j ${{ env.NJOBS }}
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: Mmg-bin
path: |
build/bin
- name: Test Mmg with in32_t integers
# Run long tests only with vtk off and int32_t integers
if: matrix.vtk == 'off' && matrix.int == 'int32_t'
run: |
cd build
ctest --timeout 7200 -VV -C ${{ env.BUILD_TYPE }} -j ${{ env.NJOBS }}
- name: Test Mmg with in64_t integers
# Run long tests only on ubuntu with pattern off, scotch on, vtk on and int64_t integers
if: matrix.os == 'ubuntu-20.04' && matrix.pattern == 'off' && matrix.scotch == 'on' && matrix.vtk == 'on' && matrix.int == 'int64_t'
run: |
cd build
ctest --timeout 7200 -VV -C ${{ env.BUILD_TYPE }} -j ${{ env.NJOBS }}
- name: Test non native I/Os of Mmg
if: matrix.vtk == 'on'
run: |
cd build
ctest -R "msh|vtk" -VV -C ${{ env.BUILD_TYPE }} -j ${{ env.NJOBS }}
- name: Archive production artifacts for tests
if: success() || failure()
uses: actions/upload-artifact@v2
with:
name: Mmg-tests
path: |
build/TEST_OUTPUTS
- name: Upload coverage to Codecov
#if: inputs.CODE_COVERAGE
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 688fc30

Please sign in to comment.