Makers' devops related template repository, i.e. workflows, special files, tool configs, ... .
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
This repository provides templates for creating a new project. The following files can be modified and reused:
- README.md
- SECURITY.md
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- LICENSE
- templates/RELEASE_NOTES.md
- .github/ISSUE_TEMPLATE/bug_report_template.md
- .github/ISSUE_TEMPLATE/feature_request_template.md
It also provides a set of scripts and configurations to automate code quality checks and formatting for C/C++ and Python projects. It is designed to be integrated as a submodule in any project and includes workflows for running checks both locally and in GitHub Actions (GA) environments.
-
Reusable Template Files
-
Scripts to Run Code Quality Checks:
- cppcheck: Static analysis for C/C++ code.
- clang-tidy: Linter and static analysis for C/C++ code.
- clang-format: Code formatting for C/C++.
- black: Code formatting for Python scripts.
-
Seamless Integration:
- Can be added as a submodule to any project.
- Supports local execution of code quality checks in development environments.
- Includes a GitHub Actions workflow for CI/CD integration.
-
Customizable Checks:
Project-specific and user-specific configurations using project.yml and user.yml.
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
This is an example of how to list things you need to use the software and how to install them.
- ```sh ```
- Clone the repo
git clone https://github.com/Infineon/makers-devops.git
- Install dependencies
<dependencies install>
- Change git remote url to avoid accidental pushes to base project
git remote set-url origin Infineon/makers-devops git remote -v # confirm the changes
Include this repository as a submodule in your project using the following command:
git submodule add <repo_url> extras/makers-devops
Create the following YAML files in your project to define the tools and checks to run:
- project.yml: Contains project-specific configurations such as tools and commands.
- user.yml: Optionally define user-specific configurations.
Add new tools and checks in the project.yml under the check: section to extend the configuration.
Ensure you have Docker installed to run containerized tools. The repository provides a Makefile to simplify execution of code quality checks. Some common commands include:
- Clean Results:
make clean-results
- Run All Checks:
make run-container-check-all
- Run Specific Tools:
make run-container-cppcheck
make run-container-clang-tidy-check
make run-container-clang-tidy-format
make run-container-black-format
For more details, refer to the Makefile in the repository.
Install the following tools locally:
- python3
- cppcheck
- llvm
- black
The repository includes a predefined workflow script that can be triggered to run all the defined checks in the GitHub Actions (GA) environment.
In order to integrate, reference the workflow script from this repository ".github/workflows/code_checks.yml". Ensure your project sets the inputs, project-yaml and user-yaml for configuration.
After running cppcheck and clang-tidy, you can generate a collective HTML report:
make run-container-generate-html-report
The report will be available under the directory _results/cppcheck/html-report/index.html
Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.
For more examples, please refer to the Documentation
- Feature 1
- Feature 2
- Feature 3
- Nested Feature
See the open issues for a full list of proposed features (and known issues).
We welcome community contributions! Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated 👐.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Before submitting a pull request, please check the Code of Conduct of this project. Thank you for following these guidelines.
Don't forget to give the project a star ⭐! Thanks again!
Significant contributions should be aligned with the project team in advance. See CONTRIBUTING for more information.
Distributed under the MIT License. See LICENSE for more information.
Project Link: https://github.com/Infineon/makers-devops