Skip to content

Fix summary reading being too slow in case of many summary keys to match against #13721

Fix summary reading being too slow in case of many summary keys to match against

Fix summary reading being too slow in case of many summary keys to match against #13721

Workflow file for this run

name: Annotate Cpp
on: [pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
annotate-cpp:
strategy:
matrix:
os: ['ubuntu-latest']
runs-on: ${{ matrix.os }}
timeout-minutes: 60
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 != ''