Add interface for per element operations #333
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: run-coverage | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
schedule: | |
- cron: '0 8 * * *' #every day at 8am | |
jobs: | |
runCoverage: | |
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
compiler: [g++] | |
language: ['cpp'] | |
build_type: [Debug] | |
# Permissions needed for coverage paste | |
permissions: | |
#security-events: write | |
pull-requests: write | |
steps: | |
- name: Install CMake | |
run: | | |
sudo apt-get update -yq | |
sudo apt-get install -yq cmake | |
cmake --version | |
- name: Install additional dependencies | |
run: | | |
sudo apt-get install -yq doxygen | |
sudo apt-get install -yq graphviz | |
sudo apt-get install -yq libhdf5-mpi-dev | |
## Kokkos | |
- name: Kokkos Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
repository: kokkos/kokkos | |
path: kokkos | |
ref: develop | |
- name: Kokkos Configure CMake | |
shell: bash | |
run: cmake -S $GITHUB_WORKSPACE/kokkos -B ${{runner.workspace}}/build-kokkos | |
-DCMAKE_CXX_COMPILER=${{ matrix.compiler }} | |
-DKokkos_ENABLE_SERIAL=ON | |
-DKokkos_ENABLE_OPENMP=OFF | |
-DKokkos_ENABLE_DEBUG=ON | |
-DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/build-kokkos/install | |
- name: Kokkos Build | |
shell: bash | |
run: cmake --build ${{runner.workspace}}/build-kokkos --parallel 2 --target install | |
## Omegah | |
- name: Omega_h Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
repository: sandialabs/omega_h | |
path: omegah | |
- name: Omega_h Configure CMake | |
shell: bash | |
run: cmake -S $GITHUB_WORKSPACE/omegah -B ${{runner.workspace}}/build-omegah | |
-DCMAKE_CXX_COMPILER=${{ matrix.compiler }} | |
-DBUILD_SHARED_LIBS=OFF | |
-DOmega_h_USE_Kokkos=ON | |
-DKokkos_PREFIX=${{runner.workspace}}/build-kokkos/install/lib/cmake | |
-DOmega_h_USE_MPI=OFF | |
-DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/build-omegah/install | |
- name: Omega_h Build | |
shell: bash | |
run: cmake --build ${{runner.workspace}}/build-omegah --parallel 2 --target install | |
## Cabana | |
- name: Cabana Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
repository: ECP-copa/Cabana | |
path: cabana | |
- name: Cabana Configure CMake | |
shell: bash | |
run: cmake -S $GITHUB_WORKSPACE/cabana -B ${{runner.workspace}}/build-cabana | |
-DCMAKE_CXX_COMPILER=${{matrix.compiler}} | |
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} | |
-DKokkos_DIR=${{runner.workspace}}/build-kokkos/install/lib/cmake/Kokkos | |
-DCabana_ENABLE_MPI=OFF | |
-DCabana_ENABLE_CAJITA=OFF | |
-DCabana_ENABLE_TESTING=OFF | |
-DCabana_ENABLE_EXAMPLES=OFF | |
-DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/build-cabana/install | |
- name: Cabana Build | |
shell: bash | |
run: cmake --build ${{runner.workspace}}/build-cabana --parallel 2 --target install | |
## MeshFields | |
- name: MeshFields Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
repository: SCOREC/meshFields | |
path: meshFields | |
- name: Install lcov 1.16 | |
shell: bash | |
run: sudo apt-get install -yq lcov | |
- name: MeshFields Configure CMake | |
shell: bash | |
run: cmake -S $GITHUB_WORKSPACE/meshFields -B ${{runner.workspace}}/build-meshFields | |
-D meshFields_ENABLE_COVERAGE_BUILD=ON | |
-D CMAKE_BUILD_TYPE=${{matrix.build_type}} | |
-DKokkos_ROOT=${{runner.workspace}}/build-kokkos/install | |
-DCabana_ROOT=${{runner.workspace}}/build-cabana/install | |
-DOmega_h_ROOT=${{runner.workspace}}/build-omegah/install | |
-DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/build-meshFields/install | |
-DLCOV_SYSTEM_EXCLUDE_PATHS="/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/*\;/usr/include/*" | |
- name: Run MeshFields for coverage | |
working-directory: ${{runner.workspace}}/build-meshFields | |
shell: bash | |
run: | | |
make | |
make coverage | |
#Uploads coverage directory with lcov generated HTML | |
- name: Upload lcov report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage | |
path: ${{runner.workspace}}/build-meshFields/coverage | |
# Generate a report readable from console ------------------------------------- | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Convert Lcov to Cobertura | |
run: | | |
pip install lcov_cobertura | |
lcov_cobertura ${{runner.workspace}}/build-meshFields/coverage.info | |
- name: Code Coverage Summary Report | |
uses: irongut/[email protected] | |
with: | |
filename: coverage.xml | |
format: markdown | |
output: both | |
- name: Add Coverage PR Comment | |
uses: marocchino/sticky-pull-request-comment@v2 | |
if: github.event_name == 'pull_request' | |
with: | |
recreate: true | |
path: code-coverage-results.md |