diff --git a/.gitlab/ci/build.yml b/.gitlab/ci/build.yml index 7f95e4e8b3..87a47e0b87 100644 --- a/.gitlab/ci/build.yml +++ b/.gitlab/ci/build.yml @@ -214,19 +214,9 @@ build_clang_test_apps_esp32p4: --junitxml ${CI_PROJECT_DIR}/XUNIT_RESULT.xml --ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME} -pytest_build_system: - extends: .test_build_system_template - parallel: 3 - -pytest_build_system_macos: - extends: - - .test_build_system_template - - .before_script:build:macos - - .after_script:build:macos:upload-failed-job-logs:ccache-show-stats - - .rules:build:macos +.test_build_system_macos_template_extension: tags: - macos - parallel: 3 variables: PYENV_VERSION: "3.10" # CCACHE_DIR: "/cache/idf_ccache". On macOS, you cannot write to this folder due to insufficient permissions. @@ -236,6 +226,57 @@ pytest_build_system_macos: # GitLab sets the project dir to this template `//` IDF_PATH: "/Users/espressif/builds/espressif/esp-idf" +.test_build_system_minimal_cmake_template: + extends: .test_build_system_template + variables: + INSTALL_EXTRA_TOOLS: cmake@3.22.1 + script: + - MINIMAL_SUPPORTED_CMAKE_VERSION=$(echo "${INSTALL_EXTRA_TOOLS}" | sed -n 's/.*cmake@\([0-9.]*\).*/\1/p') + - export PATH=$(echo "$PATH" | sed -E "s|/tools/cmake/[0-9.]+|/tools/cmake/${MINIMAL_SUPPORTED_CMAKE_VERSION}|") + - ACTUAL_CMAKE_VERSION=$(cmake --version | head -n1 | awk '{print $3}') + - | + if [ "${ACTUAL_CMAKE_VERSION}" != "${MINIMAL_SUPPORTED_CMAKE_VERSION}" ]; then + echo "ERROR: Wrong minimal CMake version! Detected: ${ACTUAL_CMAKE_VERSION}, but should be: ${MINIMAL_SUPPORTED_CMAKE_VERSION}" + exit 1 + fi + - ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh + - cd ${IDF_PATH}/tools/test_build_system + - run_cmd idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME} + - pytest + -k cmake + --cleanup-idf-copy + --parallel-count ${CI_NODE_TOTAL:-1} + --parallel-index ${CI_NODE_INDEX:-1} + --work-dir ${CI_PROJECT_DIR}/test_build_system + --junitxml ${CI_PROJECT_DIR}/XUNIT_RESULT.xml + --ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME} + +pytest_build_system: + extends: .test_build_system_template + parallel: 3 + +pytest_build_system_macos: + extends: + - .test_build_system_template + - .test_build_system_macos_template_extension + - .before_script:build:macos + - .after_script:build:macos:upload-failed-job-logs:ccache-show-stats + - .rules:build:macos + parallel: 3 + +pytest_build_system_minimal_cmake: + extends: .test_build_system_minimal_cmake_template + +pytest_build_system_macos_minimal_cmake: + extends: + - .test_build_system_minimal_cmake_template + - .test_build_system_macos_template_extension + - .before_script:build:macos + - .after_script:build:macos:upload-failed-job-logs:ccache-show-stats + - .rules:build:macos + variables: + INSTALL_EXTRA_TOOLS: ninja cmake@3.22.1 + build_docker: extends: - .before_script:minimal diff --git a/.gitlab/ci/test-win.yml b/.gitlab/ci/test-win.yml index 8ed4642304..91cf2df5ee 100644 --- a/.gitlab/ci/test-win.yml +++ b/.gitlab/ci/test-win.yml @@ -99,3 +99,34 @@ pytest_build_system_win: reports: junit: XUNIT_RESULT.xml when: always + +pytest_build_system_win_minimal_cmake: + extends: + - .test_build_system_template_win + - .rules:labels:windows_pytest_build_system + needs: [] + tags: [windows-build, brew] + artifacts: + paths: + - XUNIT_RESULT.xml + - test_build_system + expire_in: 2 days + reports: + junit: XUNIT_RESULT.xml + when: always + variables: + MINIMAL_CMAKE_VERSION: "3.22.1" + script: + - .\install.ps1 --enable-ci + - . .\export.ps1 + - python ${IDF_PATH}\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 + } + - python "${SUBMODULE_FETCH_TOOL}" -s "all" + - cd ${IDF_PATH}\tools\test_build_system + - pytest -k cmake --junitxml=${CI_PROJECT_DIR}\XUNIT_RESULT.xml