spotify / XCMetrics

XCMetrics is the easiest way to collect Xcode build metrics and improve developer productivity.
https://xcmetrics.io
Other
1.1k stars 77 forks source link

Skip post-action for clean tasks #96

Open Sherlouk opened 1 year ago

Sherlouk commented 1 year ago

We're currently seeing quite a lot of noise generated by clean builds (which on CI is before every real build). Is there a way to prevent the post-action script from being called when we're simply cleaning?

Could this be a case of ignoring the 'noop' category?

BalestraPatrick commented 1 year ago

I think you should look if there are any environment variables that are set in the post-action that would make it possible to skip it. For example, I know that in run script phase you can identify if a build is a indexing build or a normal build by checking "$ACTION" == "indexbuild". There might exist something similar in the post-action variables.

I think in our case we mostly filter them from our dashboard and data (after collecting them anyway) by looking at schema. Clean actions will have a name such as "Clean SchemeName".

Sherlouk commented 1 year ago

Unfortunately I did dump "env" into a file and compared and there was only one difference to a "deep analysis" variable which feels weak to rely on.

The schema doesn't contain "Clean" in it for us. It looks almost identical in Backstage to any other build except "noop" category and of course being far shorter in duration!