kopia lustrzana https://github.com/espressif/esp-idf
CI: build system do not check submodule for CI
rodzic
b4863551a9
commit
a11b15b92b
|
@ -31,6 +31,8 @@ variables:
|
|||
# jobs can overwrite this variable to only fetch submodules they required
|
||||
# set to "none" if don't need to fetch submodules
|
||||
SUBMODULES_TO_FETCH: "all"
|
||||
# tell build system do not check submodule update as we download archive instead of clone
|
||||
IDF_SKIP_CHECK_SUBMODULES: 1
|
||||
|
||||
UNIT_TEST_BUILD_SYSTEM: cmake
|
||||
EXAMPLE_TEST_BUILD_SYSTEM: cmake
|
||||
|
|
|
@ -635,6 +635,11 @@ clean: app-clean bootloader-clean config-clean ldgen-clean
|
|||
#
|
||||
# This only works for components inside IDF_PATH
|
||||
check-submodules:
|
||||
# for internal use:
|
||||
# skip submodule check if running on Gitlab CI and job is configured as not clone submodules
|
||||
ifeq ($(IDF_SKIP_CHECK_SUBMODULES),1)
|
||||
@echo "skip submodule check on internal CI"
|
||||
else
|
||||
# Check if .gitmodules exists, otherwise skip submodule check, assuming flattened structure
|
||||
ifneq ("$(wildcard ${IDF_PATH}/.gitmodules)","")
|
||||
|
||||
|
@ -662,7 +667,7 @@ endef
|
|||
# so the argument is suitable for use with 'git submodule' commands
|
||||
$(foreach submodule,$(subst $(IDF_PATH)/,,$(filter $(IDF_PATH)/%,$(COMPONENT_SUBMODULES))),$(eval $(call GenerateSubmoduleCheckTarget,$(submodule))))
|
||||
endif # End check for .gitmodules existence
|
||||
|
||||
endif
|
||||
|
||||
# PHONY target to list components in the build and their paths
|
||||
list-components:
|
||||
|
|
|
@ -11,6 +11,14 @@ if(NOT GIT_FOUND)
|
|||
else()
|
||||
|
||||
function(git_submodule_check root_path)
|
||||
# for internal use:
|
||||
# skip submodule check if running on Gitlab CI and job is configured as not clone submodules
|
||||
if($ENV{IDF_SKIP_CHECK_SUBMODULES})
|
||||
if($ENV{IDF_SKIP_CHECK_SUBMODULES} EQUAL 1)
|
||||
message("skip submodule check on internal CI")
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} submodule status
|
||||
|
|
Ładowanie…
Reference in New Issue