Commit 9bfe0ef6 authored by jerrrrry's avatar jerrrrry
Browse files

Update .gitlab-ci.yml

parent 746d7ec0
Pipeline #3302 passed with stage
in 8 minutes and 28 seconds
......@@ -207,7 +207,7 @@ benchmark_wan2.1:
echo "Test 2 completed in $duration seconds"
- echo "========================================="
- echo "Step 6 Verifying and collecting results"
- echo "Step 6 Verifying and collecting results (robust version)"
- echo "========================================="
- |
# 验证两个webp文件都已生成
......@@ -223,23 +223,36 @@ benchmark_wan2.1:
# 查找并复制最新的两个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}')
if [ -f "$filepath" ]; then
cp "$filepath" results/
echo "Copied: $filepath"
else
echo "Warning: File not found, skipping: $filepath"
fi
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
test1_time=$(grep "Prompt executed in" results/test1_output.log || echo "Execution time not found in log")
echo "$test1_time" >> 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
test2_time=$(grep "Prompt executed in" results/test2_output.log || echo "Execution time not found in log")
echo "$test2_time" >> results/summary.txt
echo "" >> results/summary.txt
echo "Performance data from script timing:" >> results/summary.txt
cat results/performance.log >> results/summary.txt
echo "" >> results/summary.txt
echo "Generated files:" >> results/summary.txt
ls results/*.webp >> results/summary.txt
ls results/*.webp >> results/summary.txt 2>/dev/null || echo "No .webp files found in results directory" >> results/summary.txt
echo "All tests completed successfully!"
......
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