Add github action to detect mpi_comm_world usage #3
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: Check MPI_COMM_WORLD | |
on: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 # this line fetches the complete history | |
- name: Search for MPI_COMM_WORLD in changed files | |
run: | | |
git diff --name-only origin/${{ github.event.pull_request.base.ref }}..${{ github.event.pull_request.head.sha }} | grep -E "\.(cpp|hpp)$" | xargs grep -n "MPI_COMM_WORLD" |