Skip to content

Commit a6aa38f

Browse files
committed
fix
1 parent f46a34c commit a6aa38f

14 files changed

Lines changed: 1616 additions & 279 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "Check bypass"
2+
description: "A custom action to encapsulate PFCCLab/ci-bypass"
3+
inputs:
4+
github-token:
5+
description: "GitHub token"
6+
required: true
7+
workflow-name:
8+
description: "Workflow name"
9+
required: true
10+
outputs:
11+
can-skip:
12+
description: "Whether the workflow can be skipped."
13+
value: ${{ steps.check-bypass.outputs.can-skip }}
14+
runs:
15+
using: "composite"
16+
steps:
17+
- id: check-bypass
18+
name: Check Bypass
19+
env:
20+
CI_TEAM_MEMBERS: '["swgu98", "risemeup1", "XieYunshen", "luotao1", "tianlef", "ooooo-create"]'
21+
uses: PFCCLab/ci-bypass@v2
22+
with:
23+
github-token: ${{ inputs.github-token }}
24+
non-pull-request-event-strategy: 'never-skipped'
25+
type: 'composite'
26+
composite-rule: |
27+
{
28+
"any": [
29+
{
30+
"type": "labeled",
31+
"label": ["skip-ci: ${{ inputs.workflow-name }}", "skip-ci: all"],
32+
"username": ${{ env.CI_TEAM_MEMBERS }}
33+
},
34+
{
35+
"type": "commented",
36+
"comment-pattern": [".*/skip-ci ${{ inputs.workflow-name }}.*", ".*/skip-ci all.*"],
37+
"username": ${{ env.CI_TEAM_MEMBERS }}
38+
}
39+
]
40+
}

