You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

209 lines
7.4 KiB

# Phytium Iot gitlab-ci.yml file
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
stages:
- pre_stage # 准备阶段
- compile_stage # 编译阶段
- test_stage # 测试阶段
- misrac_check_stage # misrac静态检测阶段
- report_stage # 测试报表生成阶段
- post_stage # 收尾阶段
# 所有soc覆盖编译启动
all_soc_compile:
stage: compile_stage
script:
- echo "All soc config compile is about to start..."
tags:
- compile
when: manual
# 各模块编译
ai_compile:
stage: compile_stage
script:
- cd /home3/gitlab_runner_workspace/auto_compile_tool
- python3 set_common_info.py /home3/gitlab_runner_workspace/auto_compile_tool/phytium-test-tools/test_tool/config_info/common.json standalone
- cd /home3/gitlab_runner_workspace/auto_compile_tool/phytium-test-tools/test_tool
- python3 gitlab_pipeline_compile.py $CI_PROJECT_DIR $CI_PROJECT_DIR/example/ai
tags:
- compile
needs: ["all_soc_compile"]
media_compile:
stage: compile_stage
script:
- cd /home3/gitlab_runner_workspace/auto_compile_tool
- python3 set_common_info.py /home3/gitlab_runner_workspace/auto_compile_tool/phytium-test-tools/test_tool/config_info/common.json standalone
- cd /home3/gitlab_runner_workspace/auto_compile_tool/phytium-test-tools/test_tool
- python3 gitlab_pipeline_compile.py $CI_PROJECT_DIR $CI_PROJECT_DIR/example/media
tags:
- compile
needs: ["all_soc_compile"]
network_compile:
stage: compile_stage
script:
- cd /home3/gitlab_runner_workspace/auto_compile_tool
- python3 set_common_info.py /home3/gitlab_runner_workspace/auto_compile_tool/phytium-test-tools/test_tool/config_info/common.json standalone
- cd /home3/gitlab_runner_workspace/auto_compile_tool/phytium-test-tools/test_tool
- python3 gitlab_pipeline_compile.py $CI_PROJECT_DIR $CI_PROJECT_DIR/example/network
tags:
- compile
needs: ["all_soc_compile"]
peripherals_compile:
stage: compile_stage
script:
- cd /home3/gitlab_runner_workspace/auto_compile_tool
- python3 set_common_info.py /home3/gitlab_runner_workspace/auto_compile_tool/phytium-test-tools/test_tool/config_info/common.json standalone
- cd /home3/gitlab_runner_workspace/auto_compile_tool/phytium-test-tools/test_tool
- python3 gitlab_pipeline_compile.py $CI_PROJECT_DIR $CI_PROJECT_DIR/example/peripherals
tags:
- compile
needs: ["all_soc_compile"]
python_compile:
stage: compile_stage
script:
- cd /home3/gitlab_runner_workspace/auto_compile_tool
- python3 set_common_info.py /home3/gitlab_runner_workspace/auto_compile_tool/phytium-test-tools/test_tool/config_info/common.json standalone
- cd /home3/gitlab_runner_workspace/auto_compile_tool/phytium-test-tools/test_tool
- python3 gitlab_pipeline_compile.py $CI_PROJECT_DIR $CI_PROJECT_DIR/example/python
tags:
- compile
needs: ["all_soc_compile"]
storage_compile:
stage: compile_stage
script:
- cd /home3/gitlab_runner_workspace/auto_compile_tool
- python3 set_common_info.py /home3/gitlab_runner_workspace/auto_compile_tool/phytium-test-tools/test_tool/config_info/common.json standalone
- cd /home3/gitlab_runner_workspace/auto_compile_tool/phytium-test-tools/test_tool
- python3 gitlab_pipeline_compile.py $CI_PROJECT_DIR $CI_PROJECT_DIR/example/storage
tags:
- compile
needs: ["all_soc_compile"]
system_compile:
stage: compile_stage
script:
- cd /home3/gitlab_runner_workspace/auto_compile_tool
- python3 set_common_info.py /home3/gitlab_runner_workspace/auto_compile_tool/phytium-test-tools/test_tool/config_info/common.json standalone
- cd /home3/gitlab_runner_workspace/auto_compile_tool/phytium-test-tools/test_tool
- python3 gitlab_pipeline_compile.py $CI_PROJECT_DIR $CI_PROJECT_DIR/example/system
tags:
- compile
needs: ["all_soc_compile"]
# 各模块板级测试
ai_test:
stage: test_stage
script:
- cd /home/gitlab-runner/test_tool
- python3 set_common_info.py /home/gitlab-runner/test_tool/phytium-test-tools/test_tool/config_info/common.json standalone
- cd /home/gitlab-runner/test_tool/phytium-test-tools/test_tool
- python3 gitlab_pipeline_board_test.py $CI_PROJECT_DIR $CI_PROJECT_DIR/example/ai
tags:
- test
allow_failure: true
when: manual
media_test:
stage: test_stage
script:
- cd /home/gitlab-runner/test_tool
- python3 set_common_info.py /home/gitlab-runner/test_tool/phytium-test-tools/test_tool/config_info/common.json standalone
- cd /home/gitlab-runner/test_tool/phytium-test-tools/test_tool
- python3 gitlab_pipeline_board_test.py $CI_PROJECT_DIR $CI_PROJECT_DIR/example/media
tags:
- test
allow_failure: true
when: manual
network_test:
stage: test_stage
script:
- cd /home/gitlab-runner/test_tool
- python3 set_common_info.py /home/gitlab-runner/test_tool/phytium-test-tools/test_tool/config_info/common.json standalone
- cd /home/gitlab-runner/test_tool/phytium-test-tools/test_tool
- python3 gitlab_pipeline_board_test.py $CI_PROJECT_DIR $CI_PROJECT_DIR/example/network
tags:
- test
allow_failure: true
when: manual
peripherals_test:
stage: test_stage
script:
- cd /home/gitlab-runner/test_tool
- python3 set_common_info.py /home/gitlab-runner/test_tool/phytium-test-tools/test_tool/config_info/common.json standalone
- cd /home/gitlab-runner/test_tool/phytium-test-tools/test_tool
- python3 gitlab_pipeline_board_test.py $CI_PROJECT_DIR $CI_PROJECT_DIR/example/peripherals
tags:
- test
allow_failure: true
when: manual
python_test:
stage: test_stage
script:
- cd /home/gitlab-runner/test_tool
- python3 set_common_info.py /home/gitlab-runner/test_tool/phytium-test-tools/test_tool/config_info/common.json standalone
- cd /home/gitlab-runner/test_tool/phytium-test-tools/test_tool
- python3 gitlab_pipeline_board_test.py $CI_PROJECT_DIR $CI_PROJECT_DIR/example/python
tags:
- test
allow_failure: true
when: manual
storage_test:
stage: test_stage
script:
- cd /home/gitlab-runner/test_tool
- python3 set_common_info.py /home/gitlab-runner/test_tool/phytium-test-tools/test_tool/config_info/common.json standalone
- cd /home/gitlab-runner/test_tool/phytium-test-tools/test_tool
- python3 gitlab_pipeline_board_test.py $CI_PROJECT_DIR $CI_PROJECT_DIR/example/storage
tags:
- test
allow_failure: true
when: manual
system_test:
stage: test_stage
script:
- cd /home/gitlab-runner/test_tool
- python3 set_common_info.py /home/gitlab-runner/test_tool/phytium-test-tools/test_tool/config_info/common.json standalone
- cd /home/gitlab-runner/test_tool/phytium-test-tools/test_tool
- python3 gitlab_pipeline_board_test.py $CI_PROJECT_DIR $CI_PROJECT_DIR/example/system
tags:
- test
allow_failure: true
when: manual
misrac_check:
stage: misrac_check_stage
script:
- cd $CI_PROJECT_DIR/tools/others/misrac_cppcheck
- python3 misrac_cppcheck.py --misra-rules 10.3 --files-path arch/ common/
tags:
- compile
allow_failure: true
when: manual
# 测试报表生成
update_report:
stage: report_stage
script:
- echo "CI_PROJECT_DIR = $CI_PROJECT_DIR"
- cd /home/gitlab-runner/test_tool/phytium-test-tools/test_tool
- python3 gitlab_pipeline_report_display.py standalone $CI_PROJECT_DIR
tags:
- test
when: manual
artifacts:
paths:
- report_for_gitlab_pipeline/