Skip to content
archive

GitHub Action

clang-tidy-cache for GitHub Actions

v1.1.0 Latest version

clang-tidy-cache for GitHub Actions

archive

clang-tidy-cache for GitHub Actions

Run a linter on all changed files

Installation

Copy and paste the following snippet into your .yml file.

              

- name: clang-tidy-cache for GitHub Actions

uses: syyyr/[email protected]

Learn more about this action in syyyr/clang-tidy-cache-action

Choose a version

clang-tidy-cache for GitHub Actions

This action downloads and sets up clang-tidy-cache for use on GitHub Actions. This action was inspired by hendrikmuhs/ccache-action.

Usage

name: Lint

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

jobs:
  clang-tidy:
    name: clang-tidy
    runs-on: ubuntu-22.04
    steps:
      - name: Clone the repository
        uses: actions/checkout@v4
        with:
          submodules: true

      - name: Set up clang-tidy-cache
        uses: syyyr/clang-tidy-cache-action@v1

      - name: Run the linter
        shell: bash
        run: |
          # create your build directory, e.g. `build`
          clang-tidy-cache clang-tidy -p build src/*