.github/workflows/_xpu_ci_test.yml

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: xpu_ci_test
2-
32
on:
43
workflow_call:
54
inputs:
@@ -22,7 +21,6 @@ on:
2221
required: true
2322
type: string
2423
default: ""
25-
2624
jobs:
2725
run_xpu_cases:
2826
runs-on: [self-hosted, XPU-P800-8Cards]
@@ -38,49 +36,48 @@ jobs:
3836
formers_archive_url: ${{ inputs.PADDLEFORMERS_ARCHIVE_URL }}
3937
model_path: ${{ inputs.MODEL_PATH }}
4038
run: |
41-
set -x
42-
REPO="https://github.com/${{ github.repository }}.git"
43-
FULL_REPO="${{ github.repository }}"
44-
REPO_NAME="${FULL_REPO##*/}"
45-
BASE_BRANCH="${{ github.base_ref }}"
46-
# 由于ci机器网络问题 暂时屏蔽pull命令
47-
# docker pull ${docker_image}
48-
# Clean the repository directory before starting
49-
docker run --rm --net=host -v $(pwd):/workspace -w /workspace \
50-
-e "REPO_NAME=${REPO_NAME}" \
51-
${docker_image} /bin/bash -c '
52-
CLEAN_RETRIES=3
53-
CLEAN_COUNT=0
54-
55-
while [ $CLEAN_COUNT -lt $CLEAN_RETRIES ]; do
56-
echo "Attempt $((CLEAN_COUNT+1)) to remove ${REPO_NAME}* ..."
57-
rm -rf "${REPO_NAME}"* || true
58-
sleep 2
59-
60-
# Check if anything matching ${REPO_NAME}* still exists
61-
if ! ls "${REPO_NAME}"* >/dev/null 2>&1; then
62-
echo "All ${REPO_NAME}* removed successfully"
63-
break
64-
fi
39+
set -x
40+
REPO="https://github.com/${{ github.repository }}.git"
41+
FULL_REPO="${{ github.repository }}"
42+
REPO_NAME="${FULL_REPO##*/}"
43+
BASE_BRANCH="${{ github.base_ref }}"
44+
# 由于ci机器网络问题 暂时屏蔽pull命令
45+
# docker pull ${docker_image}
46+
# Clean the repository directory before starting
47+
docker run --rm --net=host -v $(pwd):/workspace -w /workspace \
48+
-e "REPO_NAME=${REPO_NAME}" \
49+
${docker_image} /bin/bash -c '
50+
CLEAN_RETRIES=3
51+
CLEAN_COUNT=0
6552
66-
CLEAN_COUNT=$((CLEAN_COUNT + 1))
67-
done
53+
while [ $CLEAN_COUNT -lt $CLEAN_RETRIES ]; do
54+
echo "Attempt $((CLEAN_COUNT+1)) to remove ${REPO_NAME}* ..."
55+
rm -rf "${REPO_NAME}"* || true
56+
sleep 2
6857
69-
if ls "${REPO_NAME}"* >/dev/null 2>&1; then
70-
echo "ERROR: Failed to clean ${REPO_NAME}* after multiple attempts"
71-
ls -ld "${REPO_NAME}"*
72-
exit 1
58+
# Check if anything matching ${REPO_NAME}* still exists
59+
if ! ls "${REPO_NAME}"* >/dev/null 2>&1; then
60+
echo "All ${REPO_NAME}* removed successfully"
61+
break
7362
fi
74-
'
7563
76-
wget -q --no-proxy ${formers_archive_url}
77-
tar -xf PaddleFormers.tar.gz
78-
rm -rf PaddleFormers.tar.gz
79-
cd PaddleFormers
80-
git config --global user.name "PaddleFormersCI"
81-
git config --global user.email "paddleformers_ci@example.com"
82-
git log -n 3 --oneline
64+
CLEAN_COUNT=$((CLEAN_COUNT + 1))
65+
done
66+
67+
if ls "${REPO_NAME}"* >/dev/null 2>&1; then
68+
echo "ERROR: Failed to clean ${REPO_NAME}* after multiple attempts"
69+
ls -ld "${REPO_NAME}"*
70+
exit 1
71+
fi
72+
'
8373
74+
wget -q --no-proxy ${formers_archive_url}
75+
tar -xf PaddleFormers.tar.gz
76+
rm -rf PaddleFormers.tar.gz
77+
cd PaddleFormers
78+
git config --global user.name "PaddleFormersCI"
79+
git config --global user.email "paddleformers_ci@example.com"
80+
git log -n 3 --oneline
8481
- name: Run CI unittest
8582
env:
8683
docker_image: ${{ inputs.DOCKER_IMAGE }}
@@ -128,7 +125,9 @@ jobs:
128125
python -m pip uninstall librosa -y
129126
python -m pip install --pre paddlepaddle-xpu -i https://www.paddlepaddle.org.cn/packages/nightly/xpu-p800/
130127
echo "安装PaddleFormers..."
131-
python -m pip install -e .
128+
python -m pip install uv
129+
uv build --wheel --package paddleformers --out-dir dist --clear -v
130+
python -m pip install dist/paddleformers-*.whl
132131
echo "============================安装测试依赖============================"
133132
python -m pip install pytest
134133
python -m pip install pytest-timeout

.github/workflows/check-bypass.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111
can-skip:
1212
description: "Whether the workflow can be skipped."
1313
value: ${{ jobs.check-bypass.outputs.can-skip }}
14-
1514
jobs:
1615
check-bypass:
1716
name: Check bypass
@@ -20,13 +19,13 @@ jobs:
2019
permissions:
2120
contents: read
2221
env:
23-
CI_TEAM_MEMBERS: '["swgu98", "risemeup1" , "XieYunshen", "tianlef"]'
22+
CI_TEAM_MEMBERS: '["swgu98", "risemeup1", "XieYunshen", "luotao1", "tianlef", "ooooo-create"]'
2423
outputs:
2524
can-skip: ${{ steps.check-bypass.outputs.can-skip }}
2625
steps:
2726
- id: check-bypass
2827
name: Check Bypass
29-
uses: PFCCLab/ci-bypass@v1
28+
uses: PFCCLab/ci-bypass@v2
3029
with:
3130
github-token: ${{ secrets.GITHUB_TOKEN }}
3231
non-pull-request-event-strategy: 'never-skipped'

