forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (95 loc) · 2.9 KB
/
mobile-perf.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
name: mobile_perf
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.head_ref || github.run_id }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
sizecurrent:
if: ${{ github.repository == 'envoyproxy/envoy' }}
name: size_current
runs-on: ubuntu-22.04
timeout-minutes: 120
container:
image: ${{ needs.env.outputs.build_image_ubuntu }}
env:
CC: /opt/llvm/bin/clang
CXX: /opt/llvm/bin/clang++
steps:
- uses: actions/checkout@v3
- name: Add safe directory
run: git config --global --add safe.directory /__w/envoy/envoy
- name: 'Build test binary'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd mobile && ./bazelw build \
--config=sizeopt \
--config=release-common \
--config=remote-ci-linux-clang \
//test/performance:test_binary_size
- uses: actions/upload-artifact@v3
with:
name: sizecurrent
path: mobile/bazel-bin/test/performance/test_binary_size
sizemain:
if: ${{ github.repository == 'envoyproxy/envoy' }}
name: size_main
runs-on: ubuntu-22.04
timeout-minutes: 90
container:
image: ${{ needs.env.outputs.build_image_ubuntu }}
env:
CC: /opt/llvm/bin/clang
CXX: /opt/llvm/bin/clang++
steps:
- uses: actions/checkout@v3
- name: Add safe directory
run: |
git config --global --add safe.directory /__w/envoy/envoy
- name: 'Build test binary'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git checkout main && git pull origin main
cd mobile && ./bazelw build \
--config=sizeopt \
--config=release-common \
--config=remote-ci-linux-clang \
//test/performance:test_binary_size
- uses: actions/upload-artifact@v3
with:
name: sizemain
path: mobile/bazel-bin/test/performance/test_binary_size
sizecompare:
if: ${{ github.repository == 'envoyproxy/envoy' }}
needs:
- sizecurrent
- sizemain
name: size_compare
runs-on: ubuntu-22.04
timeout-minutes: 30
container:
image: ${{ needs.env.outputs.build_image_ubuntu }}
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: sizecurrent
path: dist/sizecurrent
- uses: actions/download-artifact@v3
with:
name: sizemain
path: dist/sizemain
- name: 'Strip and Zip binary'
run: |
ls -lh dist/
strip -s -o dist/main.stripped dist/sizemain/test_binary_size
strip -s -o dist/current.stripped dist/sizecurrent/test_binary_size
zip -9 dist/main.zip dist/main.stripped
zip -9 dist/current.zip dist/current.stripped
- name: 'Test size regression'
run: cd mobile && ./ci/test_size_regression.sh ../dist/main.zip ../dist/current.zip