Skip to content

Commit 4dcdf5e

Browse files
committed
WIP:mac sccache
Change-Id: Ie0ee0d86efca90dfcf2fe02e46ab8a92ddbec62e
1 parent dea0857 commit 4dcdf5e

22 files changed

Lines changed: 178 additions & 1299 deletions

.github/actions/build/action.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ runs:
2020
- name: GN gen
2121
run: |
2222
cd cobalt/src
23-
cobalt/build/gn.py -p ${{ matrix.platform }} -C ${{ matrix.config }}
23+
if [[ "${{ matrix.platform }}" == *"mac"* ]]; then
24+
cobalt/build/gn.py -p ${{ matrix.platform }} -C ${{ matrix.config }} --no-rbe --cc_wrapper=sccache
25+
else
26+
cobalt/build/gn.py -p ${{ matrix.platform }} -C ${{ matrix.config }}
27+
fi
2428
shell: bash
2529
- name: List GN args
2630
run: |

.github/actions/depot_tools/action.yaml

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,22 @@ runs:
1717
- name: Clear Cache and Clone Depot Tools
1818
if: inputs.use_cache != 'true'
1919
run: |
20-
rm -rf /runner-cache/depot_tools /runner-cache/cobalt/.cipd_cache
21-
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /runner-cache/depot_tools
22-
git -C /runner-cache/cobalt/src clean -ffdx
23-
shell: bash
20+
# Use $HOME instead of a root / path
21+
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $HOME/depot_tools
2422
25-
- name: Reset Cached Depot Tools
26-
if: inputs.use_cache == 'true'
27-
run: git -C /runner-cache/depot_tools reset --hard origin/main
23+
# Add to PATH for subsequent steps
24+
echo "$HOME/depot_tools" >> $GITHUB_PATH
2825
shell: bash
2926

30-
- name: Add Depot Tools to PATH
31-
run: echo "/runner-cache/depot_tools" >> $GITHUB_PATH
32-
shell: bash
27+
# - name: Reset Cached Depot Tools
28+
# if: inputs.use_cache == 'true'
29+
# run: git -C /runner-cache/depot_tools reset --hard origin/main
30+
# shell: bash
3331

3432
- name: Bootstrap Bundled python3
3533
run: |
3634
# Must be run manually as $DEPOT_TOOLS_UPDATE is 0 in CI, skipping the bootstrap.
37-
source /runner-cache/depot_tools/bootstrap_python3 && bootstrap_python3
35+
source $HOME/depot_tools/bootstrap_python3 && bootstrap_python3
3836
shell: bash
3937

4038
- name: Disable Chromium client side build telemetry
@@ -43,26 +41,34 @@ runs:
4341

4442
- name: Run gclient config
4543
run: |
46-
cd cobalt
44+
cd src
4745
gclient config \
4846
--name=src \
4947
--custom-var=download_remoteexec_cfg=True \
5048
--custom-var='rbe_instance="${{ inputs.rbe_instance }}"' \
5149
https://github.com/${{ github.repository }}
5250
shell: bash
5351

54-
- name: Set target OS for Android
55-
if: contains(matrix.platform, 'android')
52+
# - name: Set target OS for Android
53+
# if: contains(matrix.platform, 'android')
54+
# run: |
55+
# cd cobalt
56+
# echo "target_os=['android']" >> .gclient
57+
# gclient validate
58+
# shell: bash
59+
60+
- name: Set target OS for Mac
61+
if: ${{ contains(matrix.platform, 'mac') }}
5662
run: |
57-
cd cobalt
58-
echo "target_os=['android']" >> .gclient
63+
cd src
64+
echo "target_os=['mac']" >> .gclient
5965
gclient validate
6066
shell: bash
6167

6268
- name: Run gclient sync
6369
if: inputs.run_sync == 'true'
6470
run: |
65-
cd cobalt
71+
cd src
6672
gclient sync \
6773
--verbose \
6874
--shallow \
@@ -75,9 +81,9 @@ runs:
7581

7682
- name: Run gclient runhooks
7783
if: inputs.run_sync == 'true'
78-
env:
79-
CIPD_CACHE_DIR: "/runner-cache/cobalt/.cipd_cache"
84+
# env:
85+
# CIPD_CACHE_DIR: "/runner-cache/cobalt/.cipd_cache"
8086
run: |
81-
cd cobalt
87+
cd src
8288
gclient runhooks --verbose
8389
shell: bash

.github/config/mac.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"docker_service": "",
3+
"platforms": [
4+
"chromium_mac-arm64"
5+
],
6+
"build_configs": [
7+
"devel"
8+
],
9+
"targets": [
10+
"chromedriver",
11+
"content_shell"
12+
],
13+
"includes": [
14+
{
15+
"name": "mac",
16+
"platform": "chromium_mac-arm64"
17+
}
18+
]
19+
}

.github/workflows/android.yaml

Lines changed: 0 additions & 84 deletions
This file was deleted.

.github/workflows/diff_chromium_branches.yaml

Lines changed: 0 additions & 140 deletions
This file was deleted.

0 commit comments

Comments
 (0)