Skip to content

Commit b1e622f

Browse files
committed
flutter-engine-arm* CI
Signed-off-by: Joel Winarske <[email protected]>
1 parent 6c973f8 commit b1e622f

File tree

3 files changed

+270
-0
lines changed

3 files changed

+270
-0
lines changed
+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: Linux arm64
2+
3+
on:
4+
pull_request:
5+
types: [ opened, synchronize, reopened, closed ]
6+
release:
7+
types: [ published, created, edited ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
linux-arm64:
12+
13+
env:
14+
# TODO - hard coded for now
15+
SRCREV: "c9b9d5780da342eb3f0f5e439a7db06f7d112575"
16+
17+
runs-on: [self-hosted, linux, x64]
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
persist-credentials: false
23+
24+
- name: Install packages
25+
run: |
26+
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
27+
28+
- name: Get Flutter Source
29+
run: |
30+
export PATH=$PATH:$PWD/depot_tools
31+
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
32+
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}}]'
33+
gclient sync --force --shallow --no-history -R -D --revision $SRCREV -j$(nproc) -v
34+
35+
PATCH_DIR=$PWD/patches
36+
37+
# fetch arm64 sysroot
38+
cd src
39+
build/linux/sysroot_scripts/install-sysroot.py --arch=arm64
40+
41+
git apply $PATCH_DIR/0001-clang-toolchain.patch
42+
cd flutter
43+
git apply $PATCH_DIR/0001-export-GPU-symbols.patch
44+
45+
- name: Build Debug
46+
working-directory: src
47+
run: |
48+
export PATH=$PATH:$PWD/../depot_tools
49+
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
50+
./flutter/tools/gn --runtime-mode=debug \
51+
--embedder-for-target \
52+
--no-build-embedder-examples \
53+
--enable-impeller-3d \
54+
--no-goma --no-rbe \
55+
--no-stripped --no-enable-unittests \
56+
--linux-cpu arm64 \
57+
--target-os linux \
58+
--target-sysroot $PWD/build/linux/debian_sid_arm64-sysroot \
59+
--target-toolchain $PWD/flutter/buildtools/linux-x64/clang \
60+
--target-triple aarch64-unknown-linux-gnu
61+
62+
ninja -C out/linux_debug_arm64
63+
64+
- name: Publish Debug
65+
working-directory: src/out/linux_debug_arm64
66+
run: |
67+
ls -laR exe.unstripped
68+
ls -la *.so
69+
70+
- name: Build Release
71+
working-directory: src
72+
run: |
73+
export PATH=$PATH:$PWD/../depot_tools
74+
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
75+
./flutter/tools/gn --runtime-mode=release \
76+
--embedder-for-target \
77+
--no-build-embedder-examples \
78+
--enable-impeller-3d \
79+
--no-goma --no-rbe \
80+
--no-stripped --no-enable-unittests \
81+
--linux-cpu arm64 \
82+
--target-os linux \
83+
--target-sysroot $PWD/build/linux/debian_sid_arm64-sysroot \
84+
--target-toolchain $PWD/flutter/buildtools/linux-x64/clang \
85+
--target-triple aarch64-unknown-linux-gnu
86+
ninja -C out/linux_release_arm64
87+
88+
- name: Publish Release
89+
working-directory: src/out/linux_release_arm64
90+
run: |
91+
ls -laR exe.unstripped
92+
ls -la *.so
93+
94+
- name: Build Profile
95+
working-directory: src
96+
run: |
97+
export PATH=$PATH:$PWD/../depot_tools
98+
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
99+
./flutter/tools/gn --runtime-mode=profile \
100+
--embedder-for-target \
101+
--no-build-embedder-examples \
102+
--enable-impeller-3d \
103+
--no-goma --no-rbe \
104+
--no-stripped --no-enable-unittests \
105+
--linux-cpu arm64 \
106+
--target-os linux \
107+
--target-sysroot $PWD/build/linux/debian_sid_arm64-sysroot \
108+
--target-toolchain $PWD/flutter/buildtools/linux-x64/clang \
109+
--target-triple aarch64-unknown-linux-gnu
110+
ninja -C out/linux_profile_arm64
111+
112+
- name: Publish Profile
113+
working-directory: src/out/linux_profile_arm64
114+
run: |
115+
ls -laR exe.unstripped
116+
ls -la *.so
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: Linux armv7hf
2+
3+
on:
4+
pull_request:
5+
types: [ opened, synchronize, reopened, closed ]
6+
release:
7+
types: [ published, created, edited ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
linux-armv7hf:
12+
13+
env:
14+
# TODO - hard coded for now
15+
SRCREV: "c9b9d5780da342eb3f0f5e439a7db06f7d112575"
16+
17+
runs-on: [self-hosted, linux, x64]
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
persist-credentials: false
23+
24+
- name: Install packages
25+
run: |
26+
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
27+
28+
- name: Get Flutter Source
29+
run: |
30+
export PATH=$PATH:$PWD/depot_tools
31+
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
32+
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}}]'
33+
gclient sync --force --shallow --no-history -R -D --revision $SRCREV -j$(nproc) -v
34+
35+
PATCH_DIR=$PWD/patches
36+
37+
# fetch arm sysroot
38+
cd src
39+
build/linux/sysroot_scripts/install-sysroot.py --arch=arm
40+
41+
git apply $PATCH_DIR/0001-clang-toolchain.patch
42+
cd flutter
43+
git apply $PATCH_DIR/0001-export-GPU-symbols.patch
44+
45+
- name: Build Debug
46+
working-directory: src
47+
run: |
48+
export PATH=$PATH:$PWD/../depot_tools
49+
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
50+
./flutter/tools/gn --runtime-mode=debug \
51+
--embedder-for-target \
52+
--no-build-embedder-examples \
53+
--enable-impeller-3d \
54+
--no-goma --no-rbe \
55+
--no-stripped --no-enable-unittests \
56+
--linux-cpu arm \
57+
--arm-float-abi hard \
58+
--target-os linux \
59+
--target-sysroot $PWD/build/linux/debian_sid_arm-sysroot \
60+
--target-toolchain $PWD/flutter/buildtools/linux-x64/clang \
61+
--target-triple armv7-unknown-linux-gnueabihf
62+
63+
ninja -C out/linux_debug_arm
64+
65+
- name: Publish Debug
66+
working-directory: src/out/linux_debug_arm
67+
run: |
68+
ls -laR clang_x64/exe.unstripped
69+
ls -la *.so
70+
71+
- name: Build Release
72+
working-directory: src
73+
run: |
74+
export PATH=$PATH:$PWD/../depot_tools
75+
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
76+
./flutter/tools/gn --runtime-mode=release \
77+
--embedder-for-target \
78+
--no-build-embedder-examples \
79+
--enable-impeller-3d \
80+
--no-goma --no-rbe \
81+
--no-stripped --no-enable-unittests \
82+
--linux-cpu arm \
83+
--arm-float-abi hard \
84+
--target-os linux \
85+
--target-sysroot $PWD/build/linux/debian_sid_arm-sysroot \
86+
--target-toolchain $PWD/flutter/buildtools/linux-x64/clang \
87+
--target-triple armv7-unknown-linux-gnueabihf
88+
89+
ninja -C out/linux_release_arm
90+
91+
- name: Publish Release
92+
working-directory: src/out/linux_release_arm
93+
run: |
94+
ls -laR clang_x64/exe.unstripped
95+
ls -la *.so
96+
97+
- name: Build Profile
98+
working-directory: src
99+
run: |
100+
export PATH=$PATH:$PWD/../depot_tools
101+
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
102+
./flutter/tools/gn --runtime-mode=profile \
103+
--embedder-for-target \
104+
--no-build-embedder-examples \
105+
--enable-impeller-3d \
106+
--no-goma --no-rbe \
107+
--no-stripped --no-enable-unittests \
108+
--linux-cpu arm \
109+
--arm-float-abi hard \
110+
--target-os linux \
111+
--target-sysroot $PWD/build/linux/debian_sid_arm-sysroot \
112+
--target-toolchain $PWD/flutter/buildtools/linux-x64/clang \
113+
--target-triple armv7-unknown-linux-gnueabihf
114+
115+
ninja -C out/linux_profile_arm
116+
117+
- name: Publish Profile
118+
working-directory: src/out/linux_profile_arm
119+
run: |
120+
ls -laR clang_x64/exe.unstripped
121+
ls -la *.so

