forked from srcML/srcML
-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (89 loc) · 3.46 KB
/
ClangBuildAnalysis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
---
name: Clang Build Analysis
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Checkout ClangBuildAnalyzer
uses: actions/checkout@v2
with:
repository: aras-p/ClangBuildAnalyzer
path: analyzer
- name: Setup Ubuntu
shell: bash
run: |
sudo apt install antlr libantlr-dev libantlr-java libarchive-dev \
libcurl4-openssl-dev libxml2-utils libxslt1-dev \
ninja-build
curl -L http://www.sdml.cs.kent.edu/build/srcML-1.0.0-Boost.tar.gz | \
sudo tar xz -C /usr/local/include
- name: Build ClangBuildAnalyzer
working-directory: analyzer
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release .. -G Ninja
ninja
echo ":/Users/runner/work/srcML/srcML/analyzer/build" >> $GITHUB_PATH
ls -lh /Users/runner/work/srcML/srcML/analyzer/build
- name: Create build directory
shell: bash
run: |
mkdir build
- name: CMake Setup PCH On
shell: bash
working-directory: build
run: |
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
cmake .. -G Ninja -DCLANG_TIME_TRACE=ON -DSRCML_BUILD_USEPCH=ON
- name: Build
shell: bash
working-directory: build
run: |
cmake --build . --config Release
- name: Analyze
shell: bash
working-directory: build
run: |
export PATH="$PATH:/Users/runner/work/srcML/srcML/analyzer/build"
ClangBuildAnalyzer --all src/parser capture_pch_parser
ClangBuildAnalyzer --analyze capture_pch_parser > capture_pch_parser.txt
ClangBuildAnalyzer --all src/libsrcml capture_pch_libsrcml
ClangBuildAnalyzer --analyze capture_pch_libsrcml > capture_pch_libsrcml.txt
ClangBuildAnalyzer --all src/client capture_pch_client
ClangBuildAnalyzer --analyze capture_pch_client > capture_pch_client.txt
ClangBuildAnalyzer --all . capture_pch
ClangBuildAnalyzer --analyze capture_pch > capture_pch.txt
- name: CMake Setup PCH Off
shell: bash
working-directory: build
run: |
cmake .. -G Ninja -DCLANG_TIME_TRACE=ON -DSRCML_BUILD_USEPCH=OFF
cmake --build . --config Release --target clean
- name: Build
shell: bash
working-directory: build
run: |
cmake --build . --config Release
- name: Analyze
shell: bash
working-directory: build
run: |
export PATH="$PATH:/Users/runner/work/srcML/srcML/analyzer/build"
ClangBuildAnalyzer --all src/parser capture_nopch_parser
ClangBuildAnalyzer --analyze capture_nopch_parser > capture_nopch_parser.txt
ClangBuildAnalyzer --all src/libsrcml capture_nopch_libsrcml
ClangBuildAnalyzer --analyze capture_nopch_libsrcml > capture_nopch_libsrcml.txt
ClangBuildAnalyzer --all src/client capture_nopch_client
ClangBuildAnalyzer --analyze capture_nopch_client > capture_nopch_client.txt
ClangBuildAnalyzer --all . capture_nopch
ClangBuildAnalyzer --analyze capture_nopch > capture_nopch.txt
- uses: actions/upload-artifact@v2
with:
name: Capture
path: build/capture*