Minor correction to box #3508
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: cpp-linter | |
on: [pull_request] | |
jobs: | |
cpp-linter: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install dependencies | |
run: | | |
sudo apt-get update -y -qq | |
sudo apt-get -qq -y install curl clang-tidy cmake jq clang cppcheck clang-format bear g++>=9.3.0 gfortran>=9.3.0 | |
- name: Get cpp linter repo | |
run: | | |
cd Submodules | |
git clone https://github.com/dwillcox/cpp-linter-action.git | |
cd .. | |
- name: Check header includes | |
run: | | |
echo 'HEADER_INCLUDES=$(grep -rIE --include="*.cpp" --include="*.H" --exclude-dir=Submodules "#\s?include\s+\"\w+\.\w+\"")' >> $GITHUB_ENV | |
echo $HEADER_INCLUDES | |
if [[ -n "${HEADER_INCLUDES}" ]]; then exit 1; fi | |
- name: Run cpp linter | |
run: python3 Submodules/cpp-linter-action/run_on_changed_files.py ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} -header-filter=Source/ -ignore-files="AMReX|GoogleTest" -run-linter | |
- name: Archive clang tidy report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: clang-tidy-report | |
path: clang-tidy-report.txt |