@@ -297,6 +297,7 @@ jobs:
297297 bos_file : ${{ github.workspace }}/../../../bos/BosClient.py
298298 java_file : ${{ github.workspace }}/../../../jdk1.8.0_351
299299 allure_file : ${{ github.workspace }}/../../../allure-2.19.0/bin/allure
300+ FLAGS_enable_CE : ${{ steps.determine.outputs.FLAGS_enable_CE }}
300301 run : |
301302 docker exec -t $container_name /bin/bash -c '
302303 source ${work_dir}/../../../proxy_huggingface
@@ -306,10 +307,18 @@ jobs:
306307 mkdir ${{ env.home_path }}/bos
307308 tar xf ${{ env.home_path }}/bos_new.tar.gz -C ${{ env.home_path }}/bos
308309 fi
310+ if [ ! -f "${{ env.java_file }}" ]; then
311+ wget -q --no-proxy -O ${{ env.home_path }}/java_linux.tar.gz https://paddle-qa.bj.bcebos.com/java/java_linux.tar.gz --no-check-certificate
312+ tar xf ${{ env.home_path }}/java_linux.tar.gz
313+ fi
314+ if [ ! -f "${{ env.allure_file }}" ]; then
315+ wget -q --no-proxy -O ${{ env.home_path }}/allure-2.19.0.zip https://xly-devops.bj.bcebos.com/tools/allure-2.19.0.zip --no-check-certificate
316+ unzip -q ${{ env.home_path }}/allure-2.19.0.zip
317+ fi
309318 if [ -n "$PR_ID" ] && [ "$PR_ID" != "0" ]; then
310319 bos_prefix="${PR_ID}/${COMMIT_ID}"
311320 else
312- bos_prefix="schedule /$(date +%Y%m%d)"
321+ bos_prefix="schedule_${FLAGS_enable_CE} /$(date +%Y%m%d)"
313322 fi
314323 # logs
315324 cd /workspace/PaddleFormers/model_unittest_logs
@@ -345,16 +354,43 @@ jobs:
345354 with :
346355 repository : PaddlePaddle/PaddleFormers
347356 ref : develop
357+ - name : Checkout gh-pages
358+ uses : actions/checkout@v5
359+ with :
360+ ref : gh-pages
361+ path : gh-pages
362+ continue-on-error : true
363+ - name : Determine FLAGS_enable_CE
364+ id : determine
365+ run : |
366+ schedule_time="${{ github.event.schedule || '' }}"
367+ if [[ "$schedule_time" == "0 9 "* ]]; then
368+ echo "FLAGS_enable_CE=CE_Develop_cu130_py313" >> $GITHUB_OUTPUT
369+ elif [[ "$schedule_time" == "0 10 "* ]]; then
370+ echo "FLAGS_enable_CE=CE_Develop_cu130_py312" >> $GITHUB_OUTPUT
371+ else
372+ echo "FLAGS_enable_CE=${{ github.event.inputs.FLAGS_enable_CE || 'CE_Develop_cu130_py313' }}" >> $GITHUB_OUTPUT
373+ fi
374+ - name : Restore history
375+ env :
376+ FLAGS_enable_CE : ${{ steps.determine.outputs.FLAGS_enable_CE }}
377+ run : |
378+ if [ -d "gh-pages/model_${FLAGS_enable_CE}/history" ]; then
379+ mkdir -p result
380+ cp -r gh-pages/model_${FLAGS_enable_CE}/history result/history
381+ fi
348382 - name : Download report
349383 id : download_report
384+ env :
385+ FLAGS_enable_CE : ${{ steps.determine.outputs.FLAGS_enable_CE }}
350386 run : |
351387 if [ -n "$PR_ID" ] && [ "$PR_ID" != "0" ]; then
352388 bos_prefix="${PR_ID}/${COMMIT_ID}"
353389 else
354- bos_prefix="schedule /$(date +%Y%m%d)"
390+ bos_prefix="schedule_${FLAGS_enable_CE} /$(date +%Y%m%d)"
355391 fi
356- echo "bos_prefix=${bos_prefix}"
357392 echo "bos_prefix=${bos_prefix}" >> "$GITHUB_OUTPUT"
393+
358394 wget -q --no-proxy \
359395 https://paddle-github-action.bj.bcebos.com/PR/PaddleFormers/model-unittest-gpu/${bos_prefix}/logs/report.tar.gz \
360396 --no-check-certificate
@@ -376,4 +412,18 @@ jobs:
376412 with :
377413 github_token : ${{ secrets.GITHUB_TOKEN }}
378414 publish_dir : ./report
379-
415+ destination_dir : model_${FLAGS_enable_CE}
416+ - name : Display GitHub Pages URL
417+ if : always()
418+ run : |
419+ # GitHub Pages URL
420+ PAGES_URL="https://paddlepaddle.github.io/PaddleFormers/model_${FLAGS_enable_CE}/"
421+ echo "GitHub Allure Pages URL: ${PAGES_URL}"
422+
423+ echo "## 🚀 Allure Report" >> $GITHUB_STEP_SUMMARY
424+ echo "" >> $GITHUB_STEP_SUMMARY
425+ echo "| Item | Value |" >> $GITHUB_STEP_SUMMARY
426+ echo "|---|---|" >> $GITHUB_STEP_SUMMARY
427+ echo "| Workflow | ${{ github.workflow }} |" >> $GITHUB_STEP_SUMMARY
428+ echo "| CE Mode | $FLAGS_enable_CE |" >> $GITHUB_STEP_SUMMARY
429+ echo "| Report | [Open Report](${PAGES_URL}) |" >> $GITHUB_STEP_SUMMARY
0 commit comments