Refactor: Decoupling NPU-related ttshared Pass Patches and Integrating Non-bisheng-compiler Stages into Pybind11 and Stage Consolidation #122
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: DLCompiler format ci | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| markdownlint: | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'DeepLink-org/DLCompiler' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 16 | |
| - name: Collect changed files | |
| uses: tj-actions/changed-files@v40 | |
| id: changed-files | |
| with: | |
| files: '**/*.md' | |
| separator: ',' | |
| - name: MarkdownLint | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| uses: DavidAnson/markdownlint-cli2-action@v14 | |
| with: | |
| globs: ${{ steps.changed-files.outputs.all_changed_files }} | |
| separator: ',' | |
| clang-format: | |
| needs: markdownlint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cpp-linter/cpp-linter-action@v2 | |
| id: cpp-lint | |
| with: | |
| style: file | |
| ignore: | | |
| third_party/* | |
| .git | |
| tidy-checks: '-*' # disable clang tidy at this stage | |
| version: 17 | |
| - name: Fail test | |
| if: steps.cpp-lint.outputs.checks-failed > 0 | |
| run: echo "Some files failed the linting checks!" && exit 1 | |
| python-black: | |
| needs: markdownlint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # 确保能获取到 main 分支的历史 | |
| - name: Check formatting for PR files | |
| run: | | |
| bash scripts/ci_python_black.sh |