{"id":24175925,"url":"https://github.com/anilsudhakar/simple_cpp_project","last_synced_at":"2026-04-13T13:32:20.497Z","repository":{"id":270487644,"uuid":"910528181","full_name":"AnilSudhakar/simple_cpp_project","owner":"AnilSudhakar","description":"A Simple C++ project setup for beginners","archived":false,"fork":false,"pushed_at":"2025-01-05T19:35:42.000Z","size":1491,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-15T08:05:36.765Z","etag":null,"topics":["cmake","conan","cpp","docker","github-actions","jfrog-artifactory"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AnilSudhakar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-31T14:31:46.000Z","updated_at":"2025-01-07T06:03:00.000Z","dependencies_parsed_at":"2025-03-02T14:44:41.917Z","dependency_job_id":"5a55d2b7-ed72-4e70-8bca-cdba5c505e3e","html_url":"https://github.com/AnilSudhakar/simple_cpp_project","commit_stats":null,"previous_names":["anilsudhakar/simple_cpp_project"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AnilSudhakar/simple_cpp_project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnilSudhakar%2Fsimple_cpp_project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnilSudhakar%2Fsimple_cpp_project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnilSudhakar%2Fsimple_cpp_project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnilSudhakar%2Fsimple_cpp_project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AnilSudhakar","download_url":"https://codeload.github.com/AnilSudhakar/simple_cpp_project/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnilSudhakar%2Fsimple_cpp_project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31754907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T13:27:56.013Z","status":"ssl_error","status_checked_at":"2026-04-13T13:21:23.512Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmake","conan","cpp","docker","github-actions","jfrog-artifactory"],"created_at":"2025-01-13T02:33:59.653Z","updated_at":"2026-04-13T13:32:20.472Z","avatar_url":"https://github.com/AnilSudhakar.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simple_cpp_project\n\n\nThis repository contains a simple C++ project demonstrating the setup with the following features:\n\n- Modular code structure with a simple logging library.\n- Unit tests for testing functionality.\n- Docker setup for development and testing environments.\n- Automated build and packaging process using CMake and Conan.\n- Continuous Integration setup with GitHub Actions.\n\n---\n\n## Directory Structure\n\n```plaintext\n.\n├── app                  # Source code of the application\n│   ├── include          # Header files\n│   │   └── Logger.hpp   # Logging utility header\n│   └── src              # Source files\n│       └── Logger.cpp   # Logging utility implementation\n├── build.sh             # Script to build the project\n├── clean_build.sh       # Script to clean the build folder\n├── cmake                # CMake helper modules\n│   └── UnitTest.cmake   # Unit test configuration\n├── conanfile.py         # Conan configuration for dependencies\n├── Config.cmake.in      # CMake configuration template\n├── development_docker   # Docker setup for development\n│   ├── build_docker.sh  # Script to build Docker image\n│   ├── Dockerfile       # Docker image definition\n│   ├── helper           # Helper tools (e.g., fixuid)\n│   ├── push_docker.sh   # Script to push Docker image\n│   ├── requirements.txt # Development requirements\n│   └── toolchain_catalog.apt-get.packages # Toolchain dependencies\n├── package.sh           # Script to package the project\n├── run_docker.sh        # Script to run the project in Docker\n├── run_unit_tests.sh    # Script to run unit tests\n├── test_package         # Test package setup\n├── tests                # Unit tests\n├── README.md            # Project documentation\n└── upload_package.sh    # upload conan package to Jfrog artifactory\n```\n\n---\n\n## Getting Started\n\n### Prerequisites\n\n- **CMake** (\u003e= 3.16)\n- **Conan** (\u003e= 1.39)\n- **Docker**\n\n### Build and Run\n\n1. **Clone the Repository:**\n\n   ```bash\n   git clone https://github.com/AnilSudhakar/simple_cpp_project.git\n   cd simple_cpp_project\n   ```\n\n2. **Build the Project:**\n\n   ```bash\n   ./build.sh\n   ```\n\n3. **Run Unit Tests:**\n    The unit-tests can be created as targets with all the necessary target set-up using the CMake function `add_unit_test()` which finds the gtest libraries and links against the test executable.\n   ```bash\n   ./run_unit_tests.sh\n   ```\n\n4. **Package the Library:**\n\n   ```bash\n   ./package.sh\n   ```\n\n5. **Upload the conan package:**\n\n   ```bash\n   ./upload_package.sh\n   ```\n---\n\nOnce the package is pushed into the artifactory then it can be consumed as shown in this [sample_application](https://github.com/AnilSudhakar/sample_application).\n\n## Docker Setup\n\nThis project includes a Docker-based development setup. To use Docker:\n\n1. **Pre-requiste install docker:**\n\n   ```bash\n    # Add Docker's official GPG key:\n    sudo apt-get update\n    sudo apt-get install ca-certificates curl\n    sudo install -m 0755 -d /etc/apt/keyrings\n    sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc\n    sudo chmod a+r /etc/apt/keyrings/docker.asc\n\n    # Add the repository to Apt sources:\n    echo \\\n    \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \\\n    $(. /etc/os-release \u0026\u0026 echo \"$VERSION_CODENAME\") stable\" | \\\n    sudo tee /etc/apt/sources.list.d/docker.list \u003e /dev/null\n    sudo apt-get update\n   ```\n\n2. **Build the Docker Image:**\n\n   ```bash\n   cd development_docker\n   ./build_docker.sh\n   ```\n\n3. **Run the Docker Container:**\n\n   ```bash\n   ./run_docker.sh\n   ```\n\n4. **Push docker image to Jfrog artifactory(optional)**\n\n   ```bash\n   ./push_docker.sh\n   ```\n\n---\n\n## Continuous Integration\n\nThis project uses GitHub Actions for CI. The pipeline performs the following:\n\n1. Build the project using CMake.\n2. Run unit tests.\n3. Package the library.\n\n---\n\n## Contributing\n\nFeel free to submit issues or pull requests to improve this project. Contributions are welcome!\n\n### How to Contribute\n\n1. Fork the repository.\n2. Create a new branch for your feature.\n3. Make your changes and write tests if applicable.\n4. Submit a pull request.\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See the `LICENSE` file for details.\n\n---\n\n## Acknowledgments\n\n- Thanks to the contributors of CMake, Conan, and Docker for making software development simpler and more efficient.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanilsudhakar%2Fsimple_cpp_project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanilsudhakar%2Fsimple_cpp_project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanilsudhakar%2Fsimple_cpp_project/lists"}