Skip to content

Commit aaabf80

Browse files
authored
[CE]fix ce scripts (#2534)
1 parent 3aed8a6 commit aaabf80

File tree

4 files changed

+44
-34
lines changed

4 files changed

+44
-34
lines changed

.github/workflows/ce-build.yml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,10 @@ on:
44
push:
55
branches:
66
- develop
7-
8-
concurrency:
9-
group: build-${{ github.workflow }}
10-
cancel-in-progress: true
117

128
env:
13-
COMMIT_ID: ${{ github.event.pull_request.head.sha }}
14-
TASK: PaddleFormers-CE-${{ github.event.pull_request.number }}-build
15-
BRANCH: ${{ github.event.pull_request.base.ref }}
9+
COMMIT_ID: ${{ github.sha }}
10+
TASK: PaddleFormers-CE-${{ github.sha }}-build
1611
CE_name: build-ce
1712
no_proxy: "localhost,bj.bcebos.com,su.bcebos.com,bcebos.com,apiin.im.baidu.com,gitee.com,aliyun.com,.baidu.com,.tuna.tsinghua.edu.cn"
1813

@@ -23,7 +18,7 @@ defaults:
2318
jobs:
2419
build-ce:
2520
name: build-ce
26-
runs-on: [self-hosted, ernie-8gpu]
21+
runs-on: [self-hosted, paddleformers]
2722
steps:
2823
- name: Determine Image Name
2924
run: |
@@ -43,7 +38,6 @@ jobs:
4338
-v $work_dir:/workspace \
4439
-v /home/.cache/pip:/home/.cache/pip \
4540
-e BRANCH \
46-
-e AGILE_COMPILE_BRANCH \
4741
-e COMMIT_ID \
4842
-e work_dir \
4943
-e ce_scripts \
@@ -68,6 +62,7 @@ jobs:
6862
git config --global user.email "[email protected]"
6963
git pull
7064
git submodule update --init --recursive --force
65+
git checkout -b $COMMIT_ID $COMMIT_ID
7166
git log --pretty=oneline -10
7267
'
7368
@@ -83,25 +78,23 @@ jobs:
8378
bash scripts/regression/build.sh
8479
'
8580
86-
- name: Upload Logs
81+
- name: Upload Products
8782
if: always()
8883
env:
8984
home_path: ${{ github.workspace }}/../../..
9085
bos_file: ${{ github.workspace }}/../../../bos/BosClient.py
91-
allure_file: ${{ github.workspace }}/../../../allure-2.19.0/bin/allure
9286
run: |
9387
docker exec -t $container_name /bin/bash -c '
9488
if [ ! -f "${{ env.bos_file }}" ]; then
9589
wget -q --no-proxy -O ${{ env.home_path }}/bos_new.tar.gz https://xly-devops.bj.bcebos.com/home/bos_new.tar.gz --no-check-certificate
9690
mkdir ${{ env.home_path }}/bos
9791
tar xf ${{ env.home_path }}/bos_new.tar.gz -C ${{ env.home_path }}/bos
9892
fi
99-
bos_prefix="schedule/$(date +%Y%m%d)"
100-
cd /workspace/PaddleFormers/build_logs
101-
for FILE in /workspace/PaddleFormers/build_logs/*; do
93+
cd /workspace/PaddleFormers/upload
94+
for FILE in /workspace/PaddleFormers/upload/*; do
10295
file=$(basename "$FILE")
103-
python ${{ env.bos_file }} $file paddle-github-action/PR/PaddleFormers/build/${bos_prefix}/logs
104-
echo "$file: https://paddle-github-action.bj.bcebos.com/PR/PaddleFormers/build/${bos_prefix}/logs/$file"
96+
python ${{ env.bos_file }} $file paddleformers/wheels
97+
echo "$file: https://paddleformers.bj.bcebos.com/wheels/$file"
10598
done
10699
'
107100

.github/workflows/ce-deadlink.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
deadlink-ce:
2525
name: deadlink-ce
2626
if: github.ref == 'refs/heads/develop'
27-
runs-on: [self-hosted, ernie-8gpu]
27+
runs-on: [self-hosted, paddleformers]
2828
steps:
2929
- name: Determine Image Name
3030
run: |
@@ -44,7 +44,6 @@ jobs:
4444
-v $work_dir:/workspace \
4545
-v /home/.cache/pip:/home/.cache/pip \
4646
-e BRANCH \
47-
-e AGILE_COMPILE_BRANCH \
4847
-e COMMIT_ID \
4948
-e work_dir \
5049
-e ce_scripts \
@@ -86,6 +85,7 @@ jobs:
8685
pip config set global.cache-dir "/home/.cache/pip"
8786
set -e
8887
python -m pip install beautifulsoup4 openpyxl
88+
source $work_dir/../../../proxy
8989
bash run.sh PaddleFormers develop [email protected] PaddleFormers死链检测汇总报告
9090
'
9191
@@ -94,7 +94,6 @@ jobs:
9494
env:
9595
home_path: ${{ github.workspace }}/../../..
9696
bos_file: ${{ github.workspace }}/../../../bos/BosClient.py
97-
allure_file: ${{ github.workspace }}/../../../allure-2.19.0/bin/allure
9897
run: |
9998
docker exec -t $container_name /bin/bash -c '
10099
if [ ! -f "${{ env.bos_file }}" ]; then
@@ -103,8 +102,8 @@ jobs:
103102
tar xf ${{ env.home_path }}/bos_new.tar.gz -C ${{ env.home_path }}/bos
104103
fi
105104
bos_prefix="schedule/$(date +%Y%m%d)"
106-
cd /workspace/PaddleFormers/deadlink_logs
107-
for FILE in /workspace/PaddleFormers/deadlink_logs/*; do
105+
cd /workspace/PaddleFormers/result
106+
for FILE in /workspace/PaddleFormers/result/*; do
108107
file=$(basename "$FILE")
109108
python ${{ env.bos_file }} $file paddle-github-action/PR/PaddleFormers/deadlink/${bos_prefix}/logs
110109
echo "$file: https://paddle-github-action.bj.bcebos.com/PR/PaddleFormers/deadlink/${bos_prefix}/logs/$file"

.github/workflows/ce-unittest-gpu.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ on:
44
schedule:
55
- cron: "0 6 * * 6"
66
workflow_dispatch: # allow to manually trigger the workflow
7+
inputs:
8+
paddle_whl:
9+
description: "paddle链接"
10+
required: false
11+
default: "https://paddle-qa.bj.bcebos.com/paddle-pipeline/Develop-GpuSome-LinuxCentos-Gcc82-Cuda118-Cudnn86-Trt85-Py310-CINN-Compile/latest/paddlepaddle_gpu-0.0.0-cp310-cp310-linux_x86_64.whl"
12+
type: string
13+
repo_branch:
14+
description: "套件分支"
15+
required: false
16+
type: string
717

818
concurrency:
919
group: unittest-${{ github.workflow }}
@@ -37,7 +47,8 @@ jobs:
3747
work_dir: ${{ github.workspace }}
3848
FLAGS_dynamic_static_unified_comm: "True"
3949
python_version: "3.10"
40-
paddle_whl: https://paddle-qa.bj.bcebos.com/paddle-pipeline/Develop-GpuSome-LinuxCentos-Gcc82-Cuda118-Cudnn86-Trt85-Py310-CENN-Compile/latest/paddlepaddle_gpu-0.0.0-cp310-cp310-linux_x86_64.whl
50+
paddle_whl: ${{ github.event.inputs.paddle_whl || 'https://paddle-qa.bj.bcebos.com/paddle-pipeline/Develop-GpuSome-LinuxCentos-Gcc82-Cuda118-Cudnn86-Trt85-Py310-CINN-Compile/latest/paddlepaddle_gpu-0.0.0-cp310-cp310-linux_x86_64.whl' }}
51+
repo_branch: ${{ github.event.inputs.repo_branch || '' }}
4152
run: |
4253
container_name=${TASK}-$(date +%Y%m%d-%H%M%S)
4354
echo "container_name=${container_name}" >> "$GITHUB_ENV"
@@ -53,6 +64,7 @@ jobs:
5364
-e no_proxy \
5465
-e CE_name \
5566
-e paddle_whl \
67+
-e repo_branch \
5668
-e FLAGS_dynamic_static_unified_comm \
5769
-e python_version \
5870
-w /workspace --runtime=nvidia $IMAGE_NAME
@@ -69,7 +81,15 @@ jobs:
6981
cd PaddleFormers
7082
git config --global user.name "PaddleCE"
7183
git config --global user.email "[email protected]"
72-
git pull
84+
if [ -n "$repo_branch" ]; then
85+
echo "Switching to branch: $repo_branch"
86+
git fetch origin $repo_branch
87+
git checkout $repo_branch || git checkout -b $repo_branch origin/$repo_branch
88+
git pull
89+
else
90+
echo "No repo_branch provided, just pulling latest changes"
91+
git pull
92+
fi
7393
git submodule update --init --recursive --force
7494
git log --pretty=oneline -10
7595
'

scripts/regression/build.sh

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ set -e
1818
export formers_dir=/workspace/PaddleFormers
1919
mkdir -p /workspace/PaddleFormers/build_logs
2020
export log_path=/workspace/PaddleFormers/build_logs
21-
mkdir -p ${PPNLP_HOME}/upload_${AGILE_PIPELINE_BUILD_NUMBER}
22-
upload_path=${PPNLP_HOME}/upload_${AGILE_PIPELINE_BUILD_NUMBER}
21+
mkdir -p /workspace/PaddleFormers/upload
22+
upload_path=/workspace/PaddleFormers/upload
2323
export Build_list=()
2424

2525
python -m pip config --user set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
@@ -91,19 +91,17 @@ Build_list=($(awk -v RS=' ' '!a[$1]++' <<< ${Build_list[*]}))
9191
if [[ ${#Build_list[*]} -ne 0 ]];then
9292
echo -e "\033[31m ---- Build_list length: ${#Build_list[*]}, cases: ${Build_list[*]} \033[0m"
9393
echo -e "\033[31m ============================= \033[0m"
94-
install_paddle
94+
# install_paddle
9595
if [[ $(contain_case paddleformers ${Build_list[@]}; echo $?) -eq 1 ]];then
9696
paddleformers_build
97-
else
98-
install_paddleformers
9997
fi
10098

101-
if [ -e "${upload_path}" ] && [ "$(ls -A "${upload_path}/")" ]; then
102-
cd ${upload_path} && ls -A "${upload_path}"
103-
cd ${PPNLP_HOME} && python upload.py ${upload_path} 'paddleformers/wheels'
104-
rm -rf ${upload_path}
105-
echo -e "\033[32m upload wheels SUCCESS \033[0m"
106-
fi
99+
# if [ -e "${upload_path}" ] && [ "$(ls -A "${upload_path}/")" ]; then
100+
# cd ${upload_path} && ls -A "${upload_path}"
101+
# python /workspace/../../../bos/BosClient.py ${upload_path} 'paddleformers/wheels'
102+
# rm -rf ${upload_path}
103+
# echo -e "\033[32m upload wheels SUCCESS \033[0m"
104+
# fi
107105
else
108106
echo -e "\033[32m Don't need build any whl \033[0m"
109107
fi

0 commit comments

Comments
 (0)