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

Update .gitlab-ci.yml

parent 4ff44857
Pipeline #3297 failed
...@@ -150,16 +150,16 @@ benchmark_wan2.1: ...@@ -150,16 +150,16 @@ benchmark_wan2.1:
# 备用方法:使用Python直接修改 # 备用方法:使用Python直接修改
python3 -c " python3 -c "
import re import re
with open('temp_test2.py', 'r') as f: with open('temp_test2.py', 'r') as f:
content = f.read() content = f.read()
# 使用正则表达式替换seed值 # 使用正则表达式替换seed值
content = re.sub(r'(\"seed\":\s*)\d+', r'\g<1>1234567890', content) content = re.sub(r'(\"seed\":\s*)\d+', r'\g<1>1234567890', content)
with open('temp_test2.py', 'w') as f: with open('temp_test2.py', 'w') as f:
f.write(content) f.write(content)
" "
# 再次验证 # 再次验证
if grep -q '"seed": 1234567890,' temp_test2.py; then if grep -q '"seed": 1234567890,' temp_test2.py; then
...@@ -209,39 +209,25 @@ benchmark_wan2.1: ...@@ -209,39 +209,25 @@ benchmark_wan2.1:
- echo "=========================================" - echo "========================================="
- echo "Step 6 Verifying and collecting results" - echo "Step 6 Verifying and collecting results"
- echo "=========================================" - echo "========================================="
- |
# 验证两个webp文件都已生成 # 验证两个webp文件都已生成
webp_count=$(find output -name "*.webp" -type f | wc -l) - webp_count=$(find output -name "*.webp" -type f | wc -l)
echo "Total webp files found: $webp_count" - 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
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文件 # 查找并复制最新的两个webp文件
find output -name "*.webp" -type f -exec ls -lt {} + | head -n 2 > results/latest_files.txt - find output -name "*.webp" -type f -exec ls -lt {} + | head -n 2 > results/latest_files.txt
# 复制文件到结果目录 # 复制文件到结果目录
while read line; do - cat results/latest_files.txt | awk '{print $NF}' | while read filepath; do cp "$filepath" results/ && echo "Copied: $filepath"; done
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 Results Summary ===" > results/summary.txt
echo "Test 1 (seed=2675441231):" >> results/summary.txt - echo "Test 1 (seed=2675441231):" >> results/summary.txt
grep "Prompt executed in" results/test1_output.log >> 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 "" >> results/summary.txt
echo "Test 2 (seed=1234567890):" >> results/summary.txt - echo "Test 2 (seed=1234567890):" >> results/summary.txt
grep "Prompt executed in" results/test2_output.log >> 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 "" >> results/summary.txt
echo "Generated files:" >> results/summary.txt - echo "Generated files:" >> results/summary.txt
ls results/*.webp >> 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 "All tests completed successfully!"
- echo "=========================================" - echo "========================================="
- echo "Step 7 Cleaning up" - echo "Step 7 Cleaning up"
...@@ -256,8 +242,6 @@ benchmark_wan2.1: ...@@ -256,8 +242,6 @@ benchmark_wan2.1:
artifacts: artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME" name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths: paths:
- "results/*.webp" - "results/"
- "results/*.log" - "logs/"
- "results/*.txt"
- "logs/comfyui.log"
expire_in: 1 week 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