@@ -3,51 +3,54 @@ run-name: Runs on ${{ github.event_name }}
3
3
4
4
on :
5
5
workflow_dispatch :
6
+ inputs :
7
+ agile_branch :
8
+ description : ' Branch for compilation'
9
+ required : false
10
+ default : ' develop'
11
+ agile_revision :
12
+ description : ' Git commit or revision hash'
13
+ required : false
14
+ default : ' ef256258ca705ee3b4d709d7dec0332f33988c22'
15
+
6
16
workflow_call :
17
+ inputs :
18
+ agile_branch :
19
+ required : false
20
+ type : string
21
+ default : ' develop'
22
+ agile_revision :
23
+ required : false
24
+ type : string
25
+ default : ' ef256258ca705ee3b4d709d7dec0332f33988c22'
26
+
7
27
repository_dispatch :
8
- types : [cmake-build ]
28
+ types : [cebuild-mac-arm ]
9
29
10
30
jobs :
11
31
prepare-source :
12
- runs-on : [self-hosted, GPU-8Card ]
32
+ runs-on : [self-hosted]
13
33
env :
14
- AGILE_COMPILE_BRANCH : develop
15
- AGILE_REVISION : ef256258ca705ee3b4d709d7dec0332f33988c22
16
- outputs :
17
- source-dir : ${{ steps.set-output.outputs.source-dir }}
34
+ AGILE_COMPILE_BRANCH : ${{ github.event.client_payload.agile_branch || github.event.inputs.agile_branch || inputs.agile_branch || 'develop' }}
35
+ AGILE_REVISION : ${{ github.event.client_payload.agile_revision || github.event.inputs.agile_revision || inputs.agile_revision || 'ef256258ca705ee3b4d709d7dec0332f33988c22' }}
18
36
19
37
steps :
20
38
- name : Prepare Paddle Source Code
21
39
id : set-output
22
40
run : |
23
41
set -xe
24
42
workspace=$(pwd)
25
- echo "当前工作目录: $workspace"
26
-
27
- # echo "开始清空当前目录下所有文件..."
28
- # rm -rf "$workspace"/*
29
- # echo "当前目录已清空,开始重新下载 Paddle.tar..."
30
- # url="https://paddle-qa.bj.bcebos.com/CodeSync/${AGILE_COMPILE_BRANCH}/${AGILE_REVISION}/Paddle.tar"
31
- # wget -q --no-proxy ${url} --no-check-certificate || wget_failed=101
32
- # if [[ "${wget_failed}" == "101" ]]; then
33
- # echo "wget failed, start cloning..."
34
- # git clone https://github.com/PaddlePaddle/Paddle.git --depth=100 -b ${AGILE_COMPILE_BRANCH} Paddle
35
- # else
36
- # tar xf Paddle.tar
37
- # fi
38
-
39
- if [ -f "Paddle.tar" ]; then
40
- echo "Paddle 源码包已存在,跳过下载/clone。"
41
- tar xf Paddle.tar
43
+
44
+ echo "开始清空当前目录下所有文件..."
45
+ rm -rf "$workspace"/*
46
+ echo "当前目录已清空,开始重新下载 Paddle.tar..."
47
+ url="https://paddle-qa.bj.bcebos.com/CodeSync/${AGILE_COMPILE_BRANCH}/${AGILE_REVISION}/Paddle.tar"
48
+ wget -q --no-proxy ${url} --no-check-certificate || wget_failed=101
49
+ if [[ "${wget_failed}" == "101" ]]; then
50
+ echo "wget failed, start cloning..."
51
+ git clone https://github.com/PaddlePaddle/Paddle.git --depth=100 -b ${AGILE_COMPILE_BRANCH} Paddle
42
52
else
43
- url="https://paddle-qa.bj.bcebos.com/CodeSync/${AGILE_COMPILE_BRANCH}/${AGILE_REVISION}/Paddle.tar"
44
- wget -q --no-proxy ${url} --no-check-certificate || wget_failed=101
45
- if [[ "${wget_failed}" == "101" ]]; then
46
- echo "wget failed, start cloning..."
47
- git clone https://github.com/PaddlePaddle/Paddle.git --depth=100 -b ${AGILE_COMPILE_BRANCH} Paddle
48
- else
49
- tar xf Paddle.tar
50
- fi
53
+ tar xf Paddle.tar
51
54
fi
52
55
53
56
cd Paddle
56
59
git log -10
57
60
mkdir -p BUILD_RESULT
58
61
59
- echo "source-dir=$workspace/Paddle" >> $GITHUB_OUTPUT
60
- echo "源码准备完毕:$workspace/Paddle"
61
-
62
62
build-wheels :
63
- runs-on : [self-hosted, GPU-8Card ]
63
+ runs-on : [self-hosted]
64
64
needs : prepare-source
65
65
strategy :
66
66
fail-fast : false
@@ -115,30 +115,29 @@ jobs:
115
115
cp ./build/python/dist/*.whl ./BUILD_RESULT || true
116
116
rm -rf ./build
117
117
118
- - name : Upload Wheel for Python ${{ matrix.python-version }}
119
- uses : actions/upload-artifact@v4
120
- with :
121
- name : paddle-whl-py${{ matrix.python-version }}
122
- path : Paddle/BUILD_RESULT
123
- if-no-files-found : ignore
124
-
125
- collect-artifacts :
126
- runs-on : self-hosted
118
+ upload_bos :
119
+ environment : CodeSync
120
+ runs-on : [self-hosted]
127
121
needs : build-wheels
122
+ env :
123
+ AK : ${{ secrets.BOS_CREDENTIAL_AK }}
124
+ SK : ${{ secrets.BOS_CREDENTIAL_SK }}
128
125
steps :
129
- - name : Download All Wheels
130
- uses : actions/download-artifact@v4
131
- with :
132
- path : all-wheels
133
-
134
- - name : Archive All Wheels
126
+ - name : Setup Python 3.10 and Upload to BOS
135
127
run : |
136
- mkdir -p merged
137
- find all-wheels -name '*.whl' -exec cp {} merged/ \;
138
- ls -lh merged/
139
-
140
- - name : Upload Merged Wheels
141
- uses : actions/upload-artifact@v4
142
- with :
143
- name : paddle-whl-all
144
- path : merged/
128
+ set -xe
129
+ PYTHON_BIN=python3.10
130
+
131
+ $PYTHON_BIN -m venv myenv --clear
132
+ source myenv/bin/activate
133
+ python -m pip install bce-python-sdk==0.9.29
134
+
135
+ wget -q --no-proxy --no-check-certificate https://paddle-qa.bj.bcebos.com/CodeSync/develop/PaddlePaddle/PaddleTest/tools/bos_tools.py
136
+ push_file=$PWD/bos_tools.py
137
+
138
+ cd ${workspace}/Paddle/BUILD_RESULT
139
+
140
+ for whl_file in $(ls *.whl); do
141
+ python $push_file $whl_file ${whl_package}
142
+ done
143
+
0 commit comments