@@ -3,14 +3,31 @@ name: Linux arm64
3
3
on :
4
4
workflow_dispatch :
5
5
inputs :
6
- SRCREV :
7
- description : ' Flutter Engine Target Source Revision '
6
+ srcrev :
7
+ description : ' Flutter Engine Commit Hash '
8
8
required : True
9
9
default : ' '
10
+ release :
11
+ description : ' Release'
12
+ required : false
13
+ default : ' false'
10
14
11
15
jobs :
12
16
linux-arm64 :
13
17
runs-on : [self-hosted, linux, x64]
18
+ env :
19
+ arch : arm64
20
+ linux_cpu : arm64
21
+ target_triple : aarch64-unknown-linux-gnu
22
+ target_sysroot : debian_sid_arm64-sysroot
23
+ tag_debug : linux-engine-sdk-debug-arm64-${{ inputs.srcrev }}
24
+ tag_debug_unopt : linux-engine-sdk-debug-unopt-arm64-${{ inputs.srcrev }}
25
+ tag_release : linux-engine-sdk-release-arm64-${{ inputs.srcrev }}
26
+ tag_profile : linux-engine-sdk-profile-arm64-${{ inputs.srcrev }}
27
+ notes_debug : " Flutter Engine - runtime debug SDK"
28
+ notes_debug_unopt : " Flutter Engine - runtime debug SDK"
29
+ notes_release : " Flutter Engine - runtime release SDK"
30
+ notes_profile : " Flutter Engine - runtime profile SDK"
14
31
15
32
steps :
16
33
- uses : actions/checkout@v4
30
47
31
48
PATCH_DIR=$PWD/patches
32
49
33
- # fetch arm64 sysroot
50
+ # fetch sysroot
34
51
cd src
35
- build/linux/sysroot_scripts/install-sysroot.py --arch=arm64
52
+ build/linux/sysroot_scripts/install-sysroot.py --arch=$arch
36
53
37
54
git apply $PATCH_DIR/0001-clang-toolchain.patch
38
55
cd flutter
@@ -49,31 +66,96 @@ jobs:
49
66
--enable-impeller-3d \
50
67
--no-goma --no-rbe \
51
68
--no-stripped --no-enable-unittests \
52
- --linux-cpu arm64 \
69
+ --linux-cpu $linux_cpu \
53
70
--target-os linux \
54
- --target-sysroot $PWD/build/linux/debian_sid_arm64-sysroot \
71
+ --target-sysroot $PWD/build/linux/$target_sysroot \
55
72
--target-toolchain $PWD/flutter/buildtools/linux-x64/clang \
56
- --target-triple aarch64-unknown-linux-gnu
57
- ninja -C out/linux_debug_arm64
73
+ --target-triple $target_triple
74
+ ninja -C out/linux_debug_$arch
58
75
59
76
- name : Prepare Debug Artifacts
60
77
run : |
61
- chmod +x scripts/prepare-sdk-aarch64.sh
62
- export SYSROOT=$PWD/src/build/linux/debian_sid_arm64-sysroot
63
- cd src/out/linux_debug_arm64
64
- ../../../scripts/prepare-sdk-aarch64.sh
78
+ scripts/prepare-sdk-$arch.sh src/out/linux_debug_$arch $PWD/src/build/linux/$target_sysroot
79
+
80
+ tar czfhv $tag_debug.tar.gz src/out/linux_debug_$arch/engine-sdk/
81
+
82
+ sha256sum -b $tag_debug.tar.gz > $tag_debug.tar.gz.sha256
65
83
66
84
- name : Publish Debug
85
+ if : ${{ inputs.release != 'true' }}
67
86
uses : actions/upload-artifact@v4
68
87
with :
69
88
name : engine-sdk-debug
70
- path : src/out/linux_debug_arm64/engine-sdk/
89
+ path : |
90
+ $tag_debug.tar.gz
91
+ $tag_debug.tar.gz.sha256
92
+
93
+ - name : Release - Debug Release
94
+ if : ${{ inputs.release == 'true' }}
95
+ env :
96
+ GH_TOKEN : ${{ github.token }}
97
+ GH_REPO : ${{ github.repository }}
98
+ run : |
99
+ gh release create --draft "$tag_debug" --title "$tag_debug" --notes "$notes_debug"
100
+ gh release upload "$tag_debug" "$tag_debug.tar.gz" "$tag_debug.tar.gz.sha256"
101
+ gh release edit "$tag_debug" --draft=false
102
+
103
+ - name : Build Debug Unoptimized
104
+ working-directory : src
105
+ run : |
106
+ export PATH=$PATH:$PWD/../depot_tools
107
+ export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
108
+ ./flutter/tools/gn --runtime-mode=debug \
109
+ --unoptimized \
110
+ --embedder-for-target \
111
+ --no-build-embedder-examples \
112
+ --enable-impeller-3d \
113
+ --no-goma --no-rbe \
114
+ --no-stripped --no-enable-unittests \
115
+ --linux-cpu $linux_cpu \
116
+ --target-os linux \
117
+ --target-sysroot $PWD/build/linux/$target_sysroot \
118
+ --target-toolchain $PWD/flutter/buildtools/linux-x64/clang \
119
+ --target-triple $target_triple
120
+ ninja -C out/linux_debug_unopt_$arch
121
+
122
+ - name : Prepare Debug Unoptimized Artifacts
123
+ run : |
124
+ scripts/prepare-sdk-$arch.sh src/out/linux_debug_unopt_$arch $PWD/src/build/linux/$target_sysroot
125
+
126
+ tar czfhv $tag_debug_unopt.tar.gz src/out/linux_debug_unopt_$arch/engine-sdk/
127
+ tar czfhv $tag_debug_unopt-symbols.tar.gz src/out/linux_debug_unopt_$arch/.debug/
71
128
72
- - name : Publish Debug Symbols
129
+ sha256sum -b $tag_debug_unopt.tar.gz > $tag_debug_unopt.tar.gz.sha256
130
+ sha256sum -b $tag_debug_unopt-symbols.tar.gz > $tag_debug_unopt-symbols.tar.gz.sha256
131
+
132
+ - name : Publish Debug Unoptimized
133
+ if : ${{ inputs.release != 'true' }}
73
134
uses : actions/upload-artifact@v4
74
135
with :
75
- name : engine-sdk-debug-symbols
76
- path : src/out/linux_debug_arm64/.debug/
136
+ name : engine-sdk-debug-unoptimized
137
+ path : |
138
+ $tag_debug_unopt.tar.gz
139
+ $tag_debug_unopt.tar.gz.sha256
140
+
141
+ - name : Publish Debug Unoptimized Symbols
142
+ if : ${{ inputs.release != 'true' }}
143
+ uses : actions/upload-artifact@v4
144
+ with :
145
+ name : engine-sdk-debug-unoptimized-symbols
146
+ path : |
147
+ $tag_debug_unopt-symbols.tar.gz
148
+ $tag_debug_unopt-symbols.tar.gz.sha256
149
+
150
+ - name : Release - Debug Unoptimized Release
151
+ if : ${{ inputs.release == 'true' }}
152
+ env :
153
+ GH_TOKEN : ${{ github.token }}
154
+ GH_REPO : ${{ github.repository }}
155
+ run : |
156
+ gh release create --draft "$tag_debug_unopt" --title "$tag_debug_unopt" --notes "$notes_debug_unopt"
157
+ gh release upload "$tag_debug_unopt" "$tag_debug_unopt.tar.gz" "$tag_debug_unopt.tar.gz.sha256"
158
+ gh release edit "$tag_debug_unopt" --draft=false
77
159
78
160
- name : Build Release
79
161
working-directory : src
@@ -86,25 +168,39 @@ jobs:
86
168
--enable-impeller-3d \
87
169
--no-goma --no-rbe \
88
170
--no-stripped --no-enable-unittests \
89
- --linux-cpu arm64 \
171
+ --linux-cpu $linux_cpu \
90
172
--target-os linux \
91
- --target-sysroot $PWD/build/linux/debian_sid_arm64-sysroot \
173
+ --target-sysroot $PWD/build/linux/$target_sysroot \
92
174
--target-toolchain $PWD/flutter/buildtools/linux-x64/clang \
93
- --target-triple aarch64-unknown-linux-gnu
94
- ninja -C out/linux_release_arm64
175
+ --target-triple $target_triple
176
+ ninja -C out/linux_release_$arch
95
177
96
178
- name : Prepare Release Artifacts
97
179
run : |
98
- chmod +x scripts/prepare-sdk-aarch64.sh
99
- export SYSROOT=$PWD/src/build/linux/debian_sid_arm64-sysroot
100
- cd src/out/linux_release_arm64
101
- ../../../scripts/prepare-sdk-aarch64.sh
180
+ scripts/prepare-sdk-$arch.sh src/out/linux_release_$arch $PWD/src/build/linux/$target_sysroot
181
+
182
+ tar czfhv $tag_release.tar.gz src/out/linux_release_$arch/engine-sdk/
183
+
184
+ sha256sum -b $tag_release.tar.gz > $tag_release.tar.gz.sha256
102
185
103
186
- name : Publish Release
187
+ if : ${{ inputs.release != 'true' }}
104
188
uses : actions/upload-artifact@v4
105
189
with :
106
190
name : engine-sdk-release
107
- path : src/out/linux_release_arm64/engine-sdk/
191
+ path : |
192
+ $tag_release.tar.gz
193
+ $tag_release.tar.gz.sha256
194
+
195
+ - name : Release - Publish Release
196
+ if : ${{ inputs.release == 'true' }}
197
+ env :
198
+ GH_TOKEN : ${{ github.token }}
199
+ GH_REPO : ${{ github.repository }}
200
+ run : |
201
+ gh release create --draft "$tag_release" --title "$tag_release" --notes "$notes_release"
202
+ gh release upload "$tag_release" "$tag_release.tar.gz" "$tag_release.tar.gz.sha256"
203
+ gh release edit "$tag_release" --draft=false
108
204
109
205
- name : Build Profile
110
206
working-directory : src
@@ -117,22 +213,36 @@ jobs:
117
213
--enable-impeller-3d \
118
214
--no-goma --no-rbe \
119
215
--no-stripped --no-enable-unittests \
120
- --linux-cpu arm64 \
216
+ --linux-cpu $linux_cpu \
121
217
--target-os linux \
122
- --target-sysroot $PWD/build/linux/debian_sid_arm64-sysroot \
218
+ --target-sysroot $PWD/build/linux/$target_sysroot \
123
219
--target-toolchain $PWD/flutter/buildtools/linux-x64/clang \
124
- --target-triple aarch64-unknown-linux-gnu
125
- ninja -C out/linux_profile_arm64
220
+ --target-triple $target_triple
221
+ ninja -C out/linux_profile_$arch
126
222
127
223
- name : Prepare Profile Artifacts
128
224
run : |
129
- chmod +x scripts/prepare-sdk-aarch64.sh
130
- export SYSROOT=$PWD/src/build/linux/debian_sid_arm64-sysroot
131
- cd src/out/linux_profile_arm64
132
- ../../../scripts/prepare-sdk-aarch64.sh
225
+ scripts/prepare-sdk-$arch.sh src/out/linux_profile_$arch $PWD/src/build/linux/$target_sysroot
226
+
227
+ tar czfhv $tag_profile.tar.gz src/out/linux_profile_$arch/engine-sdk/
228
+
229
+ sha256sum -b $tag_profile.tar.gz > $tag_profile.tar.gz.sha256
133
230
134
231
- name : Publish Profile
232
+ if : ${{ inputs.release != 'true' }}
135
233
uses : actions/upload-artifact@v4
136
234
with :
137
235
name : engine-sdk-profile
138
- path : src/out/linux_profile_arm64/engine-sdk/
236
+ path : |
237
+ $tag_profile.tar.gz
238
+ $tag_profile.tar.gz.sha256
239
+
240
+ - name : Release - Publish Profile
241
+ if : ${{ inputs.release == 'true' }}
242
+ env :
243
+ GH_TOKEN : ${{ github.token }}
244
+ GH_REPO : ${{ github.repository }}
245
+ run : |
246
+ gh release create --draft "$tag_profile" --title "$tag_profile" --notes "$notes_profile"
247
+ gh release upload "$tag_profile" "$tag_profile.tar.gz" "$tag_profile.tar.gz.sha256"
248
+ gh release edit "$tag_profile" --draft=false
0 commit comments