Skip to content

Commit 32944c8

Browse files
fix
2 parents 1dc0e4a + e43fc9d commit 32944c8

File tree

18 files changed

+1234
-232
lines changed

18 files changed

+1234
-232
lines changed

.github/workflows/metax_work.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878

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

0 commit comments

Comments
 (0)