mirror of
https://github.com/google/benchmark.git
synced 2025-01-16 06:40:13 +08:00
680d3fdbb5
* Add clang-tidy.yml and .clang-tidy * Add mention to authors/contributors * Temp fix 2 clang-tidy issues * Enable clang-tidy on pull requests * Exclude gtest source files from clang-tidy
39 lines
939 B
YAML
39 lines
939 B
YAML
name: clang-tidy
|
|
|
|
on:
|
|
push: {}
|
|
pull_request: {}
|
|
|
|
jobs:
|
|
job:
|
|
name: run-clang-tidy
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: install clang-tidy
|
|
run: sudo apt update && sudo apt -y install clang-tidy
|
|
|
|
- name: create build environment
|
|
run: cmake -E make_directory ${{ runner.workspace }}/_build
|
|
|
|
- name: configure cmake
|
|
shell: bash
|
|
working-directory: ${{ runner.workspace }}/_build
|
|
run: >
|
|
cmake $GITHUB_WORKSPACE
|
|
-DBENCHMARK_ENABLE_ASSEMBLY_TESTS=OFF
|
|
-DBENCHMARK_ENABLE_LIBPFM=OFF
|
|
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON
|
|
-DCMAKE_C_COMPILER=clang
|
|
-DCMAKE_CXX_COMPILER=clang++
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
|
-DGTEST_COMPILE_COMMANDS=OFF
|
|
|
|
- name: run
|
|
shell: bash
|
|
working-directory: ${{ runner.workspace }}/_build
|
|
run: run-clang-tidy
|