Skip to content

AMRInterpolator: Correct the name of the dx member variable #444

AMRInterpolator: Correct the name of the dx member variable

AMRInterpolator: Correct the name of the dx member variable #444

Workflow file for this run

name: Lint
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
cpp-linter:
name: clang-tidy & clang-format
runs-on: ubuntu-24.04
env:
LLVM_VERSION: '17'
AMREX_HOME: ${{ github.workspace }}/amrex
BINARYBH_EXAMPLE_DIR: ${{ github.workspace }}/GRTeclyn/Examples/BinaryBH
TESTS_DIR: ${{ github.workspace }}/GRTeclyn/Tests
TMP_BUILD_DIR: ${{ github.workspace }}/GRTeclyn/tmp_build_dir
COMPILATION_DATABASE: ${{ github.workspace }}/GRTeclyn/compile_commands.json
BUILD_ARGS: COMP=llvm USE_MPI=TRUE
steps:
- name: Checkout GRTeclyn
uses: actions/checkout@v4
with:
path: GRTeclyn
- name: Checkout AMReX
uses: actions/checkout@v4
with:
repository: AMReX-Codes/amrex
path: amrex
- name: Update package manager database
id: update-database
continue-on-error: true
run: sudo apt-get update
# This is quite slow so only do this if the previous command fails
- name: Update package repository mirrors if necessary
if: steps.update-database.outcome == 'failure'
run: |
sudo gem install apt-spy2
sudo apt-spy2 fix --commit --launchpad --country=US
sudo apt-get update
- name: Install OpenMPI
run: |
sudo apt-get -y --no-install-recommends install libopenmpi-dev
- name: Install compiledb tool to generate compilation database
run: |
pipx install compiledb
- name: Generate config and compilation database
run: |
cd ${{ env.BINARYBH_EXAMPLE_DIR }}
make ${{ env.BUILD_ARGS }} AMReX_Config.H
compiledb -o ${{ env.COMPILATION_DATABASE }} -n make ${{ env.BUILD_ARGS }}
cd ${{ env.TESTS_DIR }}
compiledb -o ${{ env.COMPILATION_DATABASE }} -n make ${{ env.BUILD_ARGS }}
- name: Generate list of files for clang-tidy to ignore
id: ignore-tidy-list
run: |
# The first sed removes comments and blank lines. The second joins lines
# and replaces new lines with a '|'.
echo "ignore-tidy=$(sed '/^[[:blank:]]*#/d;s/#.*//;/^$/d;' .lint-ignore | sed ':a;N;$!ba;s/\n/|/g')" > $GITHUB_OUTPUT
working-directory: GRTeclyn
- name: Run clang-tidy and clang-format on modified files
uses: cpp-linter/cpp-linter-action@v2
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: 'file' # Clang-Format style
tidy-checks: '' # Use .clang-tidy file cheks
repo-root: ${{ github.workspace }}/GRTeclyn
ignore: External
ignore-tidy: ${{ steps.ignore-tidy-list.outputs.ignore-tidy }}
version: ${{ env.LLVM_VERSION }}
files-changed-only: true
lines-changed-only: false
database: ${{ github.workspace }}/GRTeclyn
# Write a comment to the PR with the output
thread-comments: ${{ github.event_name == 'pull_request' && 'update' }}
step-summary: 'true' # Print output in the worflow job summary
- name: Fail job if checks fail
if: steps.linter.outputs.checks-failed > 0
run: exit 1