pacman/.github/workflows/clang-tidy.yml

47 lines
1.1 KiB
YAML
Raw Normal View History

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: |
2021-09-10 14:53:21 +00:00
mkdir -p build/vcpkg_installed
mkdir -p build/_deps
2021-09-10 14:33:53 +00:00
- name: Cache vcpkg
uses: actions/cache@v2
env:
cache-name: vcpkg-modules
with:
path: |
2021-09-10 14:53:21 +00:00
build/vcpkg_installed
build/_deps
2021-09-10 14:33:53 +00:00
key: clang-tidy-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
2021-09-10 14:39:41 +00:00
- 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
2021-09-10 14:30:11 +00:00
- name: Install clang-tidy
run: sudo apt-get install clang-tidy
2021-09-10 14:39:41 +00:00
- name: Configure CMake
2021-09-10 14:53:21 +00:00
working-directory: build
2021-09-10 14:50:17 +00:00
run: cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
2021-09-10 14:39:41 +00:00
2021-09-10 14:30:11 +00:00
- name: Run clang-tidy
2021-09-10 14:53:21 +00:00
working-directory: build
2021-09-10 14:30:11 +00:00
run: run-clang-tidy