-
Notifications
You must be signed in to change notification settings - Fork 41
182 lines (150 loc) · 5.47 KB
/
performance.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
name: Performance Analysis
on:
workflow_dispatch:
#inputs:
# analysis:
# type: boolean
# required: false
# default: false
# android:
# type: boolean
# required: false
# default: false
# soot:
# type: boolean
# required: false
# default: false
env:
JAVA_VERSION: 17
jobs:
performance-analysis:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and test Analysis
uses: ./.github/actions/analysis
with:
java-version: ${{ env.JAVA_VERSION }}
- name: Create or update gh-pages-output directory
run: mkdir -p gh-pages-output
- name: Extract performance
uses: ./.github/actions/performance
with:
test-results-path: CryptoAnalysis/shippable/testresults
source-branch: gh-pages
current-results: analysis_history.txt
output-file: gh-pages-output/analysis_history.txt
- name: Store Analysis performance
uses: actions/upload-artifact@v4
with:
name: analysis-performance
path: gh-pages-output/analysis_history.txt
performance-android:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and test Android Scanner
uses: ./.github/actions/scanner-android
with:
java-version: ${{ env.JAVA_VERSION }}
- name: Create or update gh-pages-output directory
run: mkdir -p gh-pages-output
- name: Extract performance
uses: ./.github/actions/performance
with:
test-results-path: HeadlessAndroidScanner/shippable/testresults
source-branch: gh-pages
current-results: android_history.txt
output-file: gh-pages-output/android_history.txt
- name: Store Android performance
uses: actions/upload-artifact@v4
with:
name: android-performance
path: gh-pages-output/android_history.txt
performance-soot:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and test JavaScanner with Soot
uses: ./.github/actions/scanner-soot
with:
java-version: ${{ env.JAVA_VERSION }}
- name: Create or update gh-pages-output directory
run: mkdir -p gh-pages-output
- name: Extract performance
uses: ./.github/actions/performance
with:
test-results-path: HeadlessJavaScanner/shippable/testresults
source-branch: gh-pages
current-results: soot_history.txt
output-file: gh-pages-output/soot_history.txt
- name: Store Soot performance
uses: actions/upload-artifact@v4
with:
name: soot-performance
path: gh-pages-output/soot_history.txt
performance-report:
runs-on: ubuntu-latest
needs: [performance-analysis, performance-android, performance-soot]
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Load performance files
uses: actions/download-artifact@v4
with:
path: gh-pages-output
merge-multiple: true
- name: Generate HTML report
run: |
echo "<html><body>" > gh-pages-output/index.html
echo "<div style=\"display: flex; flex-wrap: wrap; gap: 0 50px;\">" >> gh-pages-output/index.html
echo "<div style=\"flex: 1 1 200px; min-width: 200px;\"><h1>Analysis</h1><ul>" >> gh-pages-output/index.html
if [ -f gh-pages-output/analysis_history.txt ]; then
cat gh-pages-output/analysis_history.txt | while read line; do
echo "${line}"
echo "<li>${line}</li>" >> gh-pages-output/index.html
done
fi
echo "</ul></div>" >> gh-pages-output/index.html
echo "<div style=\"flex: 1 1 200px; min-width: 200px;\"><h1>AndroidScanner</h1><ul>" >> gh-pages-output/index.html
if [ -f gh-pages-output/android_history.txt ]; then
cat gh-pages-output/android_history.txt | while read line; do
echo "${line}"
echo "<li>${line}</li>" >> gh-pages-output/index.html
done
fi
echo "</ul></div>" >> gh-pages-output/index.html
echo "<div style=\"flex: 1 1 200px; min-width: 200px;\"><h1>JavaScanner (Soot)</h1><ul>" >> gh-pages-output/index.html
if [ -f gh-pages-output/soot_history.txt ]; then
cat gh-pages-output/soot_history.txt | while read line; do
echo "${line}"
echo "<li>${line}</li>" >> gh-pages-output/index.html
done
fi
echo "</ul></div>" >> gh-pages-output/index.html
echo "</div>" >> gh-pages-output/index.html
echo "</body></html>" >> gh-pages-output/index.html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./gh-pages-output
- name: Delete artifacts
uses: geekyeggo/delete-artifact@v5
with:
failOnError: false
name: |
analysis-performance
android-performance
soot-performance