Files
esp-idf/.gitlab/ci/test-win.yml
Jakub Kocka c082e6a25d ci(tools): Keep Windows build-system work dir short and logs off the live log
Relative CI_PROJECT_DIR after cd nested --work-dir under tools/test_build_system
and blew MAX_PATH. Save failed-command output next to artifacts instead of
streaming a 12 KB record that still hangs shard 3/6.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-17 20:45:13 +08:00

121 lines
4.3 KiB
YAML

.host_test_win_template:
extends:
- .windows-settings
- .rules:test:host_test
stage: host_test
dependencies: # set dependencies to null to avoid missing artifacts issue
# run host_test jobs immediately, only after upload cache
needs:
- job: upload-submodules-cache
optional: true
artifacts: false
- job: manual_gate
optional: true
test_cli_installer_win:
rules:
- when: never
extends:
- .host_test_win_template
- .rules:labels:windows_pytest_build_system
allow_failure: true
artifacts:
when: on_failure
paths:
- tools/tools.new.json
- tools/test_idf_tools/test_python_env_logs.txt
expire_in: 1 week
timeout: 3h
script:
# Tools must be downloaded for testing
# cmake@version that is supported
- python tools\idf_tools.py download required qemu-riscv32 qemu-xtensa cmake cmake@3.22.1
- cd tools\test_idf_tools
- python .\test_idf_tools.py
- python .\test_idf_tools_python_env.py
test_tools_win:
extends:
- .host_test_win_template
- .rules:labels:windows_pytest_build_system
parallel: 4
artifacts:
paths:
- "*.out"
- "XUNIT_*.xml"
reports:
junit: "XUNIT_*.xml"
expire_in: 1 week
when: always
script:
- cd tools\test_idf_py
- idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
- pytest --parallel-count ${CI_NODE_TOTAL} --parallel-index ${CI_NODE_INDEX} --junitxml=XUNIT_RESULT.xml --ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
# Build tests
.test_build_system_template_win:
extends: .host_test_win_template
# Shard 6/6 can take ~2h1m on master; 2h is too tight. 3h still cuts the
# 4h freeze cost without failing a healthy long shard.
timeout: 3 hours
artifacts:
paths:
- XUNIT_RESULT.xml
- test_build_system
expire_in: 2 days
when: always
reports:
junit: XUNIT_RESULT.xml
script:
# CI_PROJECT_DIR is relative on these runners (builds/espressif/esp-idf), so it
# cannot be used after cd. The job starts in the directory artifact paths are
# relative to, so record it before cd and build absolute paths from it.
- $Env:IDF_TEST_PROJECT_DIR = (Get-Location).Path
- cd tools\test_build_system
- idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
- pytest --parallel-count ${CI_NODE_TOTAL} --parallel-index ${CI_NODE_INDEX} --work-dir "$Env:IDF_TEST_PROJECT_DIR\test_build_system" --junitxml="$Env:IDF_TEST_PROJECT_DIR\XUNIT_RESULT.xml" --ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME} --durations=10
pytest_build_system_win:
extends:
- .test_build_system_template_win
- .rules:labels:windows_pytest_build_system
parallel: 6
pytest_build_system_win_minimal_cmake:
extends:
- .test_build_system_template_win
- .rules:labels:windows_pytest_build_system
parallel: 2
variables:
MINIMAL_CMAKE_VERSION: "3.22.1"
script:
- python tools\idf_tools.py install cmake@${MINIMAL_CMAKE_VERSION}
- $Env:PATH = "$Env:USERPROFILE\.espressif\tools\cmake\${MINIMAL_CMAKE_VERSION}\bin;$Env:PATH"
- |
$actualVersion = (& cmake --version).Split()[2]
if ($actualVersion -ne $Env:MINIMAL_CMAKE_VERSION) {
Write-Error "ERROR: Wrong CMake version! Detected: $actualVersion, but expected: $Env:MINIMAL_CMAKE_VERSION"
exit 1
}
- $Env:IDF_TEST_PROJECT_DIR = (Get-Location).Path
- cd tools\test_build_system
- idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
- pytest -k cmake --work-dir "$Env:IDF_TEST_PROJECT_DIR\test_build_system" --junitxml="$Env:IDF_TEST_PROJECT_DIR\XUNIT_RESULT.xml" --ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME} --durations=10
pytest_buildv2_system_win:
extends:
- .test_build_system_template_win
- .rules:labels:buildv2
parallel: 6
script:
- $Env:IDF_TEST_PROJECT_DIR = (Get-Location).Path
- cd tools\test_build_system
- idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
- pytest
--buildv2
--parallel-count ${CI_NODE_TOTAL}
--parallel-index ${CI_NODE_INDEX}
--work-dir "$Env:IDF_TEST_PROJECT_DIR\test_build_system"
--junitxml="$Env:IDF_TEST_PROJECT_DIR\XUNIT_RESULT.xml"
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}