This is a simple C project demonstrating basic CI/CD steps:
- Build: Compiling source files into an executable.
- Unit Testing: Running tests to validate functionality.
- Linting: Running static analysis (using cppcheck) to catch potential issues.
c-demo-project/
├── include/
│ └── calculator.h
├── src/
│ └── calculator.c
├── tests/
│ └── test_calculator.c
├── Makefile
└── README.md
-
Build the Project:
make app
-
Run unit tests
make test -
Run linter
make lint
-
Clean artifacts
make clean
You can also build and run tests all at once with:
make all- Fork this repository using your GitHub account
- Clone this repository into your machine
- (optional) Try building and testing the project on your machine
- Add the project into course Semaphore organization (select
I will use the existing workflo) - Edit a file (e.g.
README.md), commit and push the changes (on the new branch) - Login to the Semaphore server with your account
- A new workflow should have started in Semaphore
- Examine the error and fix the pipeline
Relevant docs: How to create a Project