Add Github Actions for CI workflow on A2 910b#112
Add Github Actions for CI workflow on A2 910b#112chloroethylene merged 16 commits intoLMCache:mainfrom
Conversation
Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
* Add Pre-commit lint & build test workflow action --------- Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
- because the host-ip variable cannot work here yet, so temporarily pass for the bridgeip Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
There was a problem hiding this comment.
Pull request overview
This pull request introduces GitHub Actions CI workflow for Ascend 910B hardware, adds pre-commit hooks for code quality enforcement, and performs extensive code style improvements across Python and C++ files. The changes include adding SPDX license headers, organizing imports consistently, and reformatting code to follow best practices.
Key Changes:
- Added SPDX header checking tool and applied headers across all files
- Introduced pre-commit configuration with linters (isort, ruff, codespell, clang-format, mypy)
- Reorganized Python imports using isort with Black-compatible configuration
- Reformatted C++ code with consistent style and improved readability
- Fixed minor typo in README ("maintainence" → "maintenance")
Reviewed changes
Copilot reviewed 73 out of 74 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/check_spdx_header.py | New script to check and add SPDX headers to Python files |
| .isort.cfg | Configuration for Python import sorting consistent with Black style |
| tests/**/*.py | Updated imports, added SPDX headers, improved formatting |
| lmcache_ascend/**/*.py | Added SPDX headers, reorganized imports, formatting improvements |
| csrc/**/*.{h,cpp} | C++ code reformatted with consistent style and spacing |
| benchmark/v1/rag/*.py | Refactored for readability with improved formatting |
| README.md | Fixed typo: "maintainence" → "maintenance" |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
Removed the test report publishing step from the workflow. Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 74 out of 75 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
614a573 to
52d684c
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 74 out of 75 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 74 out of 75 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Matthew Yeung <yyygggfff@hotmail.com>
|
Leave a unit test error for now; we'll fix it in a later PR. |
Addresses and Fixes #23
This pull request introduces significant improvements to the project's development workflow, code quality enforcement, and benchmark analysis tooling. The key changes include adding comprehensive CI workflows for linting and testing on Ascend 910B hardware, automating test result reporting, enforcing consistent code style with pre-commit hooks and configuration, and refactoring benchmark analysis scripts for clarity and maintainability.
CI/CD and Test Automation:
.github/workflows/build-and-test.yml) for linting, style checks, and running unit tests on Ascend 910B hardware, including artifact uploads for debugging and test results..github/workflows/report-test-results.yml) that automatically publishes JUnit test reports from CI runs, improving visibility into test outcomes.Code Quality and Style Enforcement:
.pre-commit-config.yaml) integrating tools such as isort, ruff, codespell, clang-format, and mypy, ensuring consistent code formatting, linting, type checking, and license header validation..isort.cfg) to enforce import order and grouping according to the "black" profile and project conventions.Benchmark Analysis Refactoring:
benchmark/v1/rag/analysis.pyfor improved readability, consistent code style, and better error handling; added SPDX license headers and reorganized imports.benchmark/v1/rag/rag.pyfor compliance and clarity.Documentation:
README.mdfor improved clarity.