Skip to content

Commit 03ae6d1

Browse files
authored
[CI]add ce yml (#2468)
1 parent 604c08a commit 03ae6d1

File tree

6 files changed

+353
-29
lines changed

6 files changed

+353
-29
lines changed

.github/workflows/ce-build.yml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: Build Whl CE
2+
3+
on: [push]
4+
5+
concurrency:
6+
group: build-${{ github.workflow }}
7+
cancel-in-progress: true
8+
9+
env:
10+
COMMIT_ID: ${{ github.event.pull_request.head.sha }}
11+
TASK: PaddleFormers-CE-${{ github.event.pull_request.number }}-build
12+
BRANCH: ${{ github.event.pull_request.base.ref }}
13+
CE_name: build-ce
14+
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"
15+
16+
defaults:
17+
run:
18+
shell: bash
19+
20+
jobs:
21+
build-ce:
22+
name: build-ce
23+
runs-on: [self-hosted, ernie-8gpu]
24+
steps:
25+
- name: Determine Image Name
26+
run: |
27+
echo "IMAGE_NAME=iregistry.baidu-int.com/paddlecloud/base-images:paddlecloud-ubuntu18.04-gcc8.2-cuda11.8-cudnn8.6-nccl2.15.5-latest" >> "$GITHUB_ENV"
28+
29+
- name: Run Container
30+
env:
31+
work_dir: ${{ github.workspace }}
32+
FLAGS_dynamic_static_unified_comm: "True"
33+
python_version: "3.10"
34+
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
35+
run: |
36+
container_name=${TASK}-$(date +%Y%m%d-%H%M%S)
37+
echo "container_name=${container_name}" >> "$GITHUB_ENV"
38+
docker run -d -t --name ${container_name} --net=host -v /dev/shm:/dev/shm --shm-size=32G \
39+
-v $work_dir/../../..:$work_dir/../../.. \
40+
-v $work_dir:/workspace \
41+
-v /home/.cache/pip:/home/.cache/pip \
42+
-e BRANCH \
43+
-e AGILE_COMPILE_BRANCH \
44+
-e COMMIT_ID \
45+
-e work_dir \
46+
-e ce_scripts \
47+
-e no_proxy \
48+
-e CE_name \
49+
-e paddle_whl \
50+
-e FLAGS_dynamic_static_unified_comm \
51+
-e python_version \
52+
-w /workspace --runtime=nvidia $IMAGE_NAME
53+
54+
- name: Download Code
55+
run: |
56+
docker exec -t $container_name /bin/bash -c '
57+
rm -rf * .[^.]*
58+
echo "Downloading PaddleFormers.tar"
59+
wget -q --no-proxy https://paddle-qa.bj.bcebos.com/CodeSync/develop/PaddleFormers.tar --no-check-certificate
60+
echo "Extracting PaddleFormers.tar"
61+
tar xf PaddleFormers.tar && rm -rf PaddleFormers.tar
62+
source $work_dir/../../../proxy
63+
cd PaddleFormers
64+
git config --global user.name "PaddleCE"
65+
git config --global user.email "[email protected]"
66+
git pull
67+
git submodule update --init --recursive --force
68+
git log --pretty=oneline -10
69+
'
70+
71+
- name: Test
72+
run: |
73+
docker exec -t $container_name /bin/bash -c '
74+
ldconfig
75+
unlink /usr/bin/python3
76+
ln -sf $(which python${python_version}) /usr/bin/python3
77+
pip config set global.cache-dir "/home/.cache/pip"
78+
set -e
79+
cd /workspace/PaddleFormers && git config --global --add safe.directory $PWD
80+
bash scripts/regression/build.sh
81+
'
82+
83+
- name: Upload Logs
84+
if: always()
85+
env:
86+
home_path: ${{ github.workspace }}/../../..
87+
bos_file: ${{ github.workspace }}/../../../bos/BosClient.py
88+
allure_file: ${{ github.workspace }}/../../../allure-2.19.0/bin/allure
89+
run: |
90+
docker exec -t $container_name /bin/bash -c '
91+
if [ ! -f "${{ env.bos_file }}" ]; then
92+
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
93+
mkdir ${{ env.home_path }}/bos
94+
tar xf ${{ env.home_path }}/bos_new.tar.gz -C ${{ env.home_path }}/bos
95+
fi
96+
bos_prefix="schedule/$(date +%Y%m%d)"
97+
cd /workspace/PaddleFormers/build_logs
98+
for FILE in /workspace/PaddleFormers/build_logs/*; do
99+
file=$(basename "$FILE")
100+
python ${{ env.bos_file }} $file paddle-github-action/PR/PaddleFormers/build/${bos_prefix}/logs
101+
echo "$file: https://paddle-github-action.bj.bcebos.com/PR/PaddleFormers/build/${bos_prefix}/logs/$file"
102+
done
103+
'
104+
105+
- name: Terminate And Delete the Container
106+
if: always()
107+
run: |
108+
docker rm -f $container_name 2>/dev/null || true

.github/workflows/ce-deadlink.yml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: Deadlink CE
2+
3+
on:
4+
schedule:
5+
- cron: "0 16 * * 1"
6+
7+
concurrency:
8+
group: deadlink-${{ github.workflow }}
9+
cancel-in-progress: true
10+
11+
env:
12+
COMMIT_ID: ${{ github.event.pull_request.head.sha }}
13+
TASK: PaddleFormers-CE-${{ github.event.pull_request.number }}-deadlink
14+
BRANCH: ${{ github.event.pull_request.base.ref }}
15+
CE_name: deadlink-ce
16+
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"
17+
18+
defaults:
19+
run:
20+
shell: bash
21+
22+
jobs:
23+
deadlink-ce:
24+
name: deadlink-ce
25+
runs-on: [self-hosted, ernie-8gpu]
26+
steps:
27+
- name: Determine Image Name
28+
run: |
29+
echo "IMAGE_NAME=iregistry.baidu-int.com/paddlecloud/base-images:paddlecloud-ubuntu18.04-gcc8.2-cuda11.8-cudnn8.6-nccl2.15.5-latest" >> "$GITHUB_ENV"
30+
31+
- name: Run Container
32+
env:
33+
work_dir: ${{ github.workspace }}
34+
FLAGS_dynamic_static_unified_comm: "True"
35+
python_version: "3.10"
36+
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
37+
run: |
38+
container_name=${TASK}-$(date +%Y%m%d-%H%M%S)
39+
echo "container_name=${container_name}" >> "$GITHUB_ENV"
40+
docker run -d -t --name ${container_name} --net=host -v /dev/shm:/dev/shm --shm-size=32G \
41+
-v $work_dir/../../..:$work_dir/../../.. \
42+
-v $work_dir:/workspace \
43+
-v /home/.cache/pip:/home/.cache/pip \
44+
-e BRANCH \
45+
-e AGILE_COMPILE_BRANCH \
46+
-e COMMIT_ID \
47+
-e work_dir \
48+
-e ce_scripts \
49+
-e no_proxy \
50+
-e CE_name \
51+
-e paddle_whl \
52+
-e FLAGS_dynamic_static_unified_comm \
53+
-e python_version \
54+
-w /workspace --runtime=nvidia $IMAGE_NAME
55+
56+
- name: Download Code
57+
run: |
58+
docker exec -t $container_name /bin/bash -c '
59+
rm -rf * .[^.]*
60+
echo "Downloading PaddleFormers.tar"
61+
wget -q --no-proxy https://paddle-qa.bj.bcebos.com/CodeSync/develop/PaddleFormers.tar --no-check-certificate
62+
echo "Extracting PaddleFormers.tar"
63+
tar xf PaddleFormers.tar && rm -rf PaddleFormers.tar
64+
source $work_dir/../../../proxy
65+
cd PaddleFormers
66+
git config --global user.name "PaddleCE"
67+
git config --global user.email "[email protected]"
68+
git pull
69+
git submodule update --init --recursive --force
70+
git log --pretty=oneline -10
71+
cd -
72+
echo "Downloading PaddleTest.tar"
73+
wget -q --no-proxy https://xly-devops.bj.bcebos.com/PaddleTest/PaddleTest.tar.gz --no-check-certificate
74+
tar xf PaddleTest.tar.gz
75+
cp -r PaddleTest/models/PaddleNLP/deadlink/* ./
76+
'
77+
78+
- name: Test
79+
run: |
80+
docker exec -t $container_name /bin/bash -c '
81+
ldconfig
82+
unlink /usr/bin/python3
83+
ln -sf $(which python${python_version}) /usr/bin/python3
84+
pip config set global.cache-dir "/home/.cache/pip"
85+
set -e
86+
cd /workspace/PaddleFormers && git config --global --add safe.directory $PWD
87+
python -m pip install beautifulsoup4 openpyxl
88+
bash run.sh PaddleFormers develop [email protected] PaddleFormers死链检测汇总报告
89+
'
90+
91+
- name: Upload Logs
92+
if: always()
93+
env:
94+
home_path: ${{ github.workspace }}/../../..
95+
bos_file: ${{ github.workspace }}/../../../bos/BosClient.py
96+
allure_file: ${{ github.workspace }}/../../../allure-2.19.0/bin/allure
97+
run: |
98+
docker exec -t $container_name /bin/bash -c '
99+
if [ ! -f "${{ env.bos_file }}" ]; then
100+
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
101+
mkdir ${{ env.home_path }}/bos
102+
tar xf ${{ env.home_path }}/bos_new.tar.gz -C ${{ env.home_path }}/bos
103+
fi
104+
bos_prefix="schedule/$(date +%Y%m%d)"
105+
cd /workspace/PaddleFormers/deadlink_logs
106+
for FILE in /workspace/PaddleFormers/deadlink_logs/*; do
107+
file=$(basename "$FILE")
108+
python ${{ env.bos_file }} $file paddle-github-action/PR/PaddleFormers/deadlink/${bos_prefix}/logs
109+
echo "$file: https://paddle-github-action.bj.bcebos.com/PR/PaddleFormers/deadlink/${bos_prefix}/logs/$file"
110+
done
111+
'
112+
113+
- name: Terminate And Delete the Container
114+
if: always()
115+
run: |
116+
docker rm -f $container_name 2>/dev/null || true
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: Unittest GPU CE
2+
3+
on:
4+
schedule:
5+
- cron: "0 16 * * 0"
6+
7+
concurrency:
8+
group: unittest-${{ github.workflow }}
9+
cancel-in-progress: true
10+
11+
env:
12+
COMMIT_ID: ${{ github.event.pull_request.head.sha }}
13+
TASK: PaddleFormers-CE-unittest-gpu
14+
ce_scripts: /workspace/PaddleFormers/scripts/unit_test
15+
BRANCH: ${{ github.event.pull_request.base.ref }}
16+
AGILE_COMPILE_BRANCH: ${{ github.event.pull_request.base.ref }}
17+
CE_name: unittest-gpu-ce
18+
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"
19+
20+
defaults:
21+
run:
22+
shell: bash
23+
24+
jobs:
25+
unittest-gpu-ce:
26+
name: unittest-gpu-ce
27+
runs-on: [self-hosted, ernie-8gpu]
28+
steps:
29+
- name: Determine Image Name
30+
run: |
31+
echo "IMAGE_NAME=iregistry.baidu-int.com/paddlecloud/base-images:paddlecloud-ubuntu18.04-gcc8.2-cuda11.8-cudnn8.6-nccl2.15.5-latest" >> "$GITHUB_ENV"
32+
33+
- name: Run Container
34+
env:
35+
work_dir: ${{ github.workspace }}
36+
FLAGS_dynamic_static_unified_comm: "True"
37+
python_version: "3.10"
38+
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
39+
run: |
40+
container_name=${TASK}-$(date +%Y%m%d-%H%M%S)
41+
echo "container_name=${container_name}" >> "$GITHUB_ENV"
42+
docker run -d -t --name ${container_name} --net=host -v /dev/shm:/dev/shm --shm-size=32G \
43+
-v $work_dir/../../..:$work_dir/../../.. \
44+
-v $work_dir:/workspace \
45+
-v /home/.cache/pip:/home/.cache/pip \
46+
-e BRANCH \
47+
-e AGILE_COMPILE_BRANCH \
48+
-e COMMIT_ID \
49+
-e work_dir \
50+
-e ce_scripts \
51+
-e no_proxy \
52+
-e CE_name \
53+
-e paddle_whl \
54+
-e FLAGS_dynamic_static_unified_comm \
55+
-e python_version \
56+
-w /workspace --runtime=nvidia $IMAGE_NAME
57+
58+
- name: Download Code
59+
run: |
60+
docker exec -t $container_name /bin/bash -c '
61+
rm -rf * .[^.]*
62+
echo "Downloading PaddleFormers.tar"
63+
wget -q --no-proxy https://paddle-qa.bj.bcebos.com/CodeSync/develop/PaddleFormers.tar --no-check-certificate
64+
echo "Extracting PaddleFormers.tar"
65+
tar xf PaddleFormers.tar && rm -rf PaddleFormers.tar
66+
source $work_dir/../../../proxy
67+
cd PaddleFormers
68+
git config --global user.name "PaddleCE"
69+
git config --global user.email "[email protected]"
70+
git pull
71+
git submodule update --init --recursive --force
72+
git log --pretty=oneline -10
73+
'
74+
75+
- name: Test
76+
run: |
77+
docker exec -t $container_name /bin/bash -c '
78+
ldconfig
79+
unlink /usr/bin/python3
80+
ln -sf $(which python${python_version}) /usr/bin/python3
81+
pip config set global.cache-dir "/home/.cache/pip"
82+
set -e
83+
cd /workspace/PaddleFormers && git config --global --add safe.directory $PWD
84+
timeout 1h bash scripts/unit_test/ci_unit.sh ${paddle} true
85+
'
86+
87+
- name: Upload Allure-reports & Logs
88+
if: always()
89+
env:
90+
home_path: ${{ github.workspace }}/../../..
91+
bos_file: ${{ github.workspace }}/../../../bos/BosClient.py
92+
allure_file: ${{ github.workspace }}/../../../allure-2.19.0/bin/allure
93+
run: |
94+
docker exec -t $container_name /bin/bash -c '
95+
if [ ! -f "${{ env.bos_file }}" ]; then
96+
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
97+
mkdir ${{ env.home_path }}/bos
98+
tar xf ${{ env.home_path }}/bos_new.tar.gz -C ${{ env.home_path }}/bos
99+
fi
100+
if [ ! -f "${{ env.allure_file }}" ]; then
101+
wget -q --no-proxy -O ${{ env.home_path }}/allure-2.19.0.zip https://xly-devops.bj.bcebos.com/tools/allure-2.19.0.zip --no-check-certificate
102+
unzip -q ${{ env.home_path }}/allure-2.19.0.zip
103+
fi
104+
bos_prefix="schedule/$(date +%Y%m%d)"
105+
cd /workspace/PaddleFormers/unittest_logs
106+
for FILE in /workspace/PaddleFormers/unittest_logs/*; do
107+
file=$(basename "$FILE")
108+
python ${{ env.bos_file }} $file paddle-github-action/PR/PaddleFormers/unittest-gpu/${bos_prefix}/logs
109+
echo "$file: https://paddle-github-action.bj.bcebos.com/PR/PaddleFormers/unittest-gpu/${bos_prefix}/logs/$file"
110+
done
111+
cd /workspace/PaddleFormers/
112+
${{ env.allure_file }} generate result -o report
113+
tar -czf products.tar.gz report unittest_logs
114+
python ${{ env.bos_file }} products.tar.gz paddle-github-action/PR/PaddleFormers/unittest-gpu/${bos_prefix}/logs
115+
echo "report: https://paddle-github-action.bj.bcebos.com/PR/PaddleFormers/unittest-gpu/${bos_prefix}/logs/products.tar.gz"
116+
'
117+
118+
- name: Terminate And Delete the Container
119+
if: always()
120+
run: |
121+
docker rm -f $container_name 2>/dev/null || true

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ env:
1212
ci_scripts: /workspace/PaddleFormers/scripts/unit_test
1313
CI_name: unittest-gpu-debug
1414
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"
15-
HF_ENDPOINT: https://hf-mirror.com
16-
STUDIO_GIT_HOST: http://git.prod.idc-to-cloud.aistudio.baidu-int.com
17-
PPNLP_HOME: /ssd1/PaddleNLP
18-
HF_DATASETS_CACHE: /ssd1/PaddleNLP/huggingface/datasets
19-
TRANSFORMERS_CACHE: /ssd1/PaddleNLP/huggingface
2015

2116
defaults:
2217
run:
@@ -25,13 +20,12 @@ defaults:
2520
jobs:
2621
debug-container:
2722
name: unittest-gpu-debug
28-
runs-on: [self-hosted, ernie-8gpu]
23+
runs-on: [self-hosted, 4gpu]
2924
timeout-minutes: 30
3025
steps:
3126
- name: Run Container
3227
env:
3328
work_dir: ${{ github.workspace }}
34-
CACHE_DIR: /home/data/cfs/.cache
3529
FLAGS_dynamic_static_unified_comm: "True"
3630
python_version: "3.10"
3731
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
@@ -44,7 +38,6 @@ jobs:
4438
-v $work_dir/../../..:$work_dir/../../.. \
4539
-v $work_dir:/workspace \
4640
-v /home/.cache/pip:/home/.cache/pip \
47-
-v /ssd1/PaddleNLP:/ssd1/PaddleNLP \
4841
-e BRANCH \
4942
-e PR_ID \
5043
-e COMMIT_ID \

0 commit comments

Comments
 (0)