Skip to content

Commit 3ffeb44

Browse files
authored
[Cherry-Pick][CI] Restore self-hosted runners for GitHub workflows(#7906) (#7909)
1 parent 5d18984 commit 3ffeb44

17 files changed

Lines changed: 141 additions & 64 deletions

.github/workflows/CheckPRTemplate.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ jobs:
1010
check:
1111
name: Check PR Template
1212
if: ${{ github.repository_owner == 'PaddlePaddle' }}
13-
runs-on: ubuntu-latest
13+
runs-on:
14+
group: APPROVAL
1415
env:
1516
PR_ID: ${{ github.event.pull_request.number }}
1617
BASE_BRANCH: ${{ github.event.pull_request.base.ref }}

.github/workflows/Codestyle-Check.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ jobs:
1010
pre-commit:
1111
name: Pre Commit
1212
if: ${{ github.repository_owner == 'PaddlePaddle' }}
13-
runs-on: ubuntu-latest
13+
runs-on:
14+
group: APPROVAL
1415
env:
1516
PR_ID: ${{ github.event.pull_request.number }}
1617
BRANCH: ${{ github.event.pull_request.base.ref }}

.github/workflows/_unit_test_coverage.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,11 +416,15 @@ jobs:
416416
diff_coverage_report:
417417
needs: run_tests_with_coverage
418418
if: always()
419-
runs-on: ubuntu-latest
419+
runs-on:
420+
group: APPROVAL
420421
timeout-minutes: 15
421422
env:
422423
all_cov_file_url: ${{ needs.run_tests_with_coverage.outputs.all_cov_file_url }}
423424
steps:
425+
- name: Cleanup
426+
run: |
427+
rm -rf * .[^.]*
424428
- name: Clone FastDeploy
425429
uses: actions/checkout@v6
426430
with:

.github/workflows/approve.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,15 @@ jobs:
1313
Approval:
1414
name: Approval
1515
if: ${{ github.repository_owner == 'PaddlePaddle' }}
16-
runs-on: ubuntu-latest
16+
runs-on:
17+
group: APPROVAL
1718
env:
1819
PR_ID: ${{ github.event.pull_request.number }}
1920
BRANCH: ${{ github.event.pull_request.base.ref }}
2021
steps:
22+
- name: Cleanup
23+
run: |
24+
rm -rf * .[^.]*
2125
- name: Checkout base repo
2226
uses: actions/checkout@v6
2327
with:

.github/workflows/cancel_ci_iluvatar.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ concurrency:
1313
jobs:
1414
cancel:
1515
name: Cancel ILUVATAR-CI for ${{ github.event.pull_request.number }}
16-
runs-on: ubuntu-latest
16+
runs-on:
17+
group: APPROVAL
1718
steps:
19+
- name: Cleanup
20+
run: |
21+
rm -rf * .[^.]*
1822
- name: Cancel ILUVATAR-CI
1923
run: |
2024
exit 0

.github/workflows/cancel_ci_xpu.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ concurrency:
1313
jobs:
1414
cancel:
1515
name: Cancel CI_XPU for ${{ github.event.pull_request.number }}
16-
runs-on: ubuntu-latest
16+
runs-on:
17+
group: APPROVAL
1718
steps:
19+
- name: Cleanup
20+
run: |
21+
rm -rf * .[^.]*
1822
- name: Cancel CI_XPU
1923
run: |
2024
exit 0

.github/workflows/cancel_pr_build_and_test.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ concurrency:
1212
jobs:
1313
cancel:
1414
name: Cancel PR Build and Test for ${{ github.event.pull_request.number }}
15-
runs-on: ubuntu-latest
15+
runs-on:
16+
group: APPROVAL
1617
steps:
18+
- name: Cleanup
19+
run: |
20+
rm -rf * .[^.]*
1721
- name: Cancel PR Build and Test
1822
run: |
1923
exit 0

.github/workflows/ce_job.yml

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ concurrency:
1414

1515
jobs:
1616
ce_job_pre_check:
17-
runs-on: ubuntu-latest
17+
runs-on:
18+
group: APPROVAL
1819
env:
1920
COMPILE_BRANCH: ${{ vars.COMPILE_BRANCH }}
2021
CE_COMPILE_SELECTION: ${{ vars.CE_COMPILE_SELECTION }}
@@ -26,6 +27,9 @@ jobs:
2627
sm8090_match: ${{ steps.set_output.outputs.sm8090_match }}
2728

2829
steps:
30+
- name: Cleanup
31+
run: |
32+
rm -rf * .[^.]*
2933
- name: Set Version
3034
id: set_output
3135
env:
@@ -78,9 +82,13 @@ jobs:
7882
done
7983
8084
print_ce_job_pre_check_outputs:
81-
runs-on: ubuntu-latest
85+
runs-on:
86+
group: APPROVAL
8287
needs: ce_job_pre_check
8388
steps:
89+
- name: Cleanup
90+
run: |
91+
rm -rf * .[^.]*
8492
- name: Print outputs as JSON
8593
run: |
8694
echo '${{ toJSON(needs.ce_job_pre_check.outputs) }}'
@@ -89,12 +97,16 @@ jobs:
8997
clone:
9098
environment: CodeSync
9199
name: FD-Clone-Linux
92-
runs-on: ubuntu-latest
100+
runs-on:
101+
group: APPROVAL
93102
needs: ce_job_pre_check
94103
if: ${{ needs.ce_job_pre_check.outputs.branch_match == 'true' }}
95104
outputs:
96105
repo_archive_url: ${{ steps.set_output.outputs.repo_archive_url }}
97106
steps:
107+
- name: Cleanup
108+
run: |
109+
rm -rf * .[^.]*
98110
- name: Clone FastDeploy
99111
uses: actions/checkout@v6
100112
with:
@@ -154,8 +166,12 @@ jobs:
154166
resultshow:
155167
name: Show Code Archive Output
156168
needs: clone
157-
runs-on: ubuntu-latest
169+
runs-on:
170+
group: APPROVAL
158171
steps:
172+
- name: Cleanup
173+
run: |
174+
rm -rf * .[^.]*
159175
- name: Print repo_archive_url path
160176
run: |
161177
echo "The code archive is located at: ${{ needs.clone.outputs.repo_archive_url }}"
@@ -207,13 +223,17 @@ jobs:
207223
environment: CodeSync
208224
name: CE_UPLOAD
209225
needs: build_sm8090
210-
runs-on: ubuntu-latest
226+
runs-on:
227+
group: APPROVAL
211228
env:
212229
AK: ${{ secrets.BOS_AK }}
213230
SK: ${{ secrets.BOS_SK }}
214231
FASTDEPLOY_WHEEL_URL: ${{ needs.build_sm8090.outputs.wheel_path }}
215232
COMPILE_ARCH: "80,90"
216233
steps:
234+
- name: Cleanup
235+
run: |
236+
rm -rf * .[^.]*
217237
- uses: actions/setup-python@v6
218238
with:
219239
python-version: '3.10'
@@ -257,13 +277,17 @@ jobs:
257277
environment: CodeSync
258278
name: CE_UPLOAD_RL
259279
needs: build_sm8090_rl
260-
runs-on: ubuntu-latest
280+
runs-on:
281+
group: APPROVAL
261282
env:
262283
AK: ${{ secrets.BOS_AK }}
263284
SK: ${{ secrets.BOS_SK }}
264285
FASTDEPLOY_WHEEL_URL: ${{ needs.build_sm8090_rl.outputs.wheel_path_rl }}
265286
COMPILE_ARCH: "80,90"
266287
steps:
288+
- name: Cleanup
289+
run: |
290+
rm -rf * .[^.]*
267291
- uses: actions/setup-python@v6
268292
with:
269293
python-version: '3.10'
@@ -303,13 +327,17 @@ jobs:
303327
environment: CodeSync
304328
name: CE_UPLOAD
305329
needs: build_sm8689
306-
runs-on: ubuntu-latest
330+
runs-on:
331+
group: APPROVAL
307332
env:
308333
AK: ${{ secrets.BOS_AK }}
309334
SK: ${{ secrets.BOS_SK }}
310335
FASTDEPLOY_WHEEL_URL: ${{ needs.build_sm8689.outputs.wheel_path }}
311336
COMPILE_ARCH: "86,89"
312337
steps:
338+
- name: Cleanup
339+
run: |
340+
rm -rf * .[^.]*
313341
- uses: actions/setup-python@v6
314342
with:
315343
python-version: '3.10'

.github/workflows/check-bypass.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ on:
1818
jobs:
1919
check-bypass:
2020
name: Check bypass
21-
runs-on: ubuntu-latest
21+
runs-on:
22+
group: APPROVAL
2223
permissions:
2324
contents: read
2425
env:
@@ -64,7 +65,9 @@ jobs:
6465
exit 0
6566
fi
6667
67-
files=$(gh pr view ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --json files --jq '.files[].path')
68+
files=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
69+
"https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files?per_page=100" \
70+
| jq -r '.[].filename')
6871
echo "$files"
6972
7073
can_skip_docs=true

.github/workflows/cherry-pick.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ jobs:
2222
github.event.action == 'labeled' ||
2323
contains(join(github.event.pull_request.labels.*.name, ' '), 'cherry-pick')
2424
)
25-
runs-on: ubuntu-latest
25+
runs-on:
26+
group: APPROVAL
2627
steps:
28+
- name: Cleanup
29+
run: |
30+
rm -rf * .[^.]*
2731
- name: Checkout
2832
uses: actions/checkout@v6
2933
with:

0 commit comments

Comments
 (0)