-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
342 changed files
with
8,347 additions
and
5,295 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,43 @@ | ||
name: Check PR Template | ||
|
||
on: | ||
pull_request_target: | ||
pull_request: | ||
branches: [develop] | ||
types: [opened, synchronize, reopened, edited] | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Clone paddle | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: refs/pull/${{ github.event.pull_request.number }}/merge | ||
|
||
- name: Cache python dependencies | ||
uses: actions/cache@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
path: ~/.cache/pip | ||
key: checkpr_pip | ||
python-version: '3.13' | ||
cache: 'pip' | ||
|
||
- name: Get commit message | ||
id: get_commit_message | ||
- name: Install dependencies | ||
run: | | ||
PR_BRANCH_SHA="${{ github.event.pull_request.head.sha }}" | ||
git fetch origin $PR_BRANCH_SHA --depth=1 | ||
COMMIT_MESSAGE=$(git log -1 --format=%B $PR_BRANCH_SHA) | ||
echo "commit_message=$COMMIT_MESSAGE" >> $GITHUB_ENV | ||
pip install httpx | ||
- name: Check PR Template | ||
env: | ||
AGILE_PULL_ID: ${{ github.event.pull_request.number }} | ||
GITHUB_API_TOKEN: ${{ secrets.PADDLE_GITHUB_API_TOKEN }} | ||
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git checkout -b test | ||
pip install httpx pymysql PyGithub | ||
python tools/CheckPRTemplate.py;EXCODE=$? | ||
python tools/CheckPRTemplate.py; EXCODE=$? | ||
echo "EXCODE: $EXCODE" | ||
echo "ipipe_log_param_EXCODE: $EXCODE" | ||
set +x | ||
if [[ "$EXCODE" != "0" ]];then | ||
echo -e "######################################################" | ||
echo -e "If you encounter a situation where the PR template does not match the error message, please use the following link to update your PR: [ https://raw.githubusercontent.com/PaddlePaddle/Paddle/develop/.github/PULL_REQUEST_TEMPLATE.md ]" | ||
echo -e "##ReferenceDocumentation: ##" | ||
echo -e "[ https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE ]" | ||
echo -e "[ https://github.com/PaddlePaddle/Paddle/wiki/paddle_ci_manual ]" | ||
echo -e "######################################################" | ||
echo -e "######################################################" | ||
echo -e "If you encounter a situation where the PR template does not match the error message, please use the following link to update your PR: [ https://raw.githubusercontent.com/PaddlePaddle/Paddle/develop/.github/PULL_REQUEST_TEMPLATE.md ]" | ||
echo -e "##ReferenceDocumentation: ##" | ||
echo -e "[ https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE ]" | ||
echo -e "[ https://github.com/PaddlePaddle/Paddle/wiki/paddle_ci_manual ]" | ||
echo -e "######################################################" | ||
fi |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Codestyle-Check | ||
|
||
on: | ||
pull_request: | ||
branches: [ "develop" ] | ||
|
||
jobs: | ||
pre-commit: | ||
if: github.repository_owner == 'PaddlePaddle' | ||
runs-on: ubuntu-latest | ||
env: | ||
PR_ID: ${{ github.event.pull_request.number }} | ||
BRANCH: develop | ||
|
||
steps: | ||
- name: Checkout base repo | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.base.ref }} | ||
fetch-depth: 1000 | ||
|
||
- name: Merge pr | ||
run: | | ||
git fetch origin pull/${PR_ID}/merge | ||
git checkout -b test FETCH_HEAD | ||
- name: Setup python3.12 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
cache: 'pip' | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install pre-commit==2.17.0 cpplint==1.6.0 clang-format==13.0.0 | ||
- name: Check pre-commit | ||
env: | ||
SKIP_CLANG_TIDY_CHECK: "ON" | ||
run: | | ||
set +e | ||
bash -x tools/codestyle/pre_commit.sh;EXCODE=$? | ||
exit $EXCODE |
This file contains 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
This file contains 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
Oops, something went wrong.