2020-10-12 10:53:11 +00:00
|
|
|
name: Check clang-tidy
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches-ignore:
|
2023-07-14 10:54:16 +00:00
|
|
|
- gh-readonly-queue/**
|
2020-10-12 10:53:11 +00:00
|
|
|
- master
|
|
|
|
pull_request:
|
2023-07-14 09:46:22 +00:00
|
|
|
merge_group:
|
2020-10-12 10:53:11 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
check-clang-tidy:
|
2022-03-12 11:39:27 +00:00
|
|
|
runs-on: ubuntu-latest
|
2023-09-12 19:22:17 +00:00
|
|
|
env:
|
|
|
|
CARGO_HTTP_MULTIPLEXING: false
|
2020-10-12 10:53:11 +00:00
|
|
|
steps:
|
2022-10-25 11:50:49 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-10-12 10:53:11 +00:00
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
|
|
|
|
- name: Install clang-tidy
|
|
|
|
run: |
|
|
|
|
sudo apt-get update -y
|
2022-03-20 17:04:00 +00:00
|
|
|
sudo apt-get install pkg-config cmake ninja-build libfreetype6-dev libnotify-dev libsdl2-dev libsqlite3-dev libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev libx264-dev clang-tidy libvulkan-dev glslang-tools spirv-tools -y
|
2023-08-23 15:35:28 +00:00
|
|
|
|
|
|
|
- name: Cache Rust dependencies
|
|
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
|
2020-10-12 10:53:11 +00:00
|
|
|
- name: Build with clang-tidy
|
|
|
|
run: |
|
|
|
|
mkdir clang-tidy
|
|
|
|
cd clang-tidy
|
2022-02-14 21:34:43 +00:00
|
|
|
cmake -G Ninja -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-warnings-as-errors=*" -DCMAKE_C_CLANG_TIDY="clang-tidy;-warnings-as-errors=*" -DCMAKE_BUILD_TYPE=Debug -Werror=dev -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=. ..
|
|
|
|
cmake --build . --config Debug --target everything -- -k 0
|
2020-10-12 10:53:11 +00:00
|
|
|
|