Repository navigation
Dof access #565
Workflow file for this run
This file contains hidden or 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
| # Now it is separated to avoid affecting MPICH is not compatible with Ubuntu-latest and bear is not compatible with OPENMPI. This workflow should be merged after either compatibility issue is resolved. | |
| name: Clang-Tidy Check | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| # Manual trigger | |
| workflow_dispatch: | |
| jobs: | |
| clang-tidy-check: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| strategy: | |
| matrix: | |
| build_type: [Release] | |
| memory_test: [ON, OFF] | |
| compiler: [g++] | |
| language: ['cpp'] | |
| exclude: | |
| - build_type: Release | |
| memory_test: ON | |
| - build_type: RelWithDebInfo | |
| memory_test: OFF | |
| steps: | |
| - name: Update packages | |
| run: sudo apt-get update | |
| - name: Install mpich | |
| run: sudo apt-get install -yq libmpich-dev mpich | |
| - name: Install cmake | |
| run: sudo apt-get install -yq cmake | |
| - name: Install clang-tidy | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -yq clang-tidy-20 | |
| - uses: actions/checkout@v4 | |
| - name: build Catch2 | |
| uses: ./.github/actions/install-repo | |
| with: | |
| repo-name: 'Catch2-openmpi' | |
| repo-path: 'catchorg/Catch2' | |
| repo-ref: 'v3.11.0' | |
| cache: true | |
| - name: build kokkos | |
| uses: ./.github/actions/install-repo | |
| with: | |
| repo-name: 'kokkos-openmpi' | |
| repo-path: 'kokkos/kokkos' | |
| repo-ref: '4.6.01' | |
| cache: true | |
| options: '-DCMAKE_CXX_STANDARD=20 | |
| -DBUILD_SHARED_LIBS=OFF | |
| -DKokkos_ENABLE_SERIAL=ON | |
| -DKokkos_ENABLE_OPENMP=OFF | |
| -DKokkos_ENABLE_CUDA=OFF | |
| -DKokkos_ENABLE_CUDA_LAMBDA=OFF | |
| -DKokkos_ENABLE_CUDA_CONSTEXPR=OFF' | |
| - name: build kokkos-kernels | |
| uses: ./.github/actions/install-repo | |
| with: | |
| repo-name: 'kokkos-kernels-openmpi' | |
| repo-path: 'kokkos/kokkos-kernels' | |
| repo-ref: '4.6.01' | |
| cache: true | |
| options: '-DCMAKE_CXX_STANDARD=20 | |
| -DBUILD_SHARED_LIBS=OFF | |
| -DKokkos_DIR=${{ runner.temp }}/build-kokkos-openmpi/install/lib/cmake/Kokkos' | |
| - name: build omega_h | |
| uses: ./.github/actions/install-repo | |
| with: | |
| repo-name: 'omega_h-openmpi' | |
| repo-path: 'SCOREC/omega_h' | |
| repo-ref: '2b2e778472f48a85a5ff5e70083e3a415e58be72' | |
| cache: true | |
| options: '-DCMAKE_CXX_COMPILER=`which mpicxx` | |
| -DCMAKE_C_COMPILER=`which mpicc` | |
| -DBUILD_SHARED_LIBS=OFF | |
| -DOmega_h_USE_MPI=ON | |
| -DOmega_h_USE_Kokkos=ON | |
| -DBUILD_TESTING=OFF | |
| -DMPIEXEC_EXECUTABLE=`which mpirun` | |
| -DKokkos_DIR=${{ runner.temp }}/build-kokkos-openmpi/install/lib/cmake/Kokkos' | |
| - name: build meshFields | |
| uses: ./.github/actions/install-repo | |
| with: | |
| repo-name: 'meshFields-openmpi' | |
| repo-path: 'SCOREC/meshFields' | |
| repo-ref: 'b9984520c20f73955a3b4e25e4907780b91d430f' | |
| cache: true | |
| options: '-DCMAKE_CXX_COMPILER=`which mpicxx` | |
| -DCMAKE_C_COMPILER=`which mpicc` | |
| -DMPIEXEC_EXECUTABLE=`which mpirun` | |
| -DKokkos_DIR=${{ runner.temp }}/build-kokkos-openmpi/install/lib/cmake/Kokkos | |
| -DOmega_h_DIR=${{ runner.temp }}/build-omega_h-openmpi/install/lib/cmake/Omega_h' | |
| - name: build perfstubs | |
| uses: ./.github/actions/install-repo | |
| with: | |
| repo-name: 'perfstubs-openmpi' | |
| repo-path: 'UO-OACISS/perfstubs' | |
| repo-ref: 'a1fa3feb1d89214e28047f166500351074b5f0c2' | |
| cache: true | |
| options: '-DCMAKE_CXX_COMPILER=mpicxx' | |
| - name: build ADIOS2 | |
| uses: ./.github/actions/install-repo | |
| with: | |
| repo-name: 'ADIOS2-openmpi' | |
| repo-path: 'ornladios/ADIOS2' | |
| repo-ref: 'v2.10.2' | |
| cache: true | |
| options: '-DADIOS2_USE_CUDA=OFF' | |
| - name: clone petsc | |
| id: clone-petsc | |
| run: | | |
| cd ${{ runner.temp }} | |
| git clone -b v3.25.2 https://gitlab.com/petsc/petsc.git petsc-openmpi | |
| cd petsc-openmpi | |
| echo "petsc-commit-hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | |
| - name: Cache PETSc | |
| id: cache-petsc | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ runner.temp }}/petsc-openmpi | |
| key: build-petsc-openmpi-${{ steps.clone-petsc.outputs.petsc-commit-hash }} | |
| # PETSc check is removed due to a PETSc test failure using openmpi | |
| - name: build petsc | |
| if: steps.cache-petsc.outputs.cache-hit != 'true' | |
| run: | | |
| cd ${{ runner.temp }}/petsc-openmpi | |
| ./configure \ | |
| PETSC_ARCH=ubuntu-kokkos \ | |
| --with-kokkos-dir="${{ runner.temp }}/build-kokkos-openmpi/install/" \ | |
| --with-kokkos-kernels-dir="${{ runner.temp }}/build-kokkos-kernels-openmpi/install/" \ | |
| --with-cuda=0 \ | |
| --with-shared-libraries=0 \ | |
| --download-fblaslapack | |
| make all | |
| - name: build redev | |
| uses: ./.github/actions/install-repo | |
| with: | |
| repo-name: 'redev-openmpi' | |
| repo-path: 'SCOREC/redev' | |
| repo-ref: '1e4c876f786b420f060695ba2c1079447e975b69' | |
| cache: true | |
| options: '-DCMAKE_CXX_COMPILER=`which mpicxx` | |
| -DMPIEXEC_EXECUTABLE=`which mpirun` | |
| -DCMAKE_BUILD_TYPE=Release | |
| -DBUILD_SHARED_LIBS=OFF | |
| -DADIOS2_DIR=${{ runner.temp }}/build-ADIOS2-openmpi/install/lib/cmake/adios2 | |
| -Dperfstubs_DIR=${{ runner.temp }}/build-perfstubs-openmpi/install/lib/cmake' | |
| - name: checkout pcms_testcases | |
| uses: actions/checkout@v3 | |
| with: | |
| repository: jacobmerson/pcms_testcases | |
| path: pcms_testcases | |
| - name: Install fftw3 | |
| run: sudo apt-get install -yq libfftw3-dev pkg-config | |
| - name: configure pcms | |
| run : | | |
| mkdir ${{ runner.temp }}/build-pcms | |
| cmake -S . -B ${{ runner.temp }}/build-pcms -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
| -DCMAKE_C_COMPILER=mpicc \ | |
| -DCMAKE_CXX_COMPILER=mpicxx \ | |
| -DCMAKE_Fortran_COMPILER=mpifort \ | |
| -DPCMS_ENABLE_PETSC=ON \ | |
| -DPETSC_LINK_STATIC=ON \ | |
| -DPETSC_DIR=${{ runner.temp }}/petsc-openmpi \ | |
| -DPETSC_ARCH=ubuntu-kokkos \ | |
| -DPCMS_TIMEOUT=10 \ | |
| -DCatch2_DIR=${{ runner.temp }}/build-Catch2-openmpi/install/lib/cmake/Catch2 \ | |
| -DOmega_h_DIR=${{ runner.temp }}/build-omega_h-openmpi/install/lib/cmake/Omega_h \ | |
| -Dmeshfields_DIR=${{ runner.temp }}/build-meshFields-openmpi/install/lib/cmake/meshfields \ | |
| -Dredev_DIR=${{ runner.temp }}/build-redev-openmpi/install/lib/cmake/redev \ | |
| -DMPIEXEC_EXECUTABLE=mpirun \ | |
| -DADIOS2_DIR=${{ runner.temp }}/build-ADIOS2-openmpi/install/lib/cmake/adios2 \ | |
| -Dperfstubs_DIR=${{ runner.temp }}/build-perfstubs-openmpi/install/lib/cmake \ | |
| -DKokkos_DIR=${{ runner.temp }}/build-kokkos-openmpi/install/lib/cmake/Kokkos \ | |
| -DKokkosKernels_DIR=${{ runner.temp }}/build-kokkos-kernels-openmpi/install/lib/cmake/KokkosKernels/ \ | |
| -DPCMS_TEST_DATA_DIR=$PWD/pcms_testcases \ | |
| -DPCMS_ENABLE_CLANG_TIDY=ON \ | |
| -DCLANG_TIDY_EXECUTABLE="$(command -v clang-tidy-20)" \ | |
| -DRUN_CLANG_TIDY_EXECUTABLE="$(command -v run-clang-tidy-20)" | |
| # TODO need to capture the error code from this | |
| - name: Run clang-tidy | |
| run: | | |
| clang-tidy-20 --version | |
| VERBOSE=1 cmake --build ${{ runner.temp }}/build-pcms -t run-clang-tidy |