-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain_diff.txt
More file actions
353 lines (343 loc) · 14.7 KB
/
main_diff.txt
File metadata and controls
353 lines (343 loc) · 14.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
--- real_dotgithub/workflows/main.yaml 2025-12-11 23:02:44.826932581 +0000
+++ dotgithub/workflows/main.yaml 2025-12-13 08:59:13.646531333 +0000
@@ -205,12 +205,12 @@
# Create a zero-indexed list of shards for use by matrix, e.g. [0,1,2,3,4,5].
gtest_shards="[$(seq -s, 0 1 $((${num_gtest_shards} - 1)))]"
echo "gtest_shards=${gtest_shards}" >> $GITHUB_OUTPUT
- - name: Set Docker files checksum
+ - name: Set Docker files checksum (Mock)
id: set-docker-hash
shell: bash
run: |
set -x
- docker_content_sha=$(find cobalt/docker docker-compose.yaml -type f -exec sha256sum -b {} + | LC_ALL=C sort | sha256sum | head -c 64)
+ docker_content_sha="dummy-sha"
echo "docker_content_sha=${docker_content_sha}" >> $GITHUB_OUTPUT
outputs:
platforms: ${{ steps.set-platforms.outputs.platforms }}
@@ -236,7 +236,7 @@
# Builds, tags, and pushes Cobalt docker build images to ghr.
docker-build-image:
needs: [initialize]
- runs-on: [self-hosted, chrobalt-linux-runner]
+ runs-on: ubuntu-latest
steps:
- name: Restore CI Essentials
uses: actions/download-artifact@v4
@@ -257,7 +257,7 @@
docker-unittest-image:
if: needs.initialize.outputs.test_on_host == 'true'
needs: [initialize]
- runs-on: [self-hosted, chrobalt-linux-runner]
+ runs-on: ubuntu-latest
steps:
- name: Restore CI Essentials
uses: actions/download-artifact@v4
@@ -278,7 +278,7 @@
docker-webtest-image:
if: needs.initialize.outputs.web_tests == 'true'
needs: [initialize]
- runs-on: [self-hosted, chrobalt-linux-runner]
+ runs-on: ubuntu-latest
steps:
- name: Restore CI Essentials
uses: actions/download-artifact@v4
@@ -298,7 +298,7 @@
build:
needs: [initialize, docker-build-image]
permissions: {}
- runs-on: [self-hosted, chrobalt-linux-runner]
+ runs-on: ubuntu-latest
name: ${{ matrix.name }}_${{ matrix.config }}
strategy:
fail-fast: false
@@ -308,8 +308,6 @@
config: ${{ fromJson(needs.initialize.outputs.build_configs) }}
container:
image: ${{ needs.docker-build-image.outputs.docker_tag }}
- volumes:
- - /runner-cache:/runner-cache
env:
TEST_ARTIFACTS_KEY: ${{ matrix.platform }}_${{ matrix.name }}_test_artifacts
DEPOT_TOOLS_UPDATE: 0
@@ -328,8 +326,8 @@
path: pre-run
name: ci-essentials-${{ inputs.platform }}
- - name: Prepare Workspace for Checkout
- uses: ./pre-run/.github/actions/prepare-runner-cache
+ - name: Prepare Workspace for Checkout (Mock)
+ run: echo "Mocking prepare cache"
- name: Checkout
uses: actions/checkout@v4
@@ -343,45 +341,26 @@
fetch-depth: ${{ ( github.event_name == 'pull_request' || github.repository == 'youtube/cobalt_sandbox' ) && 2 || 0 }}
clean: false
- - name: Set Up Depot Tools
- id: setup-depot-tools
- continue-on-error: true
- uses: ./cobalt/src/.github/actions/depot_tools
-
- - name: Retry Depot Tools Set Up
- if: steps.setup-depot-tools.outcome != 'success'
- uses: ./cobalt/src/.github/actions/depot_tools
- with:
- use_cache: false
+ - name: Set Up Depot Tools (Mock)
+ run: echo "Mocking depot tools"
+
+ - name: Retry Depot Tools Set Up (Mock)
+ run: echo "Mocking retry"
- name: Build Cobalt
id: build
- uses: ./cobalt/src/.github/actions/build
- # TODO(bug?): android debug builds are broken.
- if: ${{ ! (contains(matrix.platform, 'android') && matrix.config == 'debug') }}
+ uses: ./.github/actions/build
with:
- targets: ${{ needs.initialize.outputs.targets }}
- test_root_target: ${{ needs.initialize.outputs.test_root_target }}
- test_targets_json_file: out/${{ matrix.platform }}_${{ matrix.config }}/test_targets.json
-
- - name: Release Package
- if: (matrix.config == 'qa' || matrix.config == 'gold') && (needs.initialize.outputs.test_package == 'true' || needs.initialize.outputs.test_e2e == 'true')
- uses: ./cobalt/src/.github/actions/package
- with:
- package_dir: out/test-package
-
- - name: Upload Test Artifacts
- uses: ./cobalt/src/.github/actions/upload_test_artifacts
- with:
- test_artifacts_key: ${{ env.TEST_ARTIFACTS_KEY }}
- upload_on_host_test_artifacts: ${{ matrix.config == 'devel' && (needs.initialize.outputs.test_on_host == 'true' || needs.initialize.outputs.web_tests == 'true') }}
- upload_on_device_test_artifacts: ${{ matrix.config == 'devel' && needs.initialize.outputs.test_on_device == 'true' }}
- upload_e2e_test_artifacts: ${{ matrix.config == 'qa' && needs.initialize.outputs.test_e2e == 'true' }}
- test_targets_json_file: out/${{ matrix.platform }}_${{ matrix.config }}/test_targets.json
-
- - name: Run API Leak Detector
- uses: ./cobalt/src/.github/actions/api_leak_detector
- if: inputs.run_api_leak_detector
+ platform: ${{ matrix.platform }}
+ config: ${{ matrix.config }}
+
+ - name: Release Package (Mock)
+ run: echo "Mocking package"
+ - name: Upload Test Artifacts (Mock)
+ run: echo "Mocking upload"
+
+ - name: Run API Leak Detector (Mock)
+ run: echo "Mocking leak detector"
on-device-test:
needs: [initialize, build]
@@ -392,7 +371,7 @@
((inputs.nightly == 'true' || github.event_name == 'schedule') && vars.RUN_ODT_TESTS_ON_NIGHTLY != 'False') ||
(github.event_name == 'push' && vars.RUN_ODT_TESTS_ON_POSTSUBMIT != 'False')
)
- runs-on: [self-hosted, odt-runner]
+ runs-on: ubuntu-latest
name: ${{ matrix.name }}_on_device_tests
permissions: {}
strategy:
@@ -404,23 +383,17 @@
env:
TEST_RESULTS_KEY: ${{ matrix.platform }}_${{ matrix.name }}_test_results
steps:
+ - name: Checkout
+ uses: actions/checkout@v4
- name: Restore CI Essentials
uses: actions/download-artifact@v4
with:
name: ci-essentials-${{ inputs.platform }}
- - name: Parse Test Target JSON
+ - name: Parse Test Target JSON (Mock)
id: test-target-json
- uses: ./.github/actions/test_targets_json
- - name: Run On-Device Tests
- if: ${{ fromJson(steps.test-target-json.outputs.test_targets_count) > 0 }}
- uses: ./.github/actions/on_device_tests
- with:
- test_targets_json: ${{ steps.test-target-json.outputs.test_targets_json }}
- test_results_key: ${{ env.TEST_RESULTS_KEY }}
- gcs_results_path: gs://cobalt-unittest-storage/results/${{ matrix.name }}/${{ github.run_id }}/${{ github.run_attempt }}
- test_dimensions: '${{ needs.initialize.outputs.test_dimensions }}'
- test_device_family: '${{ needs.initialize.outputs.test_device_family}}'
- test_attempts: '${{ needs.initialize.outputs.test_attempts }}'
+ run: echo 'test_targets_json=["cobalt:gn_all"]' >> $GITHUB_OUTPUT && echo "test_targets_count=1" >> $GITHUB_OUTPUT
+ - name: Run On-Device Tests (Mock)
+ run: echo "Mocking on device tests" && mkdir -p results && cp results/fake_unittests_result.xml results/unittest_result.xml
outputs:
test_targets_json: ${{ steps.test-target-json.outputs.test_targets_json }}
@@ -435,7 +408,7 @@
((inputs.nightly == 'true' || github.event_name == 'schedule') && vars.RUN_ODT_TESTS_ON_NIGHTLY != 'False') ||
(github.event_name == 'push' && vars.RUN_ODT_TESTS_ON_POSTSUBMIT != 'False')
)
- runs-on: [self-hosted, odt-runner]
+ runs-on: ubuntu-latest
name: ${{ matrix.name }}_e2e_tests
permissions: {}
strategy:
@@ -447,18 +420,14 @@
steps:
- name: Checkout
uses: actions/checkout@v4
- - name: Run E2E Tests
- uses: ./.github/actions/e2e_tests
- with:
- e2e_test_targets: '${{ needs.initialize.outputs.e2e_test_targets }}'
- test_attempts: '${{ needs.initialize.outputs.e2e_test_attempts }}'
- test_dimensions: '${{ needs.initialize.outputs.test_dimensions }}'
+ - name: Run E2E Tests (Mock)
+ run: echo "Mocking E2E tests"
on-host-test:
needs: [initialize, docker-unittest-image, build]
if: needs.initialize.outputs.test_on_host == 'true'
permissions: {}
- runs-on: [self-hosted, chrobalt-linux-runner]
+ runs-on: ubuntu-latest
name: ${{ matrix.name }}_on_host_tests_${{ matrix.shard }}
strategy:
fail-fast: false
@@ -473,20 +442,17 @@
TEST_ARTIFACTS_KEY: ${{ matrix.platform }}_${{ matrix.name }}_test_artifacts
TEST_RESULTS_KEY: ${{ matrix.platform }}_${{ matrix.name }}_test_results-${{ matrix.shard }}
steps:
+ - name: Checkout
+ uses: actions/checkout@v4
- name: Restore CI Essentials
uses: actions/download-artifact@v4
with:
name: ci-essentials-${{ inputs.platform }}
- - name: Parse Test Target JSON
+ - name: Parse Test Target JSON (Mock)
id: test-target-json
- uses: ./.github/actions/test_targets_json
- - name: Run On-Host Tests
- if: ${{ fromJson(steps.test-target-json.outputs.test_targets_count) > 0 }}
- uses: ./.github/actions/on_host_tests
- with:
- test_artifacts_key: ${{ env.TEST_ARTIFACTS_KEY }}
- test_results_key: ${{ env.TEST_RESULTS_KEY }}
- num_gtest_shards: ${{ needs.initialize.outputs.num_gtest_shards }}
+ run: echo 'test_targets_json=["cobalt:gn_all"]' >> $GITHUB_OUTPUT && echo "test_targets_count=1" >> $GITHUB_OUTPUT
+ - name: Run On-Host Tests (Mock)
+ run: exit 1
outputs:
test_targets_json: ${{ steps.test-target-json.outputs.test_targets_json }}
@@ -494,7 +460,7 @@
needs: [initialize, docker-webtest-image, build]
if: needs.initialize.outputs.web_tests == 'true'
permissions: {}
- runs-on: [self-hosted, chrobalt-linux-runner]
+ runs-on: ubuntu-latest
name: ${{ matrix.name }}_web_tests
strategy:
fail-fast: false
@@ -504,8 +470,6 @@
config: [devel]
container:
image: ${{ needs.docker-webtest-image.outputs.docker_tag }}
- volumes:
- - /runner-cache:/runner-cache
env:
DEPOT_TOOLS_UPDATE: 0
DEPOT_TOOLS_REPORT_BUILD: 0
@@ -519,30 +483,19 @@
with:
path: pre-run
name: ci-essentials-${{ inputs.platform }}
- - name: Prepare Workspace for Checkout
- uses: ./pre-run/.github/actions/prepare-runner-cache
+ - name: Prepare Workspace for Checkout (Mock)
+ run: echo "Mocking prepare cache"
- name: Checkout
uses: actions/checkout@v4
with:
path: cobalt/src
clean: false
- - name: Set Up Depot Tools
- id: setup-depot-tools
- continue-on-error: true
- uses: ./cobalt/src/.github/actions/depot_tools
- with:
- run_sync: false
- - name: Retry Depot Tools Set Up
- if: steps.setup-depot-tools.outcome != 'success'
- uses: ./cobalt/src/.github/actions/depot_tools
- with:
- run_sync: false
- use_cache: false
- - name: Run Web Tests
- uses: ./cobalt/src/.github/actions/web_tests
- with:
- test_artifacts_key: ${{ env.TEST_ARTIFACTS_KEY }}
- test_results_key: Blink Web Test Results ${{ github.workflow }}
+ - name: Set Up Depot Tools (Mock)
+ run: echo "Mocking depot tools"
+ - name: Retry Depot Tools Set Up (Mock)
+ run: echo "Mocking retry"
+ - name: Run Web Tests (Mock)
+ run: echo "Mocking web tests"
test-results:
needs: [initialize, build, on-device-test, on-host-test]
@@ -594,35 +547,15 @@
- name: Download Test Results
if: steps.filter.outputs.skipped != 'true'
uses: actions/download-artifact@v4
- with:
+ run: echo "Mocking test results" && mkdir -p results && echo "<testsuites><testsuite name="dummy" tests="1" failures="0"><testcase name="case1"/></testsuite></testsuites>" > results/dummy_pass.xml
pattern: ${{ env.TEST_RESULTS_KEY }}*
path: results/
- - name: Test Results
- if: steps.filter.outputs.skipped != 'true'
- uses: ./.github/actions/process_test_results
- with:
- target_name: ${{ matrix.test_target }}
- results_glob: results/**/${{ steps.extract-target-name.outputs.test_target }}*.xml
- datadog_api_key: ${{ secrets.datadog_api_key }}
- num_gtest_shards: ${{ needs.initialize.outputs.num_gtest_shards }}
- - name: ${{ matrix.test_target }} Device Logs
- if: always() && steps.filter.outputs.skipped != 'true' && needs.initialize.outputs.test_on_device == 'true'
- continue-on-error: true
- uses: ./.github/actions/print_logs
- with:
- log_glob: results/**/${{ steps.extract-target-name.outputs.test_target }}*logcat.txt
- # TODO: Enable symbolization when it works.
- # symbolize: true
- symbolize: 'false'
- - name: ${{ matrix.test_target }} Test Logs
- if: always() && steps.filter.outputs.skipped != 'true'
- uses: ./.github/actions/print_logs
- with:
- log_glob: results/**/${{ steps.extract-target-name.outputs.test_target }}*log.txt
- results_glob: results/**/${{ steps.extract-target-name.outputs.test_target }}*.xml
- # TODO: Enable symbolization when it works.
- # symbolize: ${{ needs.initialize.outputs.test_on_device == 'true' }}
- symbolize: 'false'
+ - name: Test Results (Mock)
+ run: echo "Mocking test results processing for ${{ matrix.test_target }}"
+ - name: ${{ matrix.test_target }} Device Logs (Mock)
+ run: echo "Mocking device logs"
+ - name: ${{ matrix.test_target }} Test Logs (Mock)
+ run: echo "Mocking test logs"
validate-test-result:
needs: [initialize, build, test-results]
@@ -643,15 +576,15 @@
with:
name: ci-essentials-${{ inputs.platform }}
- name: Download Test Results
- uses: actions/download-artifact@v4
- with:
- pattern: ${{ env.TEST_RESULTS_KEY }}*
- path: results/
- name: Failed Tests
- if: needs.test-results.result == 'failure'
+ if: needs.test-results.result == "failure"
run: |
# Print test result summary.
shopt -s globstar nullglob
python3 cobalt/tools/junit_mini_parser.py results/**/*.xml
exit 1
shell: bash
+ pattern: ${{ env.TEST_RESULTS_KEY }}*
+ path: results/
+ - name: Failed Tests (Mock)
+ run: echo "Mocking failed tests summary" && exit 0