mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 11:03:11 +00:00
e93cda6391
ci: upgrade idf-ci to 1.x Closes CII-108 See merge request espressif/esp-idf!46623
100 lines
3.6 KiB
YAML
100 lines
3.6 KiB
YAML
# This file is used to generate build jobs for pytest case dynamic pipeline
|
|
# don't add real jobs in this file
|
|
|
|
########################
|
|
# Build Jobs Templates #
|
|
########################
|
|
.dynamic_build_template:
|
|
extends:
|
|
- .after_script:build
|
|
image: $ESP_ENV_IMAGE
|
|
tags: [build, shiny]
|
|
stage: build
|
|
timeout: 2 hour
|
|
variables:
|
|
# Enable ccache for all build jobs. See configure_ci_environment.sh for more ccache related settings.
|
|
IDF_CCACHE_ENABLE: "1"
|
|
# Since the version 3.21 CMake passes source files and include dirs to ninja using absolute paths.
|
|
# Needed for pytest junit reports.
|
|
INSTALL_EXTRA_TOOLS: cmake
|
|
# Suppress Python warning messages during CI builds to keep logs clean and focused on errors.
|
|
# This prevents non-critical warnings (e.g., deprecation or resource warnings) from cluttering output.
|
|
PYTHONWARNINGS: "ignore"
|
|
needs:
|
|
- pipeline: $PARENT_PIPELINE_ID
|
|
job: generate_build_child_pipeline
|
|
- pipeline: $PARENT_PIPELINE_ID
|
|
job: pipeline_variables
|
|
artifacts:
|
|
paths:
|
|
# The other artifacts patterns are defined under .idf_ci.toml
|
|
# Now we're uploading/downloading the binary files from our internal storage server
|
|
|
|
# keep the log file to help debug
|
|
- "**/build*/build_log.txt"
|
|
# build spec files
|
|
- build_summary_*.xml
|
|
# list of built apps
|
|
- app_info_*.txt
|
|
when: always
|
|
expire_in: 1 week
|
|
script:
|
|
# CI specific options start from "--parallel-count xxx". could ignore when running locally
|
|
- run_cmd idf-ci build run
|
|
--parallel-count ${CI_NODE_TOTAL:-1}
|
|
--parallel-index ${CI_NODE_INDEX:-1}
|
|
--modified-files ${MR_MODIFIED_FILES}
|
|
|
|
.dynamic_target_test_template:
|
|
image: $TARGET_TEST_ENV_IMAGE
|
|
stage: target_test
|
|
timeout: 1 hour
|
|
variables:
|
|
GIT_STRATEGY: "fetch"
|
|
SUBMODULES_TO_FETCH: "none"
|
|
# set while generating the pipeline
|
|
nodes: ""
|
|
INSTALL_EXTRA_TOOLS: "xtensa-esp-elf-gdb riscv32-esp-elf-gdb openocd-esp32 esp-rom-elfs"
|
|
PYTEST_EXTRA_FLAGS: "--capture=fd --verbosity=0 --unity-test-report-mode merge"
|
|
needs:
|
|
- pipeline: $PARENT_PIPELINE_ID
|
|
job: pipeline_variables
|
|
- pipeline: $PARENT_PIPELINE_ID
|
|
job: snapshot_known_failure_cases
|
|
cache:
|
|
# Usually do not need submodule-cache in target_test
|
|
- key: pip-cache-${LATEST_GIT_TAG}
|
|
paths:
|
|
- .cache/pip
|
|
policy: pull
|
|
artifacts:
|
|
paths:
|
|
- XUNIT_RESULT*.xml
|
|
- pytest-embedded/
|
|
reports:
|
|
junit: XUNIT_RESULT*.xml
|
|
when: always
|
|
expire_in: 1 week
|
|
script:
|
|
# Merge the current known failure cases file with snapshot_known_failure_cases file captured at pipeline start
|
|
# to avoid retry failures caused by later updates to the known failure cases file.
|
|
- run_cmd idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
|
|
- printf '\n' >> ${KNOWN_FAILURE_CASES_FILE_NAME}
|
|
- cat artifacts/${KNOWN_FAILURE_CASES_FILE_NAME}.freeze >> ${KNOWN_FAILURE_CASES_FILE_NAME}
|
|
# get runner env config file
|
|
- retry_failed git clone $TEST_ENV_CONFIG_REPO
|
|
- run_cmd python $CHECKOUT_REF_SCRIPT ci-test-runner-configs ci-test-runner-configs
|
|
# CI specific options start from "--known-failure-cases-file xxx". could ignore when running locally
|
|
- run_cmd pytest $nodes
|
|
--junitxml=XUNIT_RESULT_${CI_JOB_ID}.xml
|
|
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
|
|
--parallel-count ${CI_NODE_TOTAL:-1}
|
|
--parallel-index ${CI_NODE_INDEX:-1}
|
|
${PYTEST_EXTRA_FLAGS}
|
|
after_script:
|
|
- source tools/ci/utils.sh
|
|
- run_cmd idf-ci gitlab upload-artifacts --type junit
|
|
|
|
.timeout_4h_template:
|
|
timeout: 4 hours
|