This is a modular C++ firmware simulation project created to learn and practice:
- CMake (build system)
- GoogleTest and GoogleMock (unit testing and mocking)
- Interface-based design and dependency injection
- Docker (containerized build/test)
- GitHub Actions (Continuous Integration (CI))
There are 3 primary goals of this project:
- To simulate sensor interactions in an embedded-like environment and test them using mocks, fakes, and stubs.
- Automate builds and tests with a Continuous Integration (CI) pipeline using GitHub Actions.
- Containerize the environment using Docker to ensure reproducibility and portability.
include/
: Interface headers and class declarationssrc/
: Source files (sensor logic, manager)test/
: Unit tests using GoogleTest and GoogleMockmain.cpp
: Optional app entry point for local simulationDockerfile
: File that helps docker create the image of our project and run the resulting container.github/workflows/ci.yml
: YAML file that GitHub Actions runs to build and test the project whenever it is pushed or pulled.
mkdir build && cd build
cmake ..
make
ctest
Run these from root directory of project.
# Build Docker image
docker build -t sensor-sim-img .
# Create container, attach output logs to container and run the container which runs the tests.
docker run --rm sensor-sim-img
This is a self-initiated learning project by Mrudula Y to explore software testing, build systems, CI/CD, Docker, and modular C++ design for embedded-style development. It is not used in production systems.
This project is licensed under the MIT License – see the LICENSE file for details.