-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a github workflow to run clang build analyzer (#41237)
- Loading branch information
1 parent
a23c282
commit 67830ad
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Clang Build Analyzer | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout repository | ||
uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 10 | ||
- name: install dependencies | ||
run: sudo apt-get install libncursesw5-dev | ||
- name: Prepare Build Analyzer | ||
run: | | ||
cd | ||
git clone --recursive https://github.com/aras-p/ClangBuildAnalyzer.git buildAnalyzer | ||
cd buildAnalyzer | ||
mkdir build | ||
cd build | ||
cmake -DCMAKE_BUILD_TYPE=RELEASE .. | ||
cmake --build . -- -j3 | ||
echo "::add-path::$PWD" | ||
- name: make | ||
run: | | ||
ClangBuildAnalyzer --start . | ||
CLANG=clang++-9 CXXFLAGS=-ftime-trace make | ||
ClangBuildAnalyzer --stop . buildAnalysis | ||
- name: Analyze | ||
run: ClangBuildAnalyzer --analyze buildAnalysis |