patches/0001-clang-toolchain.patch

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
From eb564c8be13a16158056890069deef5bad533529 Mon Sep 17 00:00:00 2001
2+
From: Joel Winarske <[email protected]>
3+
Date: Mon, 26 Aug 2024 12:25:58 -0700
4+
Subject: [PATCH] clang toolchain
5+
6+
Signed-off-by: Joel Winarske <[email protected]>
7+
---
8+
build/toolchain/custom/BUILD.gn | 8 ++++----
9+
1 file changed, 4 insertions(+), 4 deletions(-)
10+
11+
diff --git a/build/toolchain/custom/BUILD.gn b/build/toolchain/custom/BUILD.gn
12+
index 3da5f93..05de4d7 100644
13+
--- a/build/toolchain/custom/BUILD.gn
14+
+++ b/build/toolchain/custom/BUILD.gn
15+
@@ -12,11 +12,11 @@ toolchain("custom") {
16+
# these values in our scope.
17+
cc = "${toolchain_bin}/clang"
18+
cxx = "${toolchain_bin}/clang++"
19+
- ar = "${toolchain_bin}/${custom_target_triple}-ar"
20+
+ ar = "${toolchain_bin}/llvm-ar"
21+
ld = "${toolchain_bin}/clang++"
22+
- readelf = "${toolchain_bin}/${custom_target_triple}-readelf"
23+
- nm = "${toolchain_bin}/${custom_target_triple}-nm"
24+
- strip = "${toolchain_bin}/${custom_target_triple}-strip"
25+
+ readelf = "${toolchain_bin}/llvm-readelf"
26+
+ nm = "${toolchain_bin}/llvm-nm"
27+
+ strip = "${toolchain_bin}/llvm-strip"
28+
29+
target_triple_flags = "--target=${custom_target_triple}"
30+
sysroot_flags = "--sysroot ${custom_sysroot}"
31+
--
32+
2.43.5
33+

0 commit comments

Comments
 (0)