@@ -17,18 +17,18 @@ concurrency:
1717# and that commit is cryptographically "verified". Typically, a verified commit (like a GitHub UI
1818# squash-and-merge) has already passed through presubmit during the Pull Request phase.
1919# The conditional explicitly checks:
20- # 1. always() && !cancelled(): Ensures the job runs even if 'check-verification' is skipped, but
21- # aborts if the workflow was manually cancelled.
22- # 2. github.event_name == 'pull_request': Presubmits should always run normally on PRs .
23- # 3. github.event_name == 'push' && ...: If it's a push to main, it only runs if the
24- # 'check-verification' job confirmed the commit is NOT verified .
20+ # 1. always() && !cancelled(): Ensures the job runs even if 'check-verification' is skipped
21+ # (which happens normally on PRs), but aborts if the workflow was manually cancelled.
22+ # 2. !needs.check-verification.outputs.skip: Evaluates to true when the 'skip' output is empty .
23+ # The 'skip' output is only set to 'true' if it's a push to main AND the commit is verified.
24+ # In all other cases (including PRs where the job is skipped), it defaults to empty .
2525
2626jobs :
2727 check-verification :
2828 if : github.event_name == 'push'
2929 runs-on : ubuntu-latest
3030 outputs :
31- verified : ${{ steps.check.outputs.verified }}
31+ skip : ${{ steps.check.outputs.skip }}
3232 steps :
3333 - name : Check commit verification
3434 id : check
@@ -40,22 +40,16 @@ jobs:
4040 repo: context.repo.repo,
4141 ref: context.sha
4242 });
43- core.setOutput('verified', data.commit.verification.verified);
43+ if (data.commit.verification.verified) {
44+ core.setOutput('skip', 'true');
45+ }
4446
4547 build-desktop-mac :
4648 name : build-mac
4749 runs-on : ' macos-14-xlarge'
50+ timeout-minutes : 45
4851 needs : [check-verification]
49- if : >
50- always() && !cancelled() &&
51- (
52- github.event_name == 'pull_request' ||
53- (
54- github.event_name == 'push' &&
55- needs.check-verification.result == 'success' &&
56- needs.check-verification.outputs.verified == 'false'
57- )
58- )
52+ if : always() && !cancelled() && !needs.check-verification.outputs.skip
5953 steps :
6054 - uses : actions/checkout@v4.1.6
6155 with :
6862 build-desktop-linux :
6963 name : build-linux
7064 runs-on : ' arm-ubuntu-24.04-16core'
65+ timeout-minutes : 45
7166 needs : [check-verification]
72- if : >
73- always() && !cancelled() &&
74- (
75- github.event_name == 'pull_request' ||
76- (
77- github.event_name == 'push' &&
78- needs.check-verification.result == 'success' &&
79- needs.check-verification.outputs.verified == 'false'
80- )
81- )
67+ if : always() && !cancelled() && !needs.check-verification.outputs.skip
8268 steps :
8369 - uses : actions/checkout@v4.1.6
8470 with :
9581 name : build-windows
9682 runs-on : ' windows-2022'
9783 needs : [check-verification]
98- if : >
99- always() && !cancelled() &&
100- (
101- github.event_name == 'pull_request' ||
102- (
103- github.event_name == 'push' &&
104- needs.check-verification.result == 'success' &&
105- needs.check-verification.outputs.verified == 'false'
106- )
107- )
84+ if : always() && !cancelled() && !needs.check-verification.outputs.skip
10885 steps :
10986 - uses : actions/checkout@v4.1.6
11087 with :
@@ -117,17 +94,9 @@ jobs:
11794 build-android :
11895 name : build-android
11996 runs-on : ' ubuntu-24.04-8core'
97+ timeout-minutes : 45
12098 needs : [check-verification]
121- if : >
122- always() && !cancelled() &&
123- (
124- github.event_name == 'pull_request' ||
125- (
126- github.event_name == 'push' &&
127- needs.check-verification.result == 'success' &&
128- needs.check-verification.outputs.verified == 'false'
129- )
130- )
99+ if : always() && !cancelled() && !needs.check-verification.outputs.skip
131100 steps :
132101 - uses : actions/checkout@v4.1.6
133102 with :
@@ -150,7 +119,7 @@ jobs:
150119 run : |
151120 python3 test/sizeguard/dump_artifact_size.py out/*.aar > current_size.json
152121 BYPASS_ARG=""
153- if python3 test/sizeguard/check_bypass.py ${{ steps.get_commit_msg.outputs.hash }}; then
122+ if python3 test/sizeguard/check_bypass.py ${{ steps.get_commit_msg.outputs.hashes }}; then
154123 BYPASS_ARG="--bypass"
155124 fi
156125 python3 test/sizeguard/check_size.py current_size.json \
@@ -162,17 +131,9 @@ jobs:
162131 build-ios :
163132 name : build-iOS
164133 runs-on : ' macos-14-xlarge'
134+ timeout-minutes : 45
165135 needs : [check-verification]
166- if : >
167- always() && !cancelled() &&
168- (
169- github.event_name == 'pull_request' ||
170- (
171- github.event_name == 'push' &&
172- needs.check-verification.result == 'success' &&
173- needs.check-verification.outputs.verified == 'false'
174- )
175- )
136+ if : always() && !cancelled() && !needs.check-verification.outputs.skip
176137 steps :
177138 - uses : actions/checkout@v4.1.6
178139 with :
@@ -190,17 +151,9 @@ jobs:
190151 build-web :
191152 name : build-web
192153 runs-on : ' arm-ubuntu-24.04-16core'
154+ timeout-minutes : 45
193155 needs : [check-verification]
194- if : >
195- always() && !cancelled() &&
196- (
197- github.event_name == 'pull_request' ||
198- (
199- github.event_name == 'push' &&
200- needs.check-verification.result == 'success' &&
201- needs.check-verification.outputs.verified == 'false'
202- )
203- )
156+ if : always() && !cancelled() && !needs.check-verification.outputs.skip
204157 steps :
205158 - uses : actions/checkout@v4.1.6
206159 with :
@@ -215,16 +168,7 @@ jobs:
215168 name : validate-docs
216169 runs-on : ' ubuntu-24.04'
217170 needs : [check-verification]
218- if : >
219- always() && !cancelled() &&
220- (
221- github.event_name == 'pull_request' ||
222- (
223- github.event_name == 'push' &&
224- needs.check-verification.result == 'success' &&
225- needs.check-verification.outputs.verified == 'false'
226- )
227- )
171+ if : always() && !cancelled() && !needs.check-verification.outputs.skip
228172 steps :
229173 - uses : actions/checkout@v4.1.6
230174 with :
@@ -233,22 +177,14 @@ jobs:
233177 uses : ./.github/actions/get-commit-msg
234178 - name : Check for manual edits to /docs
235179 run : |
236- bash docs_src/build/presubmit_check.sh ${{ steps.get_commit_msg.outputs.hash }}
180+ bash docs_src/build/presubmit_check.sh ${{ steps.get_commit_msg.outputs.hashes }}
237181
238182 test-renderdiff :
239183 name : test-renderdiff
240184 runs-on : ' macos-14-xlarge'
185+ timeout-minutes : 45
241186 needs : [check-verification]
242- if : >
243- always() && !cancelled() &&
244- (
245- github.event_name == 'pull_request' ||
246- (
247- github.event_name == 'push' &&
248- needs.check-verification.result == 'success' &&
249- needs.check-verification.outputs.verified == 'false'
250- )
251- )
187+ if : always() && !cancelled() && !needs.check-verification.outputs.skip
252188 steps :
253189 - uses : actions/checkout@v4.1.6
254190 with :
@@ -319,17 +255,9 @@ jobs:
319255 build-wgsl-webgpu :
320256 name : build-wgsl-webgpu
321257 runs-on : ' arm-ubuntu-24.04-16core'
258+ timeout-minutes : 45
322259 needs : [check-verification]
323- if : >
324- always() && !cancelled() &&
325- (
326- github.event_name == 'pull_request' ||
327- (
328- github.event_name == 'push' &&
329- needs.check-verification.result == 'success' &&
330- needs.check-verification.outputs.verified == 'false'
331- )
332- )
260+ if : always() && !cancelled() && !needs.check-verification.outputs.skip
333261 steps :
334262 - uses : actions/checkout@v4.1.6
335263 with :
@@ -343,17 +271,9 @@ jobs:
343271 test-code-correctness :
344272 name : test-code-correctness
345273 runs-on : ' arm-ubuntu-24.04-16core'
274+ timeout-minutes : 45
346275 needs : [check-verification]
347- if : >
348- always() && !cancelled() &&
349- (
350- github.event_name == 'pull_request' ||
351- (
352- github.event_name == 'push' &&
353- needs.check-verification.result == 'success' &&
354- needs.check-verification.outputs.verified == 'false'
355- )
356- )
276+ if : always() && !cancelled() && !needs.check-verification.outputs.skip
357277 steps :
358278 - uses : actions/checkout@v4.1.6
359279 with :
@@ -371,7 +291,12 @@ jobs:
371291 run : bash test/code-correctness/clang-tidy-proxy.sh
372292 - name : Check - public header inclusion
373293 run : bash test/code-correctness/headers-inclusion.sh out/release/filament/include
294+ - name : Get commit message
295+ id : get_commit_msg
296+ uses : ./.github/actions/get-commit-msg
374297 - name : Check - header organization
298+ env :
299+ COMMIT_MESSAGE : ${{ steps.get_commit_msg.outputs.msg }}
375300 run : |
376301 if [ "${{ github.event_name }}" = "pull_request" ]; then
377302 FILES=()
@@ -392,17 +317,9 @@ jobs:
392317 test-backend :
393318 name : test-backend
394319 runs-on : ' arm-ubuntu-24.04-16core'
320+ timeout-minutes : 45
395321 needs : [check-verification]
396- if : >
397- always() && !cancelled() &&
398- (
399- github.event_name == 'pull_request' ||
400- (
401- github.event_name == 'push' &&
402- needs.check-verification.result == 'success' &&
403- needs.check-verification.outputs.verified == 'false'
404- )
405- )
322+ if : always() && !cancelled() && !needs.check-verification.outputs.skip
406323 steps :
407324 - uses : actions/checkout@v4.1.6
408325 with :
0 commit comments