Skip to content

Upgrade actions/cache to from ver. 3 to 4 #28

Upgrade actions/cache to from ver. 3 to 4

Upgrade actions/cache to from ver. 3 to 4 #28

Workflow file for this run

name: clang-tidy
on:
push:
branches: [ master ]
paths:
- '**/*.cpp'
- '**/*.hpp'
- '.clang-tidy'
- 'cmake/Tooling.cmake'
- '.github/workflows/clang-tidy.yml'
pull_request:
branches: [ master ]
paths:
- '**/*.cpp'
- '**/*.hpp'
- '.clang-tidy'
- 'cmake/Tooling.cmake'
- '.github/workflows/clang-tidy.yml'
jobs:
lint:
name: Check clang-tidy
runs-on: ubuntu-latest
env:
CMAKE_PRESET_NAME: gcc-Release
steps:
- name: Checkout repository
uses: actions/checkout@v4
with: { fetch-depth: 0 }
- name: Install CMake and Ninja
uses: lukka/get-cmake@latest
with:
cmakeVersion: ^3.28.0
ninjaVersion: ^1.11.0
- name: Install dependencies
run: |
sudo apt-get -qq update
sudo apt-get -qq install -y g++ gcc clang-tidy --no-install-recommends
- name: Cache build artifacts
id: cache-build
uses: actions/cache@v4
with:
path: build/
key: ${{ runner.os }}-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-
- name: Configure project
run: cmake --preset $CMAKE_PRESET_NAME -DENABLE_CLANG_TIDY=ON
- name: Run clang-tidy
run: cmake --build --preset $CMAKE_PRESET_NAME --target clang-tidy