.github/workflows/ci_iluvatar.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: CI_ILUVATAR
2-
32
on:
43
pull_request:
54
types: [opened, synchronize]
@@ -10,11 +9,9 @@ permissions:
109
actions: read
1110
id-token: write
1211
checks: read
13-
1412
concurrency:
1513
group: ${{ github.event.pull_request.number }}-${{ github.workflow }}
1614
cancel-in-progress: true
17-
1815
jobs:
1916
iluvatar_test:
2017
name: iluvatar_test
@@ -27,23 +24,18 @@ jobs:
2724
LIBRARY_PATH: /usr/local/corex/lib
2825
http_proxy: http://oversea-website-proxy.aistudio.public:8888
2926
https_proxy: http://oversea-website-proxy.aistudio.public:8888
30-
3127
steps:
3228
- name: Print current runner name
3329
run: |
3430
echo "Current runner name: ${{ runner.name }}"
3531
env
3632
curl -v --proxy http://oversea-website-proxy.aistudio.public:8888 https://www.github.com
37-
3833
- name: Checkout code
3934
uses: actions/checkout@v4
4035
with:
41-
ref: ${{ github.event_name == 'pull_request'
42-
&& github.event.pull_request.base.ref
43-
|| github.ref_name }}
36+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || github.ref_name }}
4437
submodules: 'recursive'
4538
fetch-depth: 1000
46-
4739
- name: Merge PR (if needed)
4840
if: ${{ github.event_name == 'pull_request' }}
4941
run: |
@@ -55,14 +47,13 @@ jobs:
5547
git merge --no-ff pr/${{ github.event.pull_request.number }}
5648
echo "PR Branch log "
5749
git log --oneline -n 5 pr/${{ github.event.pull_request.number }}
58-
5950
- name: Run CI unittest
6051
env:
6152
MODEL_PATH: /aistudio/paddle_ci
6253
run: |
6354
set -e
6455
git config --global --add safe.directory "$GITHUB_WORKSPACE"
65-
56+
6657
unset http_proxy
6758
unset https_proxy
6859
@@ -94,7 +85,7 @@ jobs:
9485
retry_count=0
9586
max_retries=3
9687
while [ $retry_count -lt $max_retries ]; do
97-
if python -m pip install -e .; then
88+
if python -m pip install uv && uv build --wheel --package paddleformers --out-dir dist --clear -v && python -m pip install dist/paddleformers-*.whl; then
9889
echo "PaddleFormers installation successful"
9990
break
10091
else
@@ -117,4 +108,4 @@ jobs:
117108
ixsmi
118109
python -m pytest -v -s --tb=short scripts/iluvatar_ci/
119110
echo "============================All tests passed============================"
120-
rm -rf baidu/
111+
rm -rf baidu/

.github/workflows/cleanup_ci_gists.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
name: Cleanup CI Gists
2-
32
on:
43
schedule:
5-
- cron: '0 3 * * *' # 每天北京时间11点(UTC+8)
4+
- cron: '0 3 * * *' # 每天北京时间11点(UTC+8)
65
workflow_dispatch:
76
inputs:
87
keep_days:
@@ -13,7 +12,6 @@ on:
1312
description: '只预览不删除 (true/false)'
1413
default: 'false'
1514
required: false
16-
1715
jobs:
1816
cleanup:
1917
runs-on: ernie-cpu
@@ -36,9 +34,8 @@ jobs:
3634
cutoff = datetime.now(timezone.utc) - timedelta(days=keep)
3735
3836
CI_PREFIXES = [
39-
"PaddleFleet CI ",
40-
"PaddleFormers CI ",
41-
"error_",
37+
"PaddleFormers CI ",
38+
"error_",
4239
]
4340
4441
print(f"{'[DRY RUN] ' if dry_run else ''}Deleting gists older than {keep} days (before {cutoff.date()})\n")

0 commit comments

Comments
 (0)