Skip to content

Infineon/makers-devops

Repository files navigation

Issues Commits Commits2 Pull requests Contributors Forks Stargazers Documentation status MIT License Contributor Covenant Pre-commit used


Makers-devops

Makers' devops related template repository, i.e. workflows, special files, tool configs, ... .

Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. How to run Code checks locally
  4. Usage
  5. Roadmap
  6. Contributing
  7. License
  8. Contact
  9. Acknowledgments

About The Project

This repository provides templates for creating a new project. The following files can be modified and reused:

  1. README.md
  2. SECURITY.md
  3. CODE_OF_CONDUCT.md
  4. CONTRIBUTING.md
  5. LICENSE
  6. templates/RELEASE_NOTES.md
  7. .github/ISSUE_TEMPLATE/bug_report_template.md
  8. .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.

(back to top)

Features

  1. Reusable Template Files

  2. 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.
  3. 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.
  4. Customizable Checks:

    Project-specific and user-specific configurations using project.yml and user.yml.

(back to top)

Built With

(back to top)

Getting Started

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.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • ```sh ```

Installation

  1. Clone the repo
    git clone https://github.com/Infineon/makers-devops.git
  2. Install dependencies
    <dependencies install>
  3. 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

(back to top)

How to run Code checks locally

Add Repository as a Submodule

Include this repository as a submodule in your project using the following command:

git submodule add <repo_url> extras/makers-devops

Configure Your Project

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.

Running Locally

To execute using Docker and Make

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.

To execute without Docker

Install the following tools locally:

  • python3
  • cppcheck
  • llvm
  • black

Running in CI CD

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.

Generating Reports

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

(back to top)

Usage

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

(back to top)

Roadmap

  • Feature 1
  • Feature 2
  • Feature 3
    • Nested Feature

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

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".

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. 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!

Important Note

Significant contributions should be aligned with the project team in advance. See CONTRIBUTING for more information.

(back to top)

Contributors

contrib.rocks image

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

Project Link: https://github.com/Infineon/makers-devops

(back to top)

Acknowledgments

(back to top)

About

No description or website provided.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •