7
7
required : true
8
8
type : string
9
9
outputs :
10
+ fatal :
11
+ value : ${{ jobs.checks.outputs.fatal}}
10
12
fail :
11
13
value : ${{ jobs.checks.outputs.fail }}
12
14
warn :
16
18
checks :
17
19
timeout-minutes : 7200
18
20
runs-on : [self-hosted, v1]
21
+ continue-on-error : true
19
22
20
23
outputs :
24
+ fatal : ${{ steps.assert.outputs.fatal }}
21
25
fail : ${{ steps.assert.outputs.fail }}
22
26
warn : ${{ steps.assert.outputs.warn }}
23
27
@@ -29,32 +33,45 @@ jobs:
29
33
source ci/build.sh
30
34
apply_prerun
31
35
36
+ - name : Assert state
37
+ if : ${{ failure() }}
38
+ run : |
39
+ source ci/build.sh
40
+ set_step_fail "assert_state"
41
+ echo "fatal=true" >> "$GITHUB_ENV"
42
+
32
43
- name : License
44
+ if : ${{ !cancelled() && env.fatal != 'true' }}
33
45
run : |
34
46
source ci/build.sh
35
47
check_license
36
48
37
49
- name : Check patch
50
+ if : ${{ !cancelled() && env.fatal != 'true' }}
38
51
run : |
39
52
source ci/build.sh
40
53
export -f check_checkpatch set_step_fail set_step_warn
41
- timeout 1d bash -c "check_checkpatch" || \
42
- echo "step_fail_checkpatch_timeout=true" >> "$GITHUB_ENV"
54
+ status=0; timeout 1d bash -c "check_checkpatch" || status=$?
55
+ [ $status -eq 124 ] && echo "step_fail_checkpatch_timeout=true" >> "$GITHUB_ENV"
56
+ exit $status
43
57
44
58
- name : Coccicheck
59
+ if : ${{ !cancelled() && env.fatal != 'true' }}
45
60
run : |
46
61
source ci/build.sh
47
62
export -f check_coccicheck set_step_fail set_step_warn
48
- timeout 1d bash -c "check_coccicheck" || \
49
- echo "step_fail_coccicheck_timeout=true" >> "$GITHUB_ENV"
63
+ status=0; timeout 1d bash -c "check_coccicheck" || status=$?
64
+ [ $status -eq 124 ] && echo "step_fail_coccicheck_timeout=true" >> "$GITHUB_ENV"
65
+ exit $status
50
66
51
67
- name : CPP Check
68
+ if : ${{ !cancelled() && env.fatal != 'true' }}
52
69
run : |
53
70
source ci/build.sh
54
71
check_cppcheck
55
72
56
73
- name : Checkout and patch reference branch
57
- if : ${{ !startsWith(github.base_ref, 'mirror/') && !startsWith(github.ref_name, 'mirror/') }}
74
+ if : ${{ !cancelled() && env.fatal != 'true' && ! startsWith(github.base_ref, 'mirror/') && !startsWith(github.ref_name, 'mirror/') }}
58
75
run : |
59
76
git fetch origin --depth=1 "${{ inputs.ref_branch }}" &&
60
77
git reset --hard origin/${{ inputs.ref_branch }} ||
@@ -90,18 +107,21 @@ jobs:
90
107
done <<< "$files"
91
108
92
109
- name : Check dt-bindings
110
+ if : ${{ !cancelled() && env.fatal != 'true' }}
93
111
run : |
94
112
source ci/build.sh
95
113
check_dt_binding_check
96
114
97
115
- name : Revert patch reference branch
98
- if : ${{ !startsWith(github.base_ref, 'mirror/') && !startsWith(github.ref_name, 'mirror/') }}
116
+ if : ${{ !cancelled() && env.fatal != 'true' && ! startsWith(github.base_ref, 'mirror/') && !startsWith(github.ref_name, 'mirror/') }}
99
117
run : |
100
118
git reset --hard $head_sha
101
119
102
- - name : Assert checks
120
+ - name : Export labels
121
+ if : ${{ !cancelled() }}
103
122
id : assert
104
123
run : |
105
- echo "warn=$(printenv | grep ^step_warn_ | grep -v =$ | tr '\n' ',' | sed 's/,$//')" >> "$GITHUB_OUTPUT"
106
- echo "fail=$(printenv | grep ^step_fail_ | grep -v =$ | tr '\n' ',' | sed 's/,$//')" >> "$GITHUB_OUTPUT"
124
+ echo "fatal=$fatal" >> "$GITHUB_OUTPUT"
125
+ source ci/runner_env.sh
126
+ export_labels
107
127
0 commit comments