forked from PaddlePaddle/PaddleCustomDevice
-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (80 loc) · 3.56 KB
/
Copy path_Metax_work_private.yaml
File metadata and controls
101 lines (80 loc) · 3.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: paddle metax gpu private test
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
branches: [develop, release/**]
schedule:
- cron: "0 20 * * *"
permissions: read-all
defaults:
run:
shell: bash
jobs:
metax-gpu-test:
runs-on: paddle-metax-runner-set
steps:
- name: Checkout repository
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git clone \
--reference-if-able /home/runner/PaddleCustomDevice \
--depth=1 \
--shallow-submodules \
--jobs=8 \
--branch ${{ github.base_ref || github.ref_name}} \
--recurse-submodules \
https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git .
if [ "${{ github.event_name }}" == "pull_request" ]; then
git fetch origin pull/${{ github.event.pull_request.number }}/head:pull/${{ github.event.pull_request.number }}/head
git checkout pull/${{ github.event.pull_request.number }}/head
paddle_branch=${{ github.base_ref || github.ref_name}}
echo $paddle_branch
# sleep 10000
change_numbers=$(git --no-pager diff --name-only remotes/origin/${paddle_branch} | wc -l)
echo $change_numbers
change_backend=$(git --no-pager diff --name-only remotes/origin/${paddle_branch} | grep -c "backends/" || true)
echo $change_backend
change_metax_only=$(git --no-pager diff --name-only remotes/origin/${paddle_branch} | grep -c "backends/metax_gpu" || true)
echo $change_metax_only
# change_backend=$(git --no-pager diff --name-only remotes/origin/${paddle_branch} | grep "backends/"| wc -l)
# echo $change_backend
# change_metax_only=$(git --no-pager diff --name-only remotes/origin/${paddle_branch} | grep "backends/metax_gpu"| wc -l)
# echo $change_metax_only
git --no-pager diff --name-only remotes/origin/${paddle_branch}
if [ $change_numbers -ne $change_backend ]; then
echo "Common file changed, continue to run metax FULL CI test ..."
elif [ $paddle_branch -eq 0 ] ; then
echo "NO metax backend changes found, skip metax FULL CI ....."
exit 0
fi
# git submodule update --init --recursive
fi
- name: compile
run: |
# sleep 10000
cd backends/metax_gpu
bash build_private_CI.sh
- name: run test
run: |
cd backends/metax_gpu/tests
bash run_test.sh -j 8 -b "default"
- name: push whl
env:
PR_ID: ${{ github.event.pull_request.number }}
COMMIT_ID: ${{ github.event.pull_request.head.sha }}
run: |
pip install bce-python-sdk==0.8.74
export AK=paddle
export SK=paddle
if [ ! -f "BosClient.py}" ]; then
wget -q --no-proxy https://xly-devops.bj.bcebos.com/home/bos_retry.tar.gz --no-check-certificate
tar xf bos_retry.tar.gz
fi
cp backends/metax_gpu/build/dist/paddle_metax_gpu*.whl .
python BosClient.py paddle_metax_gpu*.whl paddle-github-action/PaddleCustomDevice/metax_gpu/${PR_ID}/${COMMIT_ID}
cd backends/metax_gpu/build/dist/
ossutil ls oss://opensource-ci/paddle/
ossutil cat oss://opensource-ci/paddle/
ossutil cp ./paddle_metax_gpu-*.whl oss://opensource-ci/paddle/ -f