[build, darwin] Disable Xcode indexing-while-compiling on CI

This commit is contained in:
Jason Wray
2019-03-04 15:59:01 -08:00
committed by GitHub
parent 7b7ad9d39b
commit 05026b704a
5 changed files with 40 additions and 8 deletions

View File

@@ -68,9 +68,13 @@ MACOS_USER_DATA_PATH = $(MACOS_WORK_PATH)/xcuserdata/$(USER).xcuserdatad
MACOS_COMPDB_PATH = $(MACOS_OUTPUT_PATH)/compdb/$(BUILDTYPE)
MACOS_XCODEBUILD = xcodebuild \
-derivedDataPath $(MACOS_OUTPUT_PATH) \
-configuration $(BUILDTYPE) \
-workspace $(MACOS_WORK_PATH)
-derivedDataPath $(MACOS_OUTPUT_PATH) \
-configuration $(BUILDTYPE) \
-workspace $(MACOS_WORK_PATH)
ifneq ($(CI),)
MACOS_XCODEBUILD += -xcconfig platform/darwin/ci.xcconfig
endif
$(MACOS_PROJ_PATH): $(BUILD_DEPS) $(MACOS_USER_DATA_PATH)/WorkspaceSettings.xcsettings
mkdir -p $(MACOS_OUTPUT_PATH)
@@ -201,11 +205,15 @@ IOS_WORK_PATH = platform/ios/ios.xcworkspace
IOS_USER_DATA_PATH = $(IOS_WORK_PATH)/xcuserdata/$(USER).xcuserdatad
IOS_XCODEBUILD_SIM = xcodebuild \
ARCHS=x86_64 ONLY_ACTIVE_ARCH=YES \
-derivedDataPath $(IOS_OUTPUT_PATH) \
-configuration $(BUILDTYPE) -sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 6,OS=latest' \
-workspace $(IOS_WORK_PATH)
ARCHS=x86_64 ONLY_ACTIVE_ARCH=YES \
-derivedDataPath $(IOS_OUTPUT_PATH) \
-configuration $(BUILDTYPE) -sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 6,OS=latest' \
-workspace $(IOS_WORK_PATH)
ifneq ($(CI),)
IOS_XCODEBUILD_SIM += -xcconfig platform/darwin/ci.xcconfig
endif
$(IOS_PROJ_PATH): $(IOS_USER_DATA_PATH)/WorkspaceSettings.xcsettings $(BUILD_DEPS)
mkdir -p $(IOS_OUTPUT_PATH)

View File

@@ -218,6 +218,10 @@ function(initialize_xcode_cxx_build_settings target)
# Make all build configurations debuggable — except Release.
set_xcode_property(${target} GCC_GENERATE_DEBUGGING_SYMBOLS $<$<NOT:$<CONFIG:Release>>:YES>)
if (DEFINED ENV{CI})
set_xcode_property(${target} COMPILER_INDEX_STORE_ENABLE NO)
endif()
endfunction()
# CMake 3.1 does not have this yet.

View File

@@ -0,0 +1 @@
COMPILER_INDEX_STORE_ENABLE = NO

View File

@@ -70,6 +70,13 @@ if [[ ${BUILD_STATIC} == true ]]; then
SCHEME='static'
fi
CI_XCCONFIG=''
if [[ ! -z "${CI:=}" ]]; then
xcconfig='platform/darwin/ci.xcconfig'
echo "CI environment, using ${xcconfig}"
CI_XCCONFIG="-xcconfig ./${xcconfig}"
fi
step "Building ${FORMAT} framework for iOS Simulator using ${SCHEME} scheme"
xcodebuild \
CURRENT_PROJECT_VERSION=${PROJ_VERSION} \
@@ -77,6 +84,7 @@ xcodebuild \
CURRENT_SEMANTIC_VERSION=${SEM_VERSION} \
CURRENT_COMMIT_HASH=${HASH} \
ONLY_ACTIVE_ARCH=NO \
${CI_XCCONFIG} \
-derivedDataPath ${DERIVED_DATA} \
-workspace ./platform/ios/ios.xcworkspace \
-scheme ${SCHEME} \
@@ -92,6 +100,7 @@ if [[ ${BUILD_FOR_DEVICE} == true ]]; then
CURRENT_SEMANTIC_VERSION=${SEM_VERSION} \
CURRENT_COMMIT_HASH=${HASH} \
ONLY_ACTIVE_ARCH=NO \
${CI_XCCONFIG} \
-derivedDataPath ${DERIVED_DATA} \
-workspace ./platform/ios/ios.xcworkspace \
-scheme ${SCHEME} \

View File

@@ -24,12 +24,20 @@ PROJ_VERSION=$(git rev-list --count HEAD)
SEM_VERSION=$( git describe --tags --match=macos-v*.*.* --abbrev=0 | sed 's/^macos-v//' )
SHORT_VERSION=${SEM_VERSION%-*}
CI_XCCONFIG=''
if [[ ! -z "${CI:=}" ]]; then
xcconfig='platform/darwin/ci.xcconfig'
echo "CI environment, using ${xcconfig}"
CI_XCCONFIG="-xcconfig ./${xcconfig}"
fi
step "Building dynamic framework (build ${PROJ_VERSION}, version ${SEM_VERSION})…"
xcodebuild \
CURRENT_PROJECT_VERSION=${PROJ_VERSION} \
CURRENT_SHORT_VERSION=${SHORT_VERSION} \
CURRENT_SEMANTIC_VERSION=${SEM_VERSION} \
CURRENT_COMMIT_HASH=${HASH} \
${CI_XCCONFIG} \
-derivedDataPath ${DERIVED_DATA} \
-archivePath "${APP_OUTPUT}/macosapp.xcarchive" \
-workspace ./platform/macos/macos.xcworkspace \
@@ -53,6 +61,7 @@ if [[ ${BUILDTYPE} == Release ]]; then
CURRENT_SHORT_VERSION=${SHORT_VERSION} \
CURRENT_SEMANTIC_VERSION=${SEM_VERSION} \
CURRENT_COMMIT_HASH=${HASH} \
${CI_XCCONFIG} \
-derivedDataPath ${DERIVED_DATA} \
-archivePath "${APP_OUTPUT}/macosapp.xcarchive" \
-workspace ./platform/macos/macos.xcworkspace \
@@ -89,6 +98,7 @@ if [[ ${BUILDTYPE} == Release ]]; then
step "Exporting Mapbox GL.app"
xcodebuild \
${CI_XCCONFIG} \
-exportArchive \
-archivePath "${APP_OUTPUT}/macosapp.xcarchive" \
-exportPath "${APP_OUTPUT}" \