@@ -226,7 +226,7 @@ jobs:
226226 # Builds, tags, and pushes Cobalt docker build images to ghr.
227227 docker-build-image :
228228 needs : [initialize]
229- runs-on : [self-hosted, chrobalt-linux-runner]
229+ runs-on : [self-hosted, chrobalt-linux-runner-with-cache ]
230230 steps :
231231 - name : Restore CI Essentials
232232 uses : actions/download-artifact@v4
@@ -247,7 +247,7 @@ jobs:
247247 docker-unittest-image :
248248 if : needs.initialize.outputs.test_on_host == 'true'
249249 needs : [initialize]
250- runs-on : [self-hosted, chrobalt-linux-runner]
250+ runs-on : [self-hosted, chrobalt-linux-runner-with-cache ]
251251 steps :
252252 - name : Restore CI Essentials
253253 uses : actions/download-artifact@v4
@@ -268,7 +268,7 @@ jobs:
268268 docker-webtest-image :
269269 if : needs.initialize.outputs.web_tests == 'true'
270270 needs : [initialize]
271- runs-on : [self-hosted, chrobalt-linux-runner]
271+ runs-on : [self-hosted, chrobalt-linux-runner-with-cache ]
272272 steps :
273273 - name : Restore CI Essentials
274274 uses : actions/download-artifact@v4
@@ -288,15 +288,18 @@ jobs:
288288 build :
289289 needs : [initialize, docker-build-image]
290290 permissions : {}
291- runs-on : [self-hosted, chrobalt-linux-runner]
291+ runs-on : [self-hosted, chrobalt-linux-runner-with-cache ]
292292 name : ${{ matrix.name }}_${{ matrix.config }}
293293 strategy :
294294 fail-fast : false
295295 matrix :
296296 platform : ${{ fromJson(needs.initialize.outputs.platforms) }}
297297 include : ${{ fromJson(needs.initialize.outputs.includes) }}
298298 config : ${{ fromJson(needs.initialize.outputs.build_configs) }}
299- container : ${{ needs.docker-build-image.outputs.docker_tag }}
299+ container :
300+ image : ${{ needs.docker-build-image.outputs.docker_tag }}
301+ volumes :
302+ - /gclient-sync-cache:/gclient-sync-cache
300303 env :
301304 TEST_ARTIFACTS_KEY : ${{ matrix.platform }}_${{ matrix.name }}_test_artifacts
302305 DEPOT_TOOLS_UPDATE : 0
@@ -309,21 +312,26 @@ jobs:
309312 # filesystem, whereas /__w which contains Cobalt source code is on tmpfs.
310313 TMPDIR : /__w/_temp
311314 steps :
315+ - name : Prepare gclient cache directory
316+ run : |
317+ mkdir -p /gclient-sync-cache/cobalt/src
318+ ln -s /gclient-sync-cache/cobalt ${GITHUB_WORKSPACE}/cobalt
312319 - name : Checkout
313320 uses : actions/checkout@v4
314321 # TODO(bug?): android debug builds are broken.
315322 if : ${{ ! (contains(matrix.platform, 'android') && matrix.config == 'debug') }}
316323 with :
317- path : src
324+ path : cobalt/ src
318325 # Set fetch-depth to 2 to make checkout faster for pull requests and cobalt_sandbox repo.
319326 # Set fetch-dept to 0 for non pull request workflows in production repo which is needed
320327 # to properly calculate build id.
321328 fetch-depth : ${{ ( github.event_name == 'pull_request' || github.repository == 'youtube/cobalt_sandbox' ) && 2 || 0 }}
329+ clean : false
322330 - name : Set Up Depot Tools
323- uses : ./src/.github/actions/depot_tools
331+ uses : ./cobalt/ src/.github/actions/depot_tools
324332 - name : Build Cobalt
325333 id : build
326- uses : ./src/.github/actions/build
334+ uses : ./cobalt/ src/.github/actions/build
327335 # TODO(bug?): android debug builds are broken.
328336 if : ${{ ! (contains(matrix.platform, 'android') && matrix.config == 'debug') }}
329337 with :
@@ -335,7 +343,7 @@ jobs:
335343 upload_on_device_test_artifacts : ${{ matrix.config == 'devel' && ( needs.initialize.outputs.test_on_device == 'true' || needs.initialize.outputs.test_e2e == 'true' ) }}
336344 upload_web_test_artifacts : ${{ matrix.config == 'devel' && needs.initialize.outputs.web_tests == 'true' }}
337345 - name : Run API Leak Detector
338- uses : ./src/.github/actions/api_leak_detector
346+ uses : ./cobalt/ src/.github/actions/api_leak_detector
339347 if : inputs.run_api_leak_detector
340348
341349 on-device-test :
@@ -413,7 +421,7 @@ jobs:
413421 needs : [initialize, docker-unittest-image, build]
414422 if : needs.initialize.outputs.test_on_host == 'true'
415423 permissions : {}
416- runs-on : [self-hosted, chrobalt-linux-runner]
424+ runs-on : [self-hosted, chrobalt-linux-runner-with-cache ]
417425 name : ${{ matrix.name }}_on_host_tests_${{ matrix.shard }}
418426 strategy :
419427 fail-fast : false
@@ -449,7 +457,7 @@ jobs:
449457 needs : [initialize, docker-webtest-image, build]
450458 if : needs.initialize.outputs.web_tests == 'true'
451459 permissions : {}
452- runs-on : [self-hosted, chrobalt-linux-runner]
460+ runs-on : [self-hosted, chrobalt-linux-runner-with-cache ]
453461 name : ${{ matrix.name }}_web_tests
454462 strategy :
455463 fail-fast : false
@@ -467,11 +475,11 @@ jobs:
467475 with :
468476 path : src
469477 - name : Set Up Depot Tools
470- uses : ./src/.github/actions/depot_tools
478+ uses : ./cobalt/ src/.github/actions/depot_tools
471479 with :
472480 run_sync : false
473481 - name : Run Web Tests
474- uses : ./src/.github/actions/web_tests
482+ uses : ./cobalt/ src/.github/actions/web_tests
475483 with :
476484 test_artifacts_key : ${{ env.TEST_ARTIFACTS_KEY }}
477485 test_results_key : Blink Web Test Results ${{ github.workflow }}
0 commit comments