Skip to content

Commit c84b33b

Browse files
authored
Merge pull request #12 from meta-flutter/jw/release_logic
Release Steps
2 parents 4cacc5c + 57c2483 commit c84b33b

File tree

7 files changed

+480
-105
lines changed

7 files changed

+480
-105
lines changed

.github/workflows/flutter-engine-arm64.yaml

Lines changed: 144 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,31 @@ name: Linux arm64
33
on:
44
workflow_dispatch:
55
inputs:
6-
SRCREV:
7-
description: 'Flutter Engine Target Source Revision'
6+
srcrev:
7+
description: 'Flutter Engine Commit Hash'
88
required: True
99
default: ''
10+
release:
11+
description: 'Release'
12+
required: false
13+
default: 'false'
1014

1115
jobs:
1216
linux-arm64:
1317
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"
1431

1532
steps:
1633
- uses: actions/checkout@v4
@@ -30,9 +47,9 @@ jobs:
3047
3148
PATCH_DIR=$PWD/patches
3249
33-
# fetch arm64 sysroot
50+
# fetch sysroot
3451
cd src
35-
build/linux/sysroot_scripts/install-sysroot.py --arch=arm64
52+
build/linux/sysroot_scripts/install-sysroot.py --arch=$arch
3653
3754
git apply $PATCH_DIR/0001-clang-toolchain.patch
3855
cd flutter
@@ -49,31 +66,96 @@ jobs:
4966
--enable-impeller-3d \
5067
--no-goma --no-rbe \
5168
--no-stripped --no-enable-unittests \
52-
--linux-cpu arm64 \
69+
--linux-cpu $linux_cpu \
5370
--target-os linux \
54-
--target-sysroot $PWD/build/linux/debian_sid_arm64-sysroot \
71+
--target-sysroot $PWD/build/linux/$target_sysroot \
5572
--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
5875
5976
- name: Prepare Debug Artifacts
6077
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
6583
6684
- name: Publish Debug
85+
if: ${{ inputs.release != 'true' }}
6786
uses: actions/upload-artifact@v4
6887
with:
6988
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/
71128
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' }}
73134
uses: actions/upload-artifact@v4
74135
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
77159
78160
- name: Build Release
79161
working-directory: src
@@ -86,25 +168,39 @@ jobs:
86168
--enable-impeller-3d \
87169
--no-goma --no-rbe \
88170
--no-stripped --no-enable-unittests \
89-
--linux-cpu arm64 \
171+
--linux-cpu $linux_cpu \
90172
--target-os linux \
91-
--target-sysroot $PWD/build/linux/debian_sid_arm64-sysroot \
173+
--target-sysroot $PWD/build/linux/$target_sysroot \
92174
--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
95177
96178
- name: Prepare Release Artifacts
97179
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
102185
103186
- name: Publish Release
187+
if: ${{ inputs.release != 'true' }}
104188
uses: actions/upload-artifact@v4
105189
with:
106190
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
108204
109205
- name: Build Profile
110206
working-directory: src
@@ -117,22 +213,36 @@ jobs:
117213
--enable-impeller-3d \
118214
--no-goma --no-rbe \
119215
--no-stripped --no-enable-unittests \
120-
--linux-cpu arm64 \
216+
--linux-cpu $linux_cpu \
121217
--target-os linux \
122-
--target-sysroot $PWD/build/linux/debian_sid_arm64-sysroot \
218+
--target-sysroot $PWD/build/linux/$target_sysroot \
123219
--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
126222
127223
- name: Prepare Profile Artifacts
128224
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
133230
134231
- name: Publish Profile
232+
if: ${{ inputs.release != 'true' }}
135233
uses: actions/upload-artifact@v4
136234
with:
137235
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

Comments
 (0)