Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22260

Azure DevOps pipeline building Makefile

$
0
0

I'm trying to set up an Azure DevOps build pipeline for CI of a C project that is built using gnu make that eventually runs gcc to compile and link.

While I wasn't sure which task to add to the pipeline in order to build a Makefile project, I tried going with a simple Command Line Script task, where it simply executes 'make' in the proper directory.

The problem is in detecting whether the build failed. In the Command Line Script task, under "Advanced" section, there is only the "Fail on Standard Error" option. The description says that if anything is written to stderr, the task will fail.

So if there is a compile or link error, the task indeed fails, which is the desired behavior. However, gcc also writes all compilation warnings to stderr, and that also causes the task to fail as well, which is not what we want.

Not having "Fail on Standard Error" checked results in the build being marked as successful regardless of how many real errors there are.

When this same build was run as part of a Jenkins job, it was somehow able to correctly interpret gcc/make output and fail the build only if there were actual errors reported. Is there a way to replicate the same behavior in Azure pipelines? Short of fixing all warnings or redesigning the build process to not write anything to stderr and then use some other means to test whether the build was successful?


Viewing all articles
Browse latest Browse all 22260

Trending Articles