Skip to content

Commit 7826cf9

Browse files
authored
Update build.yml
1 parent 6bf3895 commit 7826cf9

File tree

1 file changed

+30
-9
lines changed

1 file changed

+30
-9
lines changed

.github/workflows/build.yml

+30-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Chromium Blink for iOS
1+
name: Build Chromium Blink for iOS (Optimized)
22

33
on:
44
push:
@@ -13,21 +13,41 @@ jobs:
1313
build:
1414
runs-on: macos-latest
1515
steps:
16-
- name: Checkout repository
16+
- name: Checkout repository (Shallow)
1717
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
1827

19-
- name: Set up depot_tools
28+
- name: Install depot_tools (if not cached)
29+
if: steps.cache-depot-tools.outputs.cache-hit != 'true'
2030
run: |
2131
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
2232
echo "$(pwd)/depot_tools" >> $GITHUB_PATH
2333
24-
- name: Fetch Chromium source
34+
- name: Fetch Chromium source (Shallow, No Hooks)
2535
run: |
2636
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-
2948
30-
- name: Install dependencies
49+
- name: Install dependencies (if chromium cache missed)
50+
if: steps.cache-chromium.outputs.cache-hit != 'true'
3151
run: |
3252
cd chromium/src
3353
./build/install-build-deps.sh
@@ -38,10 +58,11 @@ jobs:
3858
cd chromium/src
3959
gn gen out/ios --args='target_os="ios" target_cpu="arm64" is_component_build=false is_debug=false'
4060
41-
- name: Build Blink
61+
- name: Build Blink (Smaller Target)
4262
run: |
4363
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)
4566
4667
- name: Upload Blink Build Artifacts
4768
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)