@@ -14,7 +14,7 @@ TVOS_SIMULATOR_ARCHIVE_DSYM_PATH = $(CURR_DIR)/build/tvos_simulator.xcarchive/dS
1414TVOS_ARCHIVE_PATH = $(CURR_DIR ) /build/tvos.xcarchive/Products/Library/Frameworks/
1515TVOS_ARCHIVE_DSYM_PATH = $(CURR_DIR ) /build/tvos.xcarchive/dSYMs/
1616
17- # Values with defaults
17+ # CI variables - using values with defaults. Set defaults to values that are most useful for local development.
1818IOS_DEVICE_NAME ?= iPhone 15
1919# If OS version is not specified, uses the first device name match in the list of available simulators
2020IOS_VERSION ?=
3333 TVOS_DESTINATION = "platform=tvOS Simulator,name=$(TVOS_DEVICE_NAME),OS=$(TVOS_VERSION)"
3434endif
3535
36- clean-derived-data :
37- @if [ -z " $( SCHEME) " ]; then \
38- echo " Error: SCHEME variable is not set." ; \
39- exit 1; \
40- fi ; \
41- if [ -z " $( DESTINATION) " ]; then \
42- echo " Error: DESTINATION variable is not set." ; \
43- exit 1; \
44- fi ; \
45- echo " Cleaning derived data for scheme: $( SCHEME) with destination: $( DESTINATION) " ; \
46- DERIVED_DATA_PATH=` xcodebuild -workspace $( PROJECT_NAME) .xcworkspace -scheme " $( SCHEME) " -destination " $( DESTINATION) " -showBuildSettings | grep -m1 ' BUILD_DIR' | awk ' {print $$3}' | sed ' s|/Build/Products||' ` ; \
47- echo " DerivedData Path: $$ DERIVED_DATA_PATH" ; \
48- \
49- LOGS_TEST_DIR=$$ DERIVED_DATA_PATH/Logs/Test; \
50- echo " Logs Test Path: $$ LOGS_TEST_DIR" ; \
51- \
52- if [ -d " $$ LOGS_TEST_DIR" ]; then \
53- echo " Removing existing .xcresult files in $$ LOGS_TEST_DIR" ; \
54- rm -rf " $$ LOGS_TEST_DIR" /* .xcresult; \
55- else \
56- echo " Logs/Test directory does not exist. Skipping cleanup." ; \
57- fi ;
58-
5936setup-tools : install-githook
6037
6138setup :
@@ -102,15 +79,15 @@ build-ios:
10279 @echo " ######################################################################"
10380 @echo " ### Building iOS archive"
10481 @echo " ######################################################################"
105- xcodebuild archive -workspace $(PROJECT_NAME ) .xcworkspace -scheme $(SCHEME_NAME_XCFRAMEWORK ) -archivePath " ./build/ios.xcarchive" -sdk iphoneos -destination=" iOS" SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION =YES ADB_SKIP_LINT=YES
106- xcodebuild archive -workspace $(PROJECT_NAME ) .xcworkspace -scheme $(SCHEME_NAME_XCFRAMEWORK ) -archivePath " ./build/ios_simulator.xcarchive" -sdk iphonesimulator -destination=" iOS Simulator" SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION =YES ADB_SKIP_LINT=YES
82+ xcodebuild archive -workspace $(PROJECT_NAME ) .xcworkspace -scheme $(SCHEME_NAME_XCFRAMEWORK ) -archivePath " ./build/ios.xcarchive" -sdk iphoneos -destination=" iOS" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION =YES ADB_SKIP_LINT=YES
83+ xcodebuild archive -workspace $(PROJECT_NAME ) .xcworkspace -scheme $(SCHEME_NAME_XCFRAMEWORK ) -archivePath " ./build/ios_simulator.xcarchive" -sdk iphonesimulator -destination=" iOS Simulator" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION =YES ADB_SKIP_LINT=YES
10784
10885build-tvos :
10986 @echo " ######################################################################"
11087 @echo " ### Building tvOS archive"
11188 @echo " ######################################################################"
112- xcodebuild archive -workspace $(PROJECT_NAME ) .xcworkspace -scheme $(SCHEME_NAME_XCFRAMEWORK ) -archivePath " ./build/tvos.xcarchive" -sdk appletvos -destination=" tvOS" SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION =YES ADB_SKIP_LINT=YES
113- xcodebuild archive -workspace $(PROJECT_NAME ) .xcworkspace -scheme $(SCHEME_NAME_XCFRAMEWORK ) -archivePath " ./build/tvos_simulator.xcarchive" -sdk appletvsimulator -destination=" tvOS Simulator" SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION =YES ADB_SKIP_LINT=YES
89+ xcodebuild archive -workspace $(PROJECT_NAME ) .xcworkspace -scheme $(SCHEME_NAME_XCFRAMEWORK ) -archivePath " ./build/tvos.xcarchive" -sdk appletvos -destination=" tvOS" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION =YES ADB_SKIP_LINT=YES
90+ xcodebuild archive -workspace $(PROJECT_NAME ) .xcworkspace -scheme $(SCHEME_NAME_XCFRAMEWORK ) -archivePath " ./build/tvos_simulator.xcarchive" -sdk appletvsimulator -destination=" tvOS Simulator" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION =YES ADB_SKIP_LINT=YES
11491
11592zip :
11693 cd build && zip -r -X $(PROJECT_NAME ) .xcframework.zip $(PROJECT_NAME ) .xcframework/
@@ -133,30 +110,31 @@ unit-test-ios:
133110 @echo " ######################################################################"
134111 @echo " ### Unit Testing iOS"
135112 @echo " ######################################################################"
136- @ $( MAKE ) clean-derived-data SCHEME=UnitTests DESTINATION= $( IOS_DESTINATION )
137- xcodebuild test -workspace $(PROJECT_NAME ) .xcworkspace -scheme " UnitTests" -destination $(IOS_DESTINATION ) -enableCodeCoverage YES ADB_SKIP_LINT=YES
113+ rm -rf build/reports/iosUnitResults.xcresult
114+ xcodebuild test -workspace $(PROJECT_NAME ) .xcworkspace -scheme " UnitTests" -destination $(IOS_DESTINATION ) -derivedDataPath build/out -resultBundlePath build/reports/iosUnitResults.xcresult - enableCodeCoverage YES ADB_SKIP_LINT=YES
138115
139116functional-test-ios :
140117 @echo " ######################################################################"
141118 @echo " ### Functional Testing iOS"
142119 @echo " ######################################################################"
143- @ $( MAKE ) clean-derived-data SCHEME=FunctionalTests DESTINATION= $( IOS_DESTINATION )
144- xcodebuild test -workspace $(PROJECT_NAME ) .xcworkspace -scheme " FunctionalTests" -destination $(IOS_DESTINATION ) -enableCodeCoverage YES ADB_SKIP_LINT=YES
120+ rm -rf build/reports/iosFunctionalResults.xcresult
121+ xcodebuild test -workspace $(PROJECT_NAME ) .xcworkspace -scheme " FunctionalTests" -destination $(IOS_DESTINATION ) -derivedDataPath build/out -resultBundlePath build/reports/iosFunctionalResults.xcresult - enableCodeCoverage YES ADB_SKIP_LINT=YES
145122
146123unit-test-tvos :
147124 @echo " ######################################################################"
148125 @echo " ### Unit Testing tvOS"
149126 @echo " ######################################################################"
150- @ $( MAKE ) clean-derived-data SCHEME=UnitTests DESTINATION= $( TVOS_DESTINATION )
151- xcodebuild test -workspace $(PROJECT_NAME ) .xcworkspace -scheme " UnitTests" -destination $(TVOS_DESTINATION ) -enableCodeCoverage YES ADB_SKIP_LINT=YES
127+ rm -rf build/reports/tvosUnitResults.xcresult
128+ xcodebuild test -workspace $(PROJECT_NAME ) .xcworkspace -scheme " UnitTests" -destination $(TVOS_DESTINATION ) -derivedDataPath build/out -resultBundlePath build/reports/tvosUnitResults.xcresult - enableCodeCoverage YES ADB_SKIP_LINT=YES
152129
153130functional-test-tvos :
154131 @echo " ######################################################################"
155132 @echo " ### Functional Testing tvOS"
156133 @echo " ######################################################################"
157- @ $( MAKE ) clean-derived-data SCHEME=FunctionalTests DESTINATION= $( TVOS_DESTINATION )
158- xcodebuild test -workspace $(PROJECT_NAME ) .xcworkspace -scheme " FunctionalTests" -destination $(TVOS_DESTINATION ) -enableCodeCoverage YES ADB_SKIP_LINT=YES
134+ rm -rf build/reports/tvosFunctionalResults.xcresult
135+ xcodebuild test -workspace $(PROJECT_NAME ) .xcworkspace -scheme " FunctionalTests" -destination $(TVOS_DESTINATION ) -derivedDataPath build/out -resultBundlePath build/reports/tvosFunctionalResults.xcresult - enableCodeCoverage YES ADB_SKIP_LINT=YES
159136
137+ # CI alias for build and test workflow
160138integration-test-ios : upstream-integration-test-ios
161139
162140# Runs the Edge Network (Konductor) integration tests after installing pod dependencies
@@ -165,7 +143,6 @@ integration-test-ios: upstream-integration-test-ios
165143# If MOBILE_PROPERTY_ID is not specified, test target will use its default value.
166144.SILENT : upstream-integration-test-ios # Silences Makefile's automatic echo of commands
167145upstream-integration-test-ios : pod-install; \
168- $(MAKE ) clean-derived-data SCHEME=UpstreamIntegrationTests DESTINATION=$(IOS_DESTINATION )
169146 if [ -z " $$ EDGE_ENVIRONMENT" ]; then \
170147 echo ' ' ; \
171148 echo ' -------------------------- WARNING -------------------------------' ; \
@@ -177,6 +154,8 @@ upstream-integration-test-ios: pod-install; \
177154 -workspace $(PROJECT_NAME ) .xcworkspace \
178155 -scheme UpstreamIntegrationTests \
179156 -destination $(IOS_DESTINATION ) \
157+ -derivedDataPath build/out \
158+ -resultBundlePath build/reports/iosIntegrationUpstreamResults.xcresult \
180159 -enableCodeCoverage YES \
181160 ADB_SKIP_LINT=YES \
182161 TAGS_MOBILE_PROPERTY_ID=$(TAGS_MOBILE_PROPERTY_ID ) \
0 commit comments