Skip to content

Commit b83081d

Browse files
Add initial build workflow for ios
1 parent d48c35d commit b83081d

File tree

1 file changed

+91
-0
lines changed

1 file changed

+91
-0
lines changed

.github/workflows/build.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
2+
3+
name: Build Flutter Engine
4+
5+
on:
6+
push:
7+
branches:
8+
- experimental
9+
10+
11+
jobs:
12+
build:
13+
runs-on: macos-latest
14+
15+
steps:
16+
17+
- name: Setup depot_tools
18+
shell: bash
19+
run: |
20+
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
21+
22+
echo "${{ github.workspace}}/depot_tools" >> $GITHUB_PATH
23+
24+
- name: Setup gclient
25+
shell: bash
26+
run: |
27+
mkdir -p engine
28+
cat > .gclient <<- EOF
29+
solutions = [
30+
{
31+
"managed": False,
32+
"name": "src/flutter",
33+
"url": "https://github.com/abaltatech/flutter-engine.git",
34+
"custom_deps": {},
35+
"deps_file": "DEPS",
36+
"safesync_url": "",
37+
},
38+
]
39+
EOF
40+
41+
- name: Setup environment
42+
shell: bash
43+
working-directory: engine
44+
run: |
45+
gclient sync
46+
47+
- name: Fetch source
48+
shell: bash
49+
working-directory: engine/src/flutter
50+
run: |
51+
git pull upstream main
52+
53+
- name: Re-fetch dependencies
54+
shell: bash
55+
working-directory: engine
56+
run: |
57+
gclient sync
58+
59+
- name: Generate build files
60+
shell: bash
61+
working-directory: engine/src
62+
run: |
63+
./flutter/tools/gn --unoptimized
64+
./flutter/tools/gn --ios --unoptimized
65+
66+
# final list:
67+
# ./flutter/tools/gn --unoptimized --runtime-mode=debug
68+
# ./flutter/tools/gn --ios --unoptimized --runtime-mode=debug
69+
# ./flutter/tools/gn --ios --unoptimized --runtime-mode=profile
70+
# ./flutter/tools/gn --ios --unoptimized --runtime-mode=release
71+
# ./flutter/tools/gn --ios --runtime-mode=debug
72+
# ./flutter/tools/gn --ios --runtime-mode=profile
73+
# ./flutter/tools/gn --ios --runtime-mode=release
74+
75+
- name: Build
76+
shell: bash
77+
working-directory: engine/src
78+
run: |
79+
ninja -C out/ios_debug_unopt
80+
ninja -C out/host_debug_unopt
81+
# find . -mindepth 1 -maxdepth 1 -type d | xargs -n 1 sh -c 'ninja -C $0 || exit 255'
82+
83+
- uses: actions/upload-artifact@v4
84+
with:
85+
name: gen_snaphot
86+
path: engine/src/out/*/gen_*
87+
88+
- uses: actions/upload-artifact@v4
89+
with:
90+
name: framework
91+
path: engine/src/out/*/*.xcframework

0 commit comments

Comments
 (0)