Compile and test a C application
Using Codefresh pipelines
Codefresh can work with any C/C++ application very easily as both
g++ are already offered in Dockerhub. There is also another example available with C++ and cmake.
The example C project
You can see the example project at https://github.com/codefresh-contrib/c-sample-app. The repository contains a C starter project with a
Makefile and several targets:
makecompiles the code.
make testruns unit tests
make cleanremoves artifacts and binaries.
There are also extra targets for
Create a CI pipeline for C applications
Creating a CI/CD pipeline for C is very easy, because Codefresh can run any gcc image that you wish. Gcc docker images already contain the
Here is the full pipeline that compiles the application after checking out the code.
This pipeline clones the source code, compiles the code and runs unit tests. In all cases we use the public Docker image of Gcc that also contains