@@ -65,17 +65,34 @@ Warning and error handling
65
65
Each tool will have its own outputs and the standard to consider something
66
66
an error, a warning or something else.
67
67
So the workflows separate the steps outputs into steps events named
68
- ``err ``, ``fail ``, and ``warn ``:
69
-
70
- * ``err ``: What a method that must succeed returns, if not captured
71
- (``|| true ``), fails the CI. Internal to the bash methods, return codes
72
- expected to return known warnings and errors are filtered-out, deferring
73
- to the assertion step.
74
- * ``fail ``: Indicates that a warning or error deemed strict was raised.
75
- Is collected at the assert job and ends the run with failure.
68
+ ``fail ``, and ``warn ``:
69
+
70
+ * ``fail ``: Indicates that a warning or error deemed strict was raised, and
71
+ or what the method that must succeed returns. Will fail the step if not
72
+ captured (``|| true ``). The CI allows some steps to fail, in order to
73
+ collect all failures and assert the job at the end.
76
74
* ``warn ``: Indicates that a warning or error non-deemed strict was raised.
77
75
Is collected at the assert job and **does not ** end the run with failure.
78
76
77
+ When ``continue-on-error: true `` is used at the job level, the following
78
+ topology rules must be followed based on the immediate downstream step:
79
+
80
+ * If downstream is an assert job, the ci already fails on ``step_fail_* ``, so a
81
+ ``failure() `` step should just set ``set_step_fail "assert_state" ``, as well
82
+ the job-scoped ``fatal=true `` environment variable.
83
+ * If downstream is an regular job, the job must export an ``fail=$fail `` output,
84
+ to be used alongside the ``needs `` rule, for example:
85
+
86
+ .. code :: yaml
87
+
88
+ build_gcc_aarch64 :
89
+ needs : [checks]
90
+ if : needs.checks.outputs.fatal != 'true'
91
+
92
+ These rules ensure that the downstream jobs do not run on fatal errors.
93
+ Optional steps may also set ``fatal `` job-scoped environment variable, if taking
94
+ care of calling ``set_step_fail ``.
95
+
79
96
Checking steps description
80
97
~~~~~~~~~~~~~~~~~~~~~~~~~~
81
98
@@ -115,7 +132,7 @@ The checkers are, followed by which step event they raise:
115
132
- | ``sparse ``: the changed files are touched and recompiled with ``C=1 ``.
116
133
| ``fail``: ``error`` logged
117
134
| ``warn``: ``warning`` logged
118
- - | ``ggc fanalyzer ``: the changed files are recompiled appending the ``-fanalyzer `` flag.
135
+ - | ``gcc fanalyzer ``: the changed files are recompiled appending the ``-fanalyzer `` flag.
119
136
| It uses the *compile_commands.json* file to extract the correct compilation flags.
120
137
| ``fail``: ``error`` or ``warning`` logged
121
138
- | ``smatch ``: the changed files are touched and recompiled with ``C=1 CHECK="smatch -p=kernel" ``.
0 commit comments