2021-09-10 14:30:11 +00:00
|
|
|
name: Clang Tidy
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2021-09-10 14:33:53 +00:00
|
|
|
- name: Create vcpkg build folder
|
|
|
|
run: |
|
|
|
|
mkdir -p ${{runner.workspace}}/build/vcpkg_installed
|
|
|
|
mkdir -p ${{runner.workspace}}/build/_deps
|
|
|
|
|
|
|
|
- name: Cache vcpkg
|
|
|
|
uses: actions/cache@v2
|
|
|
|
env:
|
|
|
|
cache-name: vcpkg-modules
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
${{runner.workspace}}/build/vcpkg_installed
|
|
|
|
${{runner.workspace}}/build/_deps
|
|
|
|
key: clang-tidy-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
|
|
|
|
|
2021-09-10 14:30:11 +00:00
|
|
|
- name: Configure CMake
|
|
|
|
run: cmake -B ${{github.workspace}}/build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
|
|
|
|
|
|
|
- name: Install clang-tidy
|
|
|
|
run: sudo apt-get install clang-tidy
|
|
|
|
|
|
|
|
- name: Run clang-tidy
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
run: run-clang-tidy
|