How to continue a workflow when a prior step failed?

I have a number of build steps in my workflow.
It is acceptable for some build steps to fail.
How do I continue the workflow even though a step fails?

Continuing after an earlier workflow step failed is currently not supported. It would be a new feature to mark a step as “allowed to fail”. You could open a feature request in the issue tracker, although I don’t know if anyone has the bandwidth to implement it any time soon.

1 Like

Build tools support this to different levels. ninja -k0 will run everything (but not running if something depends on a failed task). make -k will do the same. There is make -i which ignores errors, but is a great way to get non-reproducible errors as artifacts might not be consistent.

As long as nothing depends on a failed step, I think ninja -k0 is probably sufficient here. I can’t think of a reliable way to model a task that can fail that anything actually depends on though.

1 Like

I suppose the answer here is to wrap it up in a script (CMake, shell, cmd, Python, whatever) that just ignores the exit code and returns success (probably with some “X failed” message for figuring that out).