Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions scripts/dependence/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,25 @@ paddleformers_build (){
python -c "import paddleformers; print('paddleformers commit:',paddleformers.version.commit)" >> ${log_path}/commit_info.txt
commit=$(python -c "import paddleformers; print(paddleformers.version.commit)")
commit=${commit:-unknown}
cp $formers_dir/dist/p****.whl ${upload_path}/
cp $formers_dir/dist/p****.whl ${upload_path}/paddleformers-0.0.0.dev-py3-none-any.whl


whl_file=$(ls $formers_dir/dist/paddleformers-*.whl)
base_name=$(basename $whl_file)
new_name=$(echo $base_name | sed "s/\.dev[0-9]\+/&+${commit}/")

# 复制原始 whl
cp "$whl_file" "${upload_path}/${base_name}"

# 固定名称备份,支持 dev 和 post
if echo "$base_name" | grep -q "\.post[0-9]*"; then
cp "$whl_file" "${upload_path}/paddleformers-0.0.0.post0-py3-none-any.whl"
new_name=$(echo $base_name | sed "s/\.post[0-9]\+/&+${commit}/")
elif echo "$base_name" | grep -q "\.dev[0-9]*"; then
cp "$whl_file" "${upload_path}/paddleformers-0.0.0.dev0-py3-none-any.whl"
new_name=$(echo $base_name | sed "s/\.dev[0-9]\+/&+${commit}/")
else
cp "$whl_file" "${upload_path}/paddleformers-0.0.0-py3-none-any.whl"
new_name="${base_name%.whl}+${commit}.whl"
fi

echo "commit whl: $new_name"
cp "$whl_file" "${upload_path}/${new_name}"

Expand Down
1 change: 1 addition & 0 deletions scripts/regression/ci_model_unittest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ if [[ ${FLAGS_enable_CI} == "True" ]] || [[ ${FLAGS_enable_CE} != "False" ]];the
export FLAGS_tcp_store_using_libuv=0
PYTHONPATH=$(pwd) \
COVERAGE_SOURCE=paddleformers \
sleep 6h
python -m pytest -s -v --alluredir=result --models=${models} --update-baseline=${update_baseline_models} scripts/regression/test_models.py > ${log_path}/model_unittest.log 2>&1
exit_code=$?
print_info $exit_code model_unittest
Expand Down
Loading