Skip to content

Commit bb95bb5

Browse files
authored
Merge branch 'PaddlePaddle:develop' into develop
2 parents 0c69ebf + 3a7a20d commit bb95bb5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1335
-205
lines changed

.github/workflows/_build_linux.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,22 @@ on:
2222
description: "Enable nightly build mode (e.g. add date suffix to version)"
2323
required: false
2424
type: string
25-
default: "ON"
25+
default: "OFF"
2626
FD_VERSION:
2727
description: "FastDeploy Package Version"
2828
required: false
2929
type: string
3030
default: ""
31+
PADDLEVERSION:
32+
description: "Paddle Version Build Use"
33+
required: false
34+
type: string
35+
default: ""
36+
PADDLE_WHL_URL:
37+
description: "Paddle Wheel Package URL"
38+
required: false
39+
type: string
40+
default: ""
3141
UPLOAD:
3242
description: "Upload Package"
3343
required: false
@@ -85,6 +95,10 @@ jobs:
8595
compile_arch: ${{ inputs.COMPILE_ARCH }}
8696
fd_version: ${{ inputs.FD_VERSION }}
8797
CACHE_DIR: ${{ inputs.CACHE_DIR }}
98+
BRANCH_REF: ${{ github.ref_name }}
99+
PADDLEVERSION: ${{ inputs.PADDLEVERSION }}
100+
PADDLE_WHL_URL: ${{ inputs.PADDLE_WHL_URL }}
101+
WITH_NIGHTLY_BUILD: ${{ inputs.WITH_NIGHTLY_BUILD }}
88102
run: |
89103
set -x
90104
runner_name="${{ runner.name }}"
@@ -109,6 +123,9 @@ jobs:
109123
-e "COMPILE_ARCH=${compile_arch}" \
110124
-e "FD_VERSION=${fd_version}" \
111125
-e "WITH_NIGHTLY_BUILD=${WITH_NIGHTLY_BUILD}" \
126+
-e "PADDLEVERSION=${PADDLEVERSION}" \
127+
-e "PADDLE_WHL_URL=${PADDLE_WHL_URL}" \
128+
-e "BRANCH_REF=${BRANCH_REF}" \
112129
--gpus "\"device=${gpu_id}\"" ${docker_image} /bin/bash -c '
113130
if [[ -n "${FD_VERSION}" ]]; then
114131
export FASTDEPLOY_VERSION=${FD_VERSION}
@@ -124,7 +141,15 @@ jobs:
124141
echo "Date Only: $DATE_ONLY"
125142
export FASTDEPLOY_VERSION="${FASTDEPLOY_VERSION}.dev${DATE_ONLY}"
126143
fi
127-
python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
144+
# 针对不同分支和tag使用不同的PaddlePaddle安装包
145+
if [[ "${PADDLE_WHL_URL}" != "" ]];then
146+
python -m pip install ${PADDLE_WHL_URL}
147+
elif [[ "${PADDLEVERSION}" != "" ]];then
148+
python -m pip install paddlepaddle-gpu==${PADDLEVERSION} -i https://www.paddlepaddle.org.cn/packages/stable/cu126/
149+
else
150+
python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
151+
fi
152+
128153
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
129154
130155
python -m pip install --upgrade pip

.github/workflows/_pre_ce_test.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ on:
2727
type: string
2828
default: ""
2929

30-
concurrency:
31-
group: ${{ github.event.pull_request.number }}
32-
cancel-in-progress: true
33-
3430
jobs:
3531
run_ce_cases:
3632
runs-on: [self-hosted, PRE_CE_RUN_2Card]

.github/workflows/_unit_test_coverage.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,13 @@ jobs:
7373
CACHE_DIR: ${{ inputs.CACHE_DIR }}
7474
BASE_REF: ${{ github.event.pull_request.base.ref }}
7575
MODEL_CACHE_DIR: ${{ inputs.MODEL_CACHE_DIR }}
76+
IS_PR: ${{ github.event_name == 'pull_request' }}
7677
run: |
77-
set -x
78+
if [[ "$IS_PR" == "true" ]]; then
79+
echo "Running on PR"
80+
else
81+
echo "Not a PR"
82+
fi
7883
runner_name="${{ runner.name }}"
7984
CARD_ID=$(echo "${runner_name}" | awk -F'-' '{print $NF}')
8085
DEVICES=$(echo "$CARD_ID" | fold -w1 | paste -sd,)
@@ -133,6 +138,7 @@ jobs:
133138
-e TZ="Asia/Shanghai" \
134139
-e "fd_wheel_url=${fd_wheel_url}" \
135140
-e "BASE_REF=${BASE_REF}" \
141+
-e "IS_PR=${IS_PR}" \
136142
--gpus "\"device=${DEVICES}\"" ${docker_image} /bin/bash -c '
137143
138144
git config --global --add safe.directory /workspace/FastDeploy
@@ -160,9 +166,13 @@ jobs:
160166
coverage combine coveragedata/
161167
coverage xml -o python_coverage_all.xml
162168
COVERAGE_EXIT_CODE=0
163-
diff-cover python_coverage_all.xml --diff-file=diff.txt --fail-under=80 --json-report diff_coverage.json || COVERAGE_EXIT_CODE=9
169+
if [[ "$IS_PR" == "true" ]]; then
170+
diff-cover python_coverage_all.xml --diff-file=diff.txt --fail-under=80 --json-report diff_coverage.json || COVERAGE_EXIT_CODE=9
171+
python scripts/generate_diff_coverage_xml.py diff.txt python_coverage_all.xml
172+
else
173+
echo "Not a PR, skipping diff-cover"
174+
fi
164175
echo "COVERAGE_EXIT_CODE=${COVERAGE_EXIT_CODE}" >> exit_code.env
165-
python scripts/generate_diff_coverage_xml.py diff.txt python_coverage_all.xml
166176
'
167177
if [ -f FastDeploy/exit_code.env ]; then
168178
cat FastDeploy/exit_code.env >> $GITHUB_ENV
@@ -224,6 +234,7 @@ jobs:
224234
echo "All tests passed"
225235
226236
- name: Verify Code Coverage Threshold (80%)
237+
if: ${{ github.event_name == 'pull_request' }}
227238
shell: bash
228239
run: |
229240
cd FastDeploy

0 commit comments

Comments
 (0)