Commit a8de9d8f authored by jerrrrry's avatar jerrrrry
Browse files

Update .gitlab-ci.yml

parent 26e80b10
......@@ -91,8 +91,40 @@ benchmark_wan2.1:
duration=$((end_time - start_time))
echo "Test 1 execution time $duration seconds" >> results/performance.log
# 等待一段时间确保第一次测试完成
- sleep 10
- echo "========================================="
- echo "Step 6 Waiting for first test to complete"
- echo "========================================="
# 等待第一次测试完成,检查output目录中是否有新的webp文件
- |
echo "Waiting for webp file to be generated..."
timeout=600 # 最多等待10分钟
count=0
webp_found=false
while [ $count -lt $timeout ]; do
# 检查output目录中是否有webp文件
if find output -name "*.webp" -type f | head -1 | grep -q .; then
echo "Found webp file! First test completed."
webp_found=true
break
fi
# 检查是否有错误信息
if grep -q "error\|Error\|ERROR\|failed\|Failed\|FAILED" results/test1_output.log; then
echo "Error detected in test 1 output!"
break
fi
echo "Waiting... ($count/$timeout seconds)"
sleep 5
count=$((count+5))
done
if [ "$webp_found" = false ]; then
echo "Warning: No webp file found after waiting $timeout seconds"
echo "Output directory contents:"
ls -la output/ || echo "Output directory not found"
fi
# 运行第二次测试(seed=1234567890)
- echo "Running second test with seed=1234567890"
......@@ -112,7 +144,37 @@ benchmark_wan2.1:
echo "Test 2 execution time $duration seconds" >> results/performance.log
- echo "========================================="
- echo "Step 6 Collecting results"
- echo "Step 7 Waiting for second test to complete"
- echo "========================================="
# 等待第二次测试完成
- |
echo "Waiting for second webp file to be generated..."
timeout=600 # 最多等待10分钟
count=0
webp_count_before=$(find output -name "*.webp" -type f | wc -l)
while [ $count -lt $timeout ]; do
webp_count_current=$(find output -name "*.webp" -type f | wc -l)
# 如果webp文件数量增加,说明第二个测试完成了
if [ $webp_count_current -gt $webp_count_before ]; then
echo "Second webp file found! Second test completed."
break
fi
# 检查是否有错误信息
if grep -q "error\|Error\|ERROR\|failed\|Failed\|FAILED" results/test2_output.log; then
echo "Error detected in test 2 output!"
break
fi
echo "Waiting... ($count/$timeout seconds)"
sleep 5
count=$((count+5))
done
- echo "========================================="
- echo "Step 8 Collecting results"
- echo "========================================="
# 查找并复制输出文件
- |
......@@ -132,14 +194,20 @@ benchmark_wan2.1:
echo "" >> results/summary.txt
echo "Test 2 (seed=1234567890):" >> results/summary.txt
grep "Prompt executed in" results/test2_output.log >> results/summary.txt
# 显示最终生成的文件数量
total_webp=$(find output -name "*.webp" -type f | wc -l)
echo "" >> results/summary.txt
echo "Total webp files generated: $total_webp" >> results/summary.txt
- echo "========================================="
- echo "Step 7 Cleaning up"
- echo "Step 9 Cleaning up"
- echo "========================================="
# 停止ComfyUI服务器
- kill $COMFYUI_PID || true
# 清理临时文件
- rm -f temp_test1.py temp_test2.py
- echo "Cleanup completed"
# 定义产物,保留测试生成的文件
artifacts:
......
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