Skip to content

Make parameter example test shrink better #13603

Make parameter example test shrink better

Make parameter example test shrink better #13603

Workflow file for this run

name: Annotate Cpp
on: [pull_request]
jobs:
annotate-cpp:
strategy:
matrix:
os: ['ubuntu-latest']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: -1
- name: Install Ubuntu dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y clang-tidy
- name: Install dependencies from PyPI
run: |
python3 -m pip install "conan<2" pybind11 resdata
- name: Create compile commands for clib
run: |
mkdir cmake-build
cmake -S src/clib -B cmake-build -DBUILD_TESTS=ON -DCOVERAGE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build cmake-build
- name: find changed files
id: find_changed_files
run: echo "changed_files=$(git diff --name-only ${{github.sha}} ${{github.event.pull_request.base.sha}} | tr ' ' '\n' | xargs ls -d 2>/dev/null | grep -E '\.(hpp|cpp)$' | tr '\n' ' ')" >> "$GITHUB_OUTPUT"
- run: echo ::add-matcher::.github/clang-tidy-matcher.json
- name: run clang-tidy
run: clang-tidy -p cmake-build/ ${{steps.find_changed_files.outputs.changed_files}}
if: steps.find_changed_files.outputs.changed_files != ''