-
Notifications
You must be signed in to change notification settings - Fork 1
254 lines (219 loc) · 10.1 KB
/
flutter-engine-armv7hf.yaml
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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
name: Linux armv7hf
on:
workflow_dispatch:
inputs:
srcrev:
description: 'Flutter Engine Commit Hash'
required: True
default: ''
release:
description: 'Release'
required: false
default: 'false'
jobs:
linux-armv7hf:
runs-on: [self-hosted, linux, x64]
env:
arch: arm
linux_cpu: arm --arm-float-abi hard
target_triple: armv7-unknown-linux-gnueabihf
target_sysroot: debian_sid_arm-sysroot
tag_debug: linux-engine-sdk-debug-armv7hf-${{ inputs.srcrev }}
tag_debug_unopt: linux-engine-sdk-debug-unopt-armv7hf-${{ inputs.srcrev }}
tag_release: linux-engine-sdk-release-armv7hf-${{ inputs.srcrev }}
tag_profile: linux-engine-sdk-profile-armv7hf-${{ inputs.srcrev }}
notes_debug: "Flutter Engine - Linux armv7hf runtime debug SDK"
notes_debug_unopt: "Flutter Engine - Linux armv7hf runtime debug unoptimized SDK"
notes_release: "Flutter Engine - Linux armv7hf runtime release SDK"
notes_profile: "Flutter Engine - Linux armv7hf runtime profile SDK"
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install packages
run: |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
- name: Get Flutter Source
run: |
export PATH=$PATH:$PWD/depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
gclient config --spec 'solutions=[{"name":"src/flutter","url":"https://github.com/flutter/engine.git","deps_file":"DEPS","managed":False,"custom_deps":{},"custom_vars":{"download_android_deps":False,"download_windows_deps":False,"download_linux_deps":True}}]'
gclient sync --force --shallow --no-history -R -D --revision ${{ inputs.SRCREV }} -j$(nproc) -v
PATCH_DIR=$PWD/patches
# fetch sysroot
cd src
build/linux/sysroot_scripts/install-sysroot.py --arch=$arch
git apply $PATCH_DIR/0001-clang-toolchain.patch
- name: Build Debug
working-directory: src
run: |
export PATH=$PATH:$PWD/../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
CLANG_ROOT=$(find -iname clang++)
CLANG_ROOT=$(dirname $CLANG_ROOT)
export CLANG_ROOT=$(dirname $CLANG_ROOT)
./flutter/tools/gn --runtime-mode=debug \
--embedder-for-target \
--no-build-embedder-examples \
--enable-impeller-3d \
--no-goma --no-rbe \
--no-stripped --no-enable-unittests \
--linux-cpu $linux_cpu \
--target-os linux \
--target-sysroot $PWD/build/linux/$target_sysroot \
--target-toolchain $PWD/$CLANG_ROOT \
--target-triple $target_triple
ninja -C out/linux_debug_$arch
- name: Prepare Debug Artifacts
run: |
scripts/prepare-sdk-armv7hf.sh src/out/linux_debug_$arch $PWD/src/build/linux/$target_sysroot
tar czfhv $tag_debug.tar.gz src/out/linux_debug_$arch/engine-sdk/
sha256sum -b $tag_debug.tar.gz > $tag_debug.tar.gz.sha256
- name: Publish Debug
if: ${{ inputs.release != 'true' }}
uses: actions/upload-artifact@v4
with:
name: engine-sdk-debug
path: |
linux-engine-sdk-debug-armv7hf-${{ inputs.srcrev }}.tar.gz
linux-engine-sdk-debug-armv7hf-${{ inputs.srcrev }}.tar.gz.sha256
- name: Release - Debug Release
if: ${{ inputs.release == 'true' }}
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
gh release delete "$tag_debug" --cleanup-tag -y |true
gh release create --draft "$tag_debug" --title "$tag_debug" --notes "$notes_debug"
gh release upload "$tag_debug" "$tag_debug.tar.gz" "$tag_debug.tar.gz.sha256"
gh release edit "$tag_debug" --draft=false
- name: Build Debug Unoptimized
working-directory: src
run: |
export PATH=$PATH:$PWD/../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
CLANG_ROOT=$(find -iname clang++)
CLANG_ROOT=$(dirname $CLANG_ROOT)
export CLANG_ROOT=$(dirname $CLANG_ROOT)
./flutter/tools/gn --runtime-mode=debug \
--unoptimized \
--embedder-for-target \
--no-build-embedder-examples \
--enable-impeller-3d \
--no-goma --no-rbe \
--no-stripped --no-enable-unittests \
--linux-cpu $linux_cpu \
--target-os linux \
--target-sysroot $PWD/build/linux/$target_sysroot \
--target-toolchain $PWD/$CLANG_ROOT \
--target-triple $target_triple
ninja -C out/linux_debug_unopt_$arch
- name: Prepare Debug Unoptimized Artifacts
run: |
scripts/prepare-sdk-armv7hf.sh src/out/linux_debug_unopt_$arch $PWD/src/build/linux/$target_sysroot
tar czfhv $tag_debug_unopt.tar.gz src/out/linux_debug_unopt_$arch/engine-sdk/
sha256sum -b $tag_debug_unopt.tar.gz > $tag_debug_unopt.tar.gz.sha256
- name: Publish Debug Unoptimized
if: ${{ inputs.release != 'true' }}
uses: actions/upload-artifact@v4
with:
name: engine-sdk-debug-unoptimized
path: |
linux-engine-sdk-debug-unopt-armv7hf-${{ inputs.srcrev }}.tar.gz
linux-engine-sdk-debug-unopt-armv7hf-${{ inputs.srcrev }}.tar.gz.sha256
- name: Release - Debug Unoptimized Release
if: ${{ inputs.release == 'true' }}
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
gh release delete "$tag_debug_unopt" --cleanup-tag -y |true
gh release create --draft "$tag_debug_unopt" --title "$tag_debug_unopt" --notes "$notes_debug_unopt"
gh release upload "$tag_debug_unopt" "$tag_debug_unopt.tar.gz" "$tag_debug_unopt.tar.gz.sha256"
gh release edit "$tag_debug_unopt" --draft=false
- name: Build Release
working-directory: src
run: |
export PATH=$PATH:$PWD/../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
CLANG_ROOT=$(find -iname clang++)
CLANG_ROOT=$(dirname $CLANG_ROOT)
export CLANG_ROOT=$(dirname $CLANG_ROOT)
./flutter/tools/gn --runtime-mode=release \
--embedder-for-target \
--no-build-embedder-examples \
--enable-impeller-3d \
--no-goma --no-rbe \
--no-stripped --no-enable-unittests \
--linux-cpu $linux_cpu \
--target-os linux \
--target-sysroot $PWD/build/linux/$target_sysroot \
--target-toolchain $PWD/$CLANG_ROOT \
--target-triple $target_triple
ninja -C out/linux_release_$arch
- name: Prepare Release Artifacts
run: |
scripts/prepare-sdk-armv7hf.sh src/out/linux_release_$arch $PWD/src/build/linux/$target_sysroot
tar czfhv $tag_release.tar.gz src/out/linux_release_$arch/engine-sdk/
sha256sum -b $tag_release.tar.gz > $tag_release.tar.gz.sha256
- name: Publish Release
if: ${{ inputs.release != 'true' }}
uses: actions/upload-artifact@v4
with:
name: engine-sdk-release
path: |
linux-engine-sdk-release-armv7hf-${{ inputs.srcrev }}.tar.gz
linux-engine-sdk-release-armv7hf-${{ inputs.srcrev }}.tar.gz.sha256
- name: Release - Publish Release
if: ${{ inputs.release == 'true' }}
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
gh release delete "$tag_release" --cleanup-tag -y |true
gh release create --draft "$tag_release" --title "$tag_release" --notes "$notes_release"
gh release upload "$tag_release" "$tag_release.tar.gz" "$tag_release.tar.gz.sha256"
gh release edit "$tag_release" --draft=false
- name: Build Profile
working-directory: src
run: |
export PATH=$PATH:$PWD/../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
CLANG_ROOT=$(find -iname clang++)
CLANG_ROOT=$(dirname $CLANG_ROOT)
export CLANG_ROOT=$(dirname $CLANG_ROOT)
./flutter/tools/gn --runtime-mode=profile \
--embedder-for-target \
--no-build-embedder-examples \
--enable-impeller-3d \
--no-goma --no-rbe \
--no-stripped --no-enable-unittests \
--linux-cpu $linux_cpu \
--target-os linux \
--target-sysroot $PWD/build/linux/$target_sysroot \
--target-toolchain $PWD/$CLANG_ROOT \
--target-triple $target_triple
ninja -C out/linux_profile_$arch
- name: Prepare Profile Artifacts
run: |
scripts/prepare-sdk-armv7hf.sh src/out/linux_profile_$arch $PWD/src/build/linux/debian_sid_arm-sysroot
tar czfhv $tag_profile.tar.gz src/out/linux_profile_$arch/engine-sdk/
sha256sum -b $tag_profile.tar.gz > $tag_profile.tar.gz.sha256
- name: Publish Profile
if: ${{ inputs.release != 'true' }}
uses: actions/upload-artifact@v4
with:
name: engine-sdk-profile
path: |
linux-engine-sdk-profile-armv7hf-${{ inputs.srcrev }}.tar.gz
linux-engine-sdk-profile-armv7hf-${{ inputs.srcrev }}.tar.gz.sha256
- name: Release - Publish Profile
if: ${{ inputs.release == 'true' }}
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
gh release delete "$tag_profile" --cleanup-tag -y |true
gh release create --draft "$tag_profile" --title "$tag_profile" --notes "$notes_profile"
gh release upload "$tag_profile" "$tag_profile.tar.gz" "$tag_profile.tar.gz.sha256"
gh release edit "$tag_profile" --draft=false