46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
name: Clang Tidy
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Create vcpkg build folder
|
|
run: |
|
|
mkdir -p build/vcpkg_installed
|
|
mkdir -p build/_deps
|
|
|
|
- name: Cache vcpkg
|
|
uses: actions/cache@v2
|
|
env:
|
|
cache-name: vcpkg-modules
|
|
with:
|
|
path: |
|
|
build/vcpkg_installed
|
|
build/_deps
|
|
key: clang-tidy-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
|
|
|
|
- name: Fix Path
|
|
run: echo "/home/runner/.local/bin" >> $GITHUB_PATH
|
|
|
|
- name: Install Linux dependencies
|
|
run: sudo apt-get update && sudo apt-get install -y libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libudev-dev make ninja-build cmake
|
|
|
|
- name: Install clang-tidy
|
|
run: sudo apt-get install clang-tidy
|
|
|
|
- name: Configure CMake
|
|
working-directory: build
|
|
run: cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
|
|
|
|
- name: Run clang-tidy
|
|
working-directory: build
|
|
run: run-clang-tidy
|