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
3 months ago
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
stages:
- pre_stage # 准备阶段
- compile_stage # 编译阶段
- test_stage # 测试阶段
- misrac_check_stage # misrac静态检测阶段
- report_stage # 测试报表生成阶段
- post_stage # 收尾阶段
3 months ago
# 所有soc覆盖编译启动
all_soc_compile:
stage: compile_stage
3 months ago
script:
- echo "All soc config compile is about to start..."
3 months ago
tags:
- compile
when: manual
# 各模块编译
ai_compile:
3 months ago
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
3 months ago
tags:
- compile
needs: ["all_soc_compile"]
3 months ago
media_compile:
3 months ago
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
3 months ago
tags:
- compile
needs: ["all_soc_compile"]
3 months ago
network_compile:
3 months ago
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
3 months ago
tags:
- compile
needs: ["all_soc_compile"]
3 months ago
peripherals_compile:
3 months ago
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
3 months ago
tags:
- compile
needs: ["all_soc_compile"]
3 months ago
python_compile:
3 months ago
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
3 months ago
tags:
- compile
needs: ["all_soc_compile"]
3 months ago
storage_compile:
3 months ago
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
3 months ago
tags:
- compile
needs: ["all_soc_compile"]
3 months ago
system_compile:
3 months ago
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
3 months ago
tags:
- compile
needs: ["all_soc_compile"]
3 months ago
# 各模块板级测试
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/