{"id":24905965,"url":"https://github.com/dimanikulin/capable-cpp-template","last_synced_at":"2025-04-14T08:12:57.857Z","repository":{"id":275030876,"uuid":"920051146","full_name":"dimanikulin/capable-cpp-template","owner":"dimanikulin","description":"A capable template for C++ projects using CI, Building, Testing, Formatting, Documenting and more","archived":false,"fork":false,"pushed_at":"2025-04-12T10:40:15.000Z","size":81,"stargazers_count":2,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T08:12:49.658Z","etag":null,"topics":["badges","clang-format","clang-tidy","cmake","codecov","cppcheck","ctest","doxygen","github-actions","gtest","linux","macos","md","mermaid-diagrams","ninja","package-manager","qt","windows"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dimanikulin.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,"zenodo":null}},"created_at":"2025-01-21T13:34:01.000Z","updated_at":"2025-04-12T10:40:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"073fb2a2-79fe-4370-bc78-3bedabe9a49a","html_url":"https://github.com/dimanikulin/capable-cpp-template","commit_stats":null,"previous_names":["dimanikulin/capable-cpp-template"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimanikulin%2Fcapable-cpp-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimanikulin%2Fcapable-cpp-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimanikulin%2Fcapable-cpp-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimanikulin%2Fcapable-cpp-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dimanikulin","download_url":"https://codeload.github.com/dimanikulin/capable-cpp-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248843941,"owners_count":21170495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["badges","clang-format","clang-tidy","cmake","codecov","cppcheck","ctest","doxygen","github-actions","gtest","linux","macos","md","mermaid-diagrams","ninja","package-manager","qt","windows"],"created_at":"2025-02-02T00:26:22.815Z","updated_at":"2025-04-14T08:12:57.835Z","avatar_url":"https://github.com/dimanikulin.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"./resources/icons/main.png\" target=\"blank\"\u003e\u003cimg src=\"./resources/icons/main.png\" width=\"120\" alt=\"Your Logo\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"GitHub contributors\" src=\"https://img.shields.io/github/contributors/dimanikulin/capable-cpp-template\"\u003e\n  \u003cimg alt=\"GitHub followers\" src=\"https://img.shields.io/github/followers/dimanikulin?style=social\"\u003e\n  \u003cimg alt=\"Commit activity\" src=\"https://img.shields.io/github/commit-activity/m/dimanikulin/capable-cpp-template\"\u003e\n  \u003cimg alt=\"Last commit\" src=\"https://img.shields.io/github/last-commit/dimanikulin/capable-cpp-template\"\u003e\n  \u003c/br\u003e\n  \u003cimg alt=\"GitHub release (latest by date including pre-releases)\" src=\"https://img.shields.io/github/v/release/dimanikulin/capable-cpp-template?include_prereleases\"\u003e\n  \u003cimg alt=\"GitHub all releases\" src=\"https://img.shields.io/github/downloads/dimanikulin/capable-cpp-template/total\"\u003e\n  \u003cimg alt=\"GitHub Release Date\" src=\"https://img.shields.io/github/release-date-pre/dimanikulin/capable-cpp-template\"\u003e\n  \u003c/br\u003e\n  \u003ca href=\"https://github.com/dimanikulin/capable-cpp-template/actions/workflows/multi-platform-build.yml\"\u003e\u003cimg src=\"https://github.com/dimanikulin/capable-cpp-template/actions/workflows/multi-platform-build.yml/badge.svg?branch=master\" alt=\"Main flow\"/\u003e\u003c/a\u003e\n  \u003cimg alt=\"GitHub code size in bytes\" src=\"https://img.shields.io/github/languages/code-size/dimanikulin/capable-cpp-template\"\u003e\n  \u003cimg alt=\"GitHub repo size\" src=\"https://img.shields.io/github/repo-size/dimanikulin/capable-cpp-template\"\u003e\n  \u003c/br\u003e\n  \u003cimg alt=\"GitHub issues\" src=\"https://img.shields.io/github/issues/dimanikulin/capable-cpp-template\"\u003e\n  \u003cimg alt=\"GitHub closed issues\" src=\"https://img.shields.io/github/issues-closed/dimanikulin/capable-cpp-template\"\u003e\n  \u003cimg alt=\"GitHub pull requests\" src=\"https://img.shields.io/github/issues-pr/dimanikulin/capable-cpp-template\"\u003e\n  \u003cimg alt=\"GitHub closed pull requests\" src=\"https://img.shields.io/github/issues-pr-closed/dimanikulin/capable-cpp-template\"\u003e\n  \u003c/br\u003e\n  \u003ca href=\"https://github.com/dimanikulin/capable-cpp-template/projects/1\"\u003e\u003cimg src=\"https://img.shields.io/badge/roadmap-view-d90368\"\u003e \u003c/a\u003e\n  \u003cimg alt=\"GitHub Discussions\" src=\"https://img.shields.io/github/discussions/dimanikulin/capable-cpp-template\"\u003e\n  \u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/dimanikulin/capable-cpp-template\"\u003e  \n  \u003ca href=\"https://github.com/dimanikulin/capable-cpp-template/edit/master/README.md\"\u003e\u003cimg src=\"https://img.shields.io/badge/documentation-read-d90368\"\u003e \u003c/a\u003e\n  \u003c/br\u003e\n\n\u003c/p\u003e\n\n# Quick Links\n\n- [Description](https://github.com/dimanikulin/capable-cpp-template?tab=readme-ov-file#description)\n- [Features](https://github.com/dimanikulin/capable-cpp-template?tab=readme-ov-file#features)\n- [Initialization](https://github.com/dimanikulin/capable-cpp-template?tab=readme-ov-file#initialization)\n- [Building](https://github.com/dimanikulin/capable-cpp-template?tab=readme-ov-file#building)\n- [Using QT](https://github.com/dimanikulin/capable-cpp-template?tab=readme-ov-file#using-qt)\n- [Testing](https://github.com/dimanikulin/capable-cpp-template?tab=readme-ov-file#testing)\n- [Formatting](https://github.com/dimanikulin/capable-cpp-template?tab=readme-ov-file#formatting)\n- [Static analyzers](https://github.com/dimanikulin/capable-cpp-template?tab=readme-ov-file#static-analyzers)\n- [Code coverage](https://github.com/dimanikulin/capable-cpp-template?tab=readme-ov-file#code-coverage)\n- [Documentation](https://github.com/dimanikulin/capable-cpp-template?tab=readme-ov-file#documentation)\n- [Packaging](https://github.com/dimanikulin/capable-cpp-template?tab=readme-ov-file#packaging)\n- [Coming Features](https://github.com/dimanikulin/capable-cpp-template?tab=readme-ov-file#coming-features)\n- [Contributing](https://github.com/dimanikulin/capable-cpp-template?tab=readme-ov-file#contributing)\n- [Author](https://github.com/dimanikulin/capable-cpp-template?tab=readme-ov-file#author)\n- [License](https://github.com/dimanikulin/capable-cpp-template?tab=readme-ov-file#license)\n- [References](https://github.com/dimanikulin/capable-cpp-template?tab=readme-ov-file#references)\n\n# Description\n\nA template for *C++* projects featuring CI, building, testing, formatting, documentation, and more.\n\nDesigned as a starting point with a wide range of features that can be easily included or excluded based on your needs.\n\nThis template reflects my personal approach, so you may have different preferences regarding its implementation.\n\nAny feedback is greatly appreciated!\n\n# Features\n\n| # | Feature                     | CI support | Description    |\n| - | ----------------------------|------------|:--------------:|\n|  | **License**                  | N/A        | Fully open license. The project is licensed under the [Unlicense](https://unlicense.org/)|\n|  | **MD templates**             | N/A        | Attractive main *README* (*Logo*, *Badges*, *Quick Links*, *Tables*, *Diagrams*, *References*) |\n|  | **Building**                 | Yes        | Build with *Ninja* and *CMake,* Use of *Ccache* to speed up the rebuilds |\n|  | **Testing**                  | Yes        | Unit testing with *GoogleTest* and *CTests* (with an option to enable testing), uploading test results to *GitHub* |\n|  | **Coverage**                 | Yes        | Using *GCov* and *LCov*, ziping by *7xip*, uploading report to *GitHub* |\n|  | **Formatting**               | TBD        | Usinf *clang-format* and Google code style *clang-format* configuration  |\n|  | **Packaging**                | Yes        | Stripping binaries, ziping by *7xip*, uploading binaries to *GitHub*, Windows package by *WiX* |\n|  | **CI**                       | Yes        | Using *GitHub Actions* CI workflows for *Windows,* *Linux* and *MacOS* operation systems |\n|  | **gitignore**                | N/A        | Uses well known *ignore file* [from this repo](https://github.com/github/gitignore) |\n|  | **QT**                       | Yes        | Installed on CI only |\n\nWhat is important - you can easialy disable the things you don't use.\n\n# Initialization\n\nThere are two ways to install the project:\n\n- clone if from [GitHub](https://github.com/dimanikulin/capable-cpp-template)\n- [use this repo as template](https://github.com/dimanikulin/capable-cpp-template/generate)\n\nIf you would like to clone the repository please run:\n\n```bash\ngit clone https://github.com/dimanikulin/capable-cpp-template/\n```\n\n## Readme.md\n\nYou need to provide *an icon* at *./resources/icons/main.png* if you wish to include *an icon* in this *README* file.\n\nUpdate the *href* in badges to point to your repository (note: the repository must be public to use badges)\n\n*GitHub* supports *Mermaid.js* for creating diagrams, such as:\n\n```mermaid\nflowchart LR\n    B --\u003e|Multimedia data| C(Online Multimedia IR system)\n    B --\u003e|Multimedia data| D(Offline Multimedia IR system)\n    A(Photo Album owner) --\u003e B(FVA Solution)\n    A(Photo Album owner) --\u003e D1\n    A(Photo Album owner) --\u003e D2\n    A(Photo Album owner) --\u003e D3\n    D1(fa:fa-tablet Tablet) --\u003e|Multimedia data| B(FVA Solution)\n    D2(fa:fa-phone Phone) --\u003e|Multimedia data| B(FVA Solution)\n    D3(fa:fa-hdd-o External Disk) --\u003e|Multimedia data| B(FVA Solution)\n```\n\n## Building\n\nThen please update `\"Project\"` in `CMakeLists.txt`\n\n```cmake\nproject(\n  \"Project\"\n  VERSION 0.1.0\n  LANGUAGES CXX\n)\n```\n\nwith your project name.\n\n# Building\n\nTo build the project you will need to run *CMake* routine like to the one below:\n\n```bash\nmkdir build/ \u0026\u0026 cd build/\ncmake --build . \n```\n\nYou can build it locally and in a *CI* environment.\n\n# Testing\n\nThe template uses [Google Test](https://github.com/google/googletest/) for unit testing.\nUnit testing is enabled by default via the `BUILD_TESTS` option.\nTo run tests, use *CTest* from the build directory:\n\n```bash\ncd build          \nctest -C Release\n```\n\nTests can be executed both locally and in a *CI* environment.\n\n# Code coverage\n\nMake sure to have the same version of g++ and gcov, otherwize you will see a report creation issue. Use *sudo update-alternatives* to fix that.\n\nFirst of all you will need to install coverage tool by \n\n```bash\nsudo apt-get update\nsudo apt-get -y install lcov\n```\n\nThen you will need to run the capture for coverage\n\n```bash\nlcov --capture --directory ./build --output-file ./build/coverage.info --ignore-errors mismatch\n```\n\nCause the coverage report must be clear it is suggested to run filtering\n\n```bash\nlcov --remove ./build/coverage.info --directory ./build -o ./build/filtered_coverage.info \\\n'/usr/include/*' \\\n'/include/gtest/*' \\\n'*/test/*' \\\n'*/googletest/*'\n```\nLast but not least there will be translation coverage report to html format\n```bash\ngenhtml ./build/filtered_coverage.info --output-directory coverage_report\n```\n\n# Packaging\n\nWindows is supported now only by using Wix.\n\n# Formatting\n\n**Prerequisites** - *clang-format 17* or later and its configuration in file *.clang-format*\n\nInstalling *clang-format*\n\n```bash\nwget https://apt.llvm.org/llvm.sh\nchmod +x llvm.sh\nsudo ./llvm.sh 17\nsudo apt install clang-format-17\nrm ./llvm.sh\n```\n\nFor *reformatting* please run following cmds:\n\n```bash\nfind tests -regex '.*\\.\\(cpp\\|h\\|cc\\|cxx\\)' -exec clang-format-17 -i {} \\;\nfind src -regex '.*\\.\\(cpp\\|h\\|cc\\|cxx\\)' -exec clang-format-17 -i {} \\;\n```\n\n# Coming features\n\n- QT support (CI and local)\n- Documentation with Doxygen and README support (CI and local)\n- Publish documentation on GitHub Pages\n- Contribution guidelines, issue templates, and pull request templates\n- Static analysis tools\n- check Format on CI\n- Package manager support for Mac and Linux\n- CMake formatting\n- GoogleMock integration\n- Cross-compilation\n- Versioning\n- Codes\n- MarkDown Lint\n\n# Using QT\n\nNow supported on CI only.\n\nQt-oriented static code analyzer based on the Clang [framework](https://github.com/KDE/clazy)\n\n# Static analyzers\n\nTBD\n\nclang-tidy:\n  stage: clang-tidy\n  script:\n    - cmake -Bbuild_stat_analyser -H. -D CMAKE_EXPORT_COMPILE_COMMANDS=ON -D BUILD_TESTING=OFF\n    - cd build_stat_analyser\n    - run-clang-tidy-17 -warnings-as-errors='*' -config-file ../.clang-tidy\n  allow_failure: true\n\n# Documentation\n\nTBD\n\n# Contributing\n\nTBD\n\n# Author\n\n[Dmytro Nikulin](https://github.com/dimanikulin)\n\n# License\n\nThis project is licensed under the [Unlicense](https://unlicense.org/) - see the [LICENSE](https://github.com/dimanikulin/capable-cpp-template?tab=Unlicense-1-ov-file) file for details\n\n# References\n\n| # | Name                 | Source                | Release date           |  Author                 | Description   |\n| - | ---------------------|---------------------- |----------------------- | ----------------------- |:-------------:|\n| 1 | gitignore repository |[GitHub Repo](https://github.com/github/gitignore)| TBD | TBD | TBD  |\n| 2 | QT Static analizer repository |[GitHub Repo](https://github.com/KDE/clazy)| TBD | TBD | TBD |\n| 3 | Cpp project template repository |[GitHub Repo](https://github.com/filipdutescu/modern-cpp-template)| TBD | TBD | TBD |\n| 4 | Google Tests repository |[GitHub Repo](https://github.com/google/googletest/)| TBD | TBD | TBD |\n\n---\n\n\u003cdiv\u003e\n\u003cimg alt=\"Made with Markdown\" src=\"https://img.shields.io/badge/Made%20with-Markdown-1f425f.svg\"/\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimanikulin%2Fcapable-cpp-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimanikulin%2Fcapable-cpp-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimanikulin%2Fcapable-cpp-template/lists"}