@@ -24,32 +24,32 @@ jobs:
24
24
workspace=$(pwd)
25
25
echo "当前工作目录: $workspace"
26
26
27
- echo "开始清空当前目录下所有文件..."
28
- rm -rf "$workspace"/*
29
-
30
- echo "当前目录已清空,开始重新下载 Paddle.tar..."
31
- url="https://paddle-qa.bj.bcebos.com/CodeSync/${AGILE_COMPILE_BRANCH}/${AGILE_REVISION}/Paddle.tar"
32
- wget -q --no-proxy ${url} --no-check-certificate || wget_failed=101
33
- if [[ "${wget_failed}" == "101" ]]; then
34
- echo "wget failed, start cloning..."
35
- git clone https://github.com/PaddlePaddle/Paddle.git --depth=100 -b ${AGILE_COMPILE_BRANCH} Paddle
36
- else
37
- tar xf Paddle.tar
38
- fi
39
-
40
- # if [ -d "$workspace/Paddle.tar" ]; then
41
- # echo "Paddle 源码包已存在,跳过下载/clone。"
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
42
35
# 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
36
+ # tar xf Paddle.tar
51
37
# fi
52
38
39
+ if [ -f "Paddle.tar" ]; then
40
+ echo "Paddle 源码包已存在,跳过下载/clone。"
41
+ tar xf Paddle.tar
42
+ 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
51
+ fi
52
+
53
53
cd Paddle
54
54
git reset --hard ${AGILE_REVISION}
55
55
git submodule update --init --recursive
64
64
needs : prepare-source
65
65
strategy :
66
66
fail-fast : false
67
- max-parallel : 2
67
+ max-parallel : 1
68
68
matrix :
69
69
python-version : ['3.9', '3.10', '3.11', '3.12', '3.13']
70
70
env :
98
98
echo "PADDLE_VERSION_SUFFIX=.dev${DATE_ONLY}" >> $GITHUB_ENV
99
99
fi
100
100
101
- - name : Setup Python ${{ matrix.python-version }} Environment
101
+ - name : Build Paddle for Python ${{ matrix.python-version }}
102
102
run : |
103
+ cd Paddle
103
104
python${{ matrix.python-version }} -m venv myenv --clear
104
105
source myenv/bin/activate
105
106
@@ -110,14 +111,10 @@ jobs:
110
111
python -m pip install -r python/requirements.txt
111
112
python -m pip install -r paddle/scripts/compile_requirements.txt
112
113
113
- - name : Build Paddle for Python ${{ matrix.python-version }}
114
- run : |
115
- set -xe
116
- source myenv/bin/activate
117
114
bash -x paddle/scripts/paddle_build.sh mac_m1_arm || exit 1
118
115
cp ./build/python/dist/*.whl ./BUILD_RESULT || true
119
116
rm -rf ./build
120
-
117
+
121
118
- name : Upload Wheel for Python ${{ matrix.python-version }}
122
119
uses : actions/upload-artifact@v4
123
120
with :
0 commit comments