Skip to content

Commit 84c9c66

Browse files
Update clang-tidy.yml
1 parent f928c94 commit 84c9c66

1 file changed

Lines changed: 25 additions & 4 deletions

File tree

.github/workflows/clang-tidy.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,32 @@ jobs:
2020
- name: Checkout repository
2121
uses: actions/checkout@v4
2222

23+
# ------------------------
24+
# Cache APT packages
25+
# ------------------------
26+
- name: Cache APT packages
27+
uses: actions/cache@v4
28+
with:
29+
path: /var/cache/apt
30+
key: apt-cache-${{ runner.os }}-${{ hashFiles('**/CMakeLists.txt') }}
31+
restore-keys: |
32+
apt-cache-${{ runner.os }}-
33+
2334
- name: Install dependencies (clang-tidy + HDF5 + OpenMP)
2435
run: |
2536
sudo apt-get update
26-
sudo apt-get install -y clang-tidy libhdf5-dev
27-
sudo apt-get install -y libomp-dev
37+
sudo apt-get install -y clang-tidy libhdf5-dev libomp-dev
38+
39+
# ------------------------
40+
# Cache CMake build directory
41+
# ------------------------
42+
- name: Cache CMake build
43+
uses: actions/cache@v4
44+
with:
45+
path: build
46+
key: cmake-${{ runner.os }}-${{ hashFiles('**/*.cpp', '**/*.h', '**/CMakeLists.txt') }}
47+
restore-keys: |
48+
cmake-${{ runner.os }}-
2849
2950
- name: Configure project (CMake)
3051
run: |
@@ -36,6 +57,6 @@ jobs:
3657
run: |
3758
cmake --build build -- -j$(nproc)
3859
39-
- name: Run clang-tidy using compile_commands.json
60+
- name: Run clang-tidy
4061
run: |
41-
find src -name "*.cpp" | xargs -I{} clang-tidy {} -p build
62+
find src -name "*.cpp" | xargs -I{} clang-tidy {} -p build

0 commit comments

Comments
 (0)