Commit 0a286b32 authored by jerrrrry's avatar jerrrrry
Browse files

Update .gitlab-ci.yml

parent 4ff44857
Pipeline #3297 failed
......@@ -150,28 +150,28 @@ benchmark_wan2.1:
# 备用方法:使用Python直接修改
python3 -c "
import re
with open('temp_test2.py', 'r') as f:
content = f.read()
# 使用正则表达式替换seed值
content = re.sub(r'(\"seed\":\s*)\d+', r'\g<1>1234567890', content)
import re
with open('temp_test2.py', 'r') as f:
content = f.read()
# 使用正则表达式替换seed值
content = re.sub(r'(\"seed\":\s*)\d+', r'\g<1>1234567890', content)
with open('temp_test2.py', 'w') as f:
f.write(content)
"
# 再次验证
if grep -q '"seed": 1234567890,' temp_test2.py; then
echo "✓ Seed 1234567890 successfully set using Python method"
grep -n '"seed": 1234567890,' temp_test2.py
else
echo "✗ All methods failed to set seed 1234567890"
echo "Full file content for debugging:"
cat temp_test2.py
exit 1
fi
fi
with open('temp_test2.py', 'w') as f:
f.write(content)
"
# 再次验证
if grep -q '"seed": 1234567890,' temp_test2.py; then
echo "✓ Seed 1234567890 successfully set using Python method"
grep -n '"seed": 1234567890,' temp_test2.py
else
echo "✗ All methods failed to set seed 1234567890"
echo "Full file content for debugging:"
cat temp_test2.py
exit 1
fi
fi
# 记录开始时间
start_time=$(date +%s)
......@@ -209,39 +209,25 @@ benchmark_wan2.1:
- echo "========================================="
- echo "Step 6 Verifying and collecting results"
- echo "========================================="
- |
# 验证两个webp文件都已生成
webp_count=$(find output -name "*.webp" -type f | wc -l)
echo "Total webp files found: $webp_count"
if [ $webp_count -lt 2 ]; then
echo "ERROR: Expected 2 webp files, but found $webp_count"
find output -name "*.webp" -type f -ls
exit 1
fi
# 查找并复制最新的两个webp文件
find output -name "*.webp" -type f -exec ls -lt {} + | head -n 2 > results/latest_files.txt
# 复制文件到结果目录
while read line; do
filepath=$(echo "$line" | awk '{print $NF}')
cp "$filepath" results/
echo "Copied: $filepath"
done < results/latest_files.txt
# 创建结果摘要
echo "=== Test Results Summary ===" > results/summary.txt
echo "Test 1 (seed=2675441231):" >> results/summary.txt
grep "Prompt executed in" results/test1_output.log >> results/summary.txt
echo "" >> results/summary.txt
echo "Test 2 (seed=1234567890):" >> results/summary.txt
grep "Prompt executed in" results/test2_output.log >> results/summary.txt
echo "" >> results/summary.txt
echo "Generated files:" >> results/summary.txt
ls results/*.webp >> results/summary.txt
echo "All tests completed successfully!"
# 验证两个webp文件都已生成
- webp_count=$(find output -name "*.webp" -type f | wc -l)
- echo "Total webp files found: $webp_count"
- if [ $webp_count -lt 2 ]; then echo "ERROR: Expected 2 webp files, but found $webp_count"; find output -name "*.webp" -type f -ls; exit 1; fi
# 查找并复制最新的两个webp文件
- find output -name "*.webp" -type f -exec ls -lt {} + | head -n 2 > results/latest_files.txt
# 复制文件到结果目录
- cat results/latest_files.txt | awk '{print $NF}' | while read filepath; do cp "$filepath" results/ && echo "Copied: $filepath"; done
# 创建结果摘要
- echo "=== Test Results Summary ===" > results/summary.txt
- echo "Test 1 (seed=2675441231):" >> results/summary.txt
- grep "Prompt executed in" results/test1_output.log >> results/summary.txt || echo "No execution time found in test1" >> results/summary.txt
- echo "" >> results/summary.txt
- echo "Test 2 (seed=1234567890):" >> results/summary.txt
- grep "Prompt executed in" results/test2_output.log >> results/summary.txt || echo "No execution time found in test2" >> results/summary.txt
- echo "" >> results/summary.txt
- echo "Generated files:" >> results/summary.txt
- ls results/*.webp >> results/summary.txt || echo "No webp files found in results" >> results/summary.txt
- echo "All tests completed successfully!"
- echo "========================================="
- echo "Step 7 Cleaning up"
......@@ -256,8 +242,6 @@ benchmark_wan2.1:
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths:
- "results/*.webp"
- "results/*.log"
- "results/*.txt"
- "logs/comfyui.log"
- "results/"
- "logs/"
expire_in: 1 week
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment