1
- name : Build Chromium Blink for iOS
1
+ name : Build Chromium Blink for iOS (Optimized)
2
2
3
3
on :
4
4
push :
@@ -13,21 +13,41 @@ jobs:
13
13
build :
14
14
runs-on : macos-latest
15
15
steps :
16
- - name : Checkout repository
16
+ - name : Checkout repository (Shallow)
17
17
uses : actions/checkout@v4
18
+ with :
19
+ fetch-depth : 1 # Only fetch the latest commit. CRUCIAL optimization.
20
+
21
+ - name : Set up depot_tools (Cached)
22
+ uses : actions/cache@v4
23
+ id : cache-depot-tools
24
+ with :
25
+ path : depot_tools
26
+ key : ${{ runner.os }}-depot-tools-v1
18
27
19
- - name : Set up depot_tools
28
+ - name : Install depot_tools (if not cached)
29
+ if : steps.cache-depot-tools.outputs.cache-hit != 'true'
20
30
run : |
21
31
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
22
32
echo "$(pwd)/depot_tools" >> $GITHUB_PATH
23
33
24
- - name : Fetch Chromium source
34
+ - name : Fetch Chromium source (Shallow, No Hooks)
25
35
run : |
26
36
mkdir chromium && cd chromium
27
- fetch --nohooks ios
28
- gclient sync --nohooks --with_branch_heads --with_tags
37
+ fetch --nohooks ios --no-history # CRUCIAL: No history, much faster!
38
+ gclient sync --nohooks -r src@HEAD #Sync to the HEAD of src, don't fetch full tree.
39
+
40
+ - name : Cache Chromium source
41
+ uses : actions/cache@v4
42
+ id : cache-chromium
43
+ with :
44
+ path : chromium
45
+ key : ${{ runner.os }}-chromium-v3-${{ hashFiles('chromium/src/DEPS') }} # Cache based on DEPS changes
46
+ restore-keys : |
47
+ ${{ runner.os }}-chromium-v3-
29
48
30
- - name : Install dependencies
49
+ - name : Install dependencies (if chromium cache missed)
50
+ if : steps.cache-chromium.outputs.cache-hit != 'true'
31
51
run : |
32
52
cd chromium/src
33
53
./build/install-build-deps.sh
@@ -38,10 +58,11 @@ jobs:
38
58
cd chromium/src
39
59
gn gen out/ios --args='target_os="ios" target_cpu="arm64" is_component_build=false is_debug=false'
40
60
41
- - name : Build Blink
61
+ - name : Build Blink (Smaller Target)
42
62
run : |
43
63
cd chromium/src
44
- ninja -C out/ios blink_tests
64
+ ninja -C out/ios blink # Build a smaller, representative Blink target
65
+ # Other good minimal targets: content_shell, blink_core (even smaller)
45
66
46
67
- name : Upload Blink Build Artifacts
47
68
uses : actions/upload-artifact@v4
0 commit comments