@@ -486,7 +486,6 @@ function set_build_options_for_host() {
486
486
swiftpm_bootstrap_options=(
487
487
--sysroot=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
488
488
)
489
- playgroundlogger_build_target=(" PlaygroundLogger_TestDriver" )
490
489
;;
491
490
iphonesimulator-i386)
492
491
xcrun_sdk_name=" iphonesimulator"
@@ -502,7 +501,6 @@ function set_build_options_for_host() {
502
501
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
503
502
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
504
503
)
505
- playgroundlogger_build_target=(" PlaygroundLogger_iOS" )
506
504
;;
507
505
iphonesimulator-x86_64)
508
506
xcrun_sdk_name=" iphonesimulator"
@@ -518,7 +516,6 @@ function set_build_options_for_host() {
518
516
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
519
517
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
520
518
)
521
- playgroundlogger_build_target=(" PlaygroundLogger_iOS" )
522
519
;;
523
520
iphoneos-armv7)
524
521
xcrun_sdk_name=" iphoneos"
@@ -534,7 +531,6 @@ function set_build_options_for_host() {
534
531
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
535
532
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
536
533
)
537
- playgroundlogger_build_target=(" PlaygroundLogger_iOS" )
538
534
;;
539
535
iphoneos-armv7s)
540
536
xcrun_sdk_name=" iphoneos"
@@ -550,7 +546,6 @@ function set_build_options_for_host() {
550
546
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
551
547
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
552
548
)
553
- playgroundlogger_build_target=(" PlaygroundLogger_iOS" )
554
549
;;
555
550
iphoneos-arm64)
556
551
xcrun_sdk_name=" iphoneos"
@@ -566,7 +561,6 @@ function set_build_options_for_host() {
566
561
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
567
562
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
568
563
)
569
- playgroundlogger_build_target=(" PlaygroundLogger_iOS" )
570
564
;;
571
565
appletvsimulator-x86_64)
572
566
xcrun_sdk_name=" appletvsimulator"
@@ -582,7 +576,6 @@ function set_build_options_for_host() {
582
576
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
583
577
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
584
578
)
585
- playgroundlogger_build_target=(" PlaygroundLogger_tvOS" )
586
579
;;
587
580
appletvos-arm64)
588
581
xcrun_sdk_name=" appletvos"
@@ -598,7 +591,6 @@ function set_build_options_for_host() {
598
591
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
599
592
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
600
593
)
601
- playgroundlogger_build_target=(" PlaygroundLogger_tvOS" )
602
594
;;
603
595
watchsimulator-i386)
604
596
xcrun_sdk_name=" watchsimulator"
@@ -1186,13 +1178,7 @@ XCTEST_SOURCE_DIR="${WORKSPACE}/swift-corelibs-xctest"
1186
1178
FOUNDATION_SOURCE_DIR=" ${WORKSPACE} /swift-corelibs-foundation"
1187
1179
LIBDISPATCH_SOURCE_DIR=" ${WORKSPACE} /swift-corelibs-libdispatch"
1188
1180
LIBICU_SOURCE_DIR=" ${WORKSPACE} /icu"
1189
- PLAYGROUNDLOGGER_SOURCE_DIR=" ${WORKSPACE} /swift-xcode-playground-support/PlaygroundLogger"
1190
- PLAYGROUNDSUPPORT_SOURCE_DIR=" ${WORKSPACE} /swift-xcode-playground-support/PlaygroundSupport"
1191
-
1192
- if [[ ! " ${SKIP_BUILD_PLAYGROUNDLOGGER} " && ! -d ${PLAYGROUNDLOGGER_SOURCE_DIR} ]]; then
1193
- echo " Couldn't find PlaygroundLogger source directory."
1194
- exit 1
1195
- fi
1181
+ PLAYGROUNDSUPPORT_SOURCE_DIR=" ${WORKSPACE} /swift-xcode-playground-support"
1196
1182
1197
1183
if [[ ! " ${SKIP_BUILD_PLAYGROUNDSUPPORT} " && ! -d ${PLAYGROUNDSUPPORT_SOURCE_DIR} ]]; then
1198
1184
echo " Couldn't find PlaygroundSupport source directory."
@@ -2586,18 +2572,26 @@ for host in "${ALL_HOSTS[@]}"; do
2586
2572
exit 1
2587
2573
fi
2588
2574
2589
- PLAYGROUNDSUPPORT_BUILD_DIR=$( build_directory ${host} ${product} )
2590
2575
SWIFTC_BIN=" $( build_directory_bin ${host} swift) /swiftc"
2591
2576
2592
2577
set -x
2593
2578
pushd " ${PLAYGROUNDSUPPORT_SOURCE_DIR} "
2594
- mkdir -p " ${PLAYGROUNDSUPPORT_BUILD_DIR} "
2595
- " xcodebuild" -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -target AllProducts SWIFT_EXEC=" ${SWIFTC_BIN} " DSTROOT=" $( get_host_install_destdir ${host} ) "
2596
- popd
2597
-
2598
- pushd " ${PLAYGROUNDLOGGER_SOURCE_DIR} "
2599
- mkdir -p " ${PLAYGROUNDSUPPORT_BUILD_DIR} "
2600
- " xcodebuild" -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -target " ${playgroundlogger_build_target} " install SWIFT_EXEC=" ${SWIFTC_BIN} " DSTROOT=${build_dir} INSTALL_PATH=" /" SKIP_INSTALL=NO
2579
+ if [[ $( not ${SKIP_BUILD_OSX} ) ]]; then
2580
+ " xcodebuild" -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -workspace swift-xcode-playground-support.xcworkspace -scheme BuildScript-macOS -sdk macosx -arch x86_64 -derivedDataPath " ${build_dir} " /DerivedData SWIFT_EXEC=" ${SWIFTC_BIN} " ONLY_ACTIVE_ARCH=NO
2581
+
2582
+ if [[ $( not ${SKIP_TEST_PLAYGROUNDSUPPORT} ) ]]; then
2583
+ # If we're going to end up testing PlaygroundLogger/PlaygroundSupport, then we need to build the tests too.
2584
+ " xcodebuild" -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -workspace swift-xcode-playground-support.xcworkspace -scheme BuildScript-Test-PlaygroundLogger-macOS -sdk macosx -arch x86_64 -derivedDataPath " ${build_dir} " /DerivedData SWIFT_EXEC=" ${SWIFTC_BIN} " ONLY_ACTIVE_ARCH=NO BUILD_PLAYGROUNDLOGGER_TESTS=YES
2585
+ fi
2586
+ fi
2587
+
2588
+ if [[ $( not ${SKIP_BUILD_IOS_SIMULATOR} ) ]]; then
2589
+ " xcodebuild" -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -workspace swift-xcode-playground-support.xcworkspace -scheme BuildScript-iOS -sdk iphonesimulator -arch x86_64 -derivedDataPath " ${build_dir} " /DerivedData SWIFT_EXEC=" ${SWIFTC_BIN} " ONLY_ACTIVE_ARCH=NO
2590
+ fi
2591
+
2592
+ if [[ $( not ${SKIP_BUILD_TVOS_SIMULATOR} ) ]]; then
2593
+ " xcodebuild" -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -workspace swift-xcode-playground-support.xcworkspace -scheme BuildScript-tvOS -sdk appletvsimulator -arch x86_64 -derivedDataPath " ${build_dir} " /DerivedData SWIFT_EXEC=" ${SWIFTC_BIN} " ONLY_ACTIVE_ARCH=NO
2594
+ fi
2601
2595
popd
2602
2596
{ set +x; } 2> /dev/null
2603
2597
continue
@@ -2922,14 +2916,18 @@ for host in "${ALL_HOSTS[@]}"; do
2922
2916
continue
2923
2917
;;
2924
2918
playgroundsupport)
2919
+ if [[ " ${SKIP_TEST_PLAYGROUNDSUPPORT} " ]]; then
2920
+ continue
2921
+ fi
2922
+
2925
2923
if [[ " ${host} " != " macosx" * ]]; then
2926
2924
echo " Skipping PlaygroundLogger tests on non-macOS platform"
2927
2925
continue
2928
2926
fi
2929
2927
2930
- SWIFT_DYLIB_PATH=$( build_directory ${host} swift) /lib/swift/macosx/
2931
- PLAYGROUNDLOGGER_FRAMEWORK_PATH=$( build_directory ${host} ${product} )
2932
2928
set -x
2929
+ SWIFT_DYLIB_PATH=$( build_directory ${host} swift) /lib/swift/macosx/
2930
+ PLAYGROUNDLOGGER_FRAMEWORK_PATH=$( build_directory ${host} ${product} ) /DerivedData/Build/Products/${PLAYGROUNDSUPPORT_BUILD_TYPE}
2933
2931
pushd " ${PLAYGROUNDLOGGER_FRAMEWORK_PATH} "
2934
2932
DYLD_LIBRARY_PATH=$SWIFT_DYLIB_PATH DYLD_FRAMEWORK_PATH=$PLAYGROUNDLOGGER_FRAMEWORK_PATH ./PlaygroundLogger_TestDriver
2935
2933
popd
@@ -3243,14 +3241,22 @@ for host in "${ALL_HOSTS[@]}"; do
3243
3241
3244
3242
echo " --- Installing ${product} ---"
3245
3243
3244
+ PLAYGROUNDSUPPORT_BUILD_DIR=$( build_directory ${host} ${product} )
3245
+
3246
3246
case " $( uname -s) " in
3247
3247
Darwin)
3248
3248
pushd " ${PLAYGROUNDSUPPORT_SOURCE_DIR} "
3249
- xcodebuild -target AllProducts -configuration ${PLAYGROUNDSUPPORT_BUILD_TYPE} install SWIFT_EXEC=" ${SWIFTC_BIN} " DT_TOOLCHAIN_DIR=" ${TOOLCHAIN_PREFIX} " DSTROOT=" $( get_host_install_destdir ${host} ) "
3250
- popd
3251
-
3252
- pushd " ${PLAYGROUNDLOGGER_SOURCE_DIR} "
3253
- xcodebuild -target " All Platforms Logger" -configuration Toolchain_${PLAYGROUNDSUPPORT_BUILD_TYPE} install SWIFT_EXEC=" ${SWIFTC_BIN} " DT_TOOLCHAIN_DIR=" ${TOOLCHAIN_PREFIX} " DSTROOT=" $( get_host_install_destdir ${host} ) "
3249
+ if [[ $( not ${SKIP_BUILD_OSX} ) ]]; then
3250
+ " xcodebuild" install -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -workspace swift-xcode-playground-support.xcworkspace -scheme BuildScript-macOS -sdk macosx -arch x86_64 -derivedDataPath " ${PLAYGROUNDSUPPORT_BUILD_DIR} " /DerivedData SWIFT_EXEC=" ${SWIFTC_BIN} " ONLY_ACTIVE_ARCH=NO DSTROOT=" $( get_host_install_destdir ${host} ) " TOOLCHAIN_INSTALL_DIR=" ${TOOLCHAIN_PREFIX} " BUILD_PLAYGROUNDLOGGER_TESTS=NO
3251
+ fi
3252
+
3253
+ if [[ $( not ${SKIP_BUILD_IOS_SIMULATOR} ) ]]; then
3254
+ " xcodebuild" install -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -workspace swift-xcode-playground-support.xcworkspace -scheme BuildScript-iOS -sdk iphonesimulator -arch x86_64 -derivedDataPath " ${PLAYGROUNDSUPPORT_BUILD_DIR} " /DerivedData SWIFT_EXEC=" ${SWIFTC_BIN} " ONLY_ACTIVE_ARCH=NO DSTROOT=" $( get_host_install_destdir ${host} ) " TOOLCHAIN_INSTALL_DIR=" ${TOOLCHAIN_PREFIX} " BUILD_PLAYGROUNDLOGGER_TESTS=NO
3255
+ fi
3256
+
3257
+ if [[ $( not ${SKIP_BUILD_TVOS_SIMULATOR} ) ]]; then
3258
+ " xcodebuild" install -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -workspace swift-xcode-playground-support.xcworkspace -scheme BuildScript-tvOS -sdk appletvsimulator -arch x86_64 -derivedDataPath " ${PLAYGROUNDSUPPORT_BUILD_DIR} " /DerivedData SWIFT_EXEC=" ${SWIFTC_BIN} " ONLY_ACTIVE_ARCH=NO DSTROOT=" $( get_host_install_destdir ${host} ) " TOOLCHAIN_INSTALL_DIR=" ${TOOLCHAIN_PREFIX} " BUILD_PLAYGROUNDLOGGER_TESTS=NO
3259
+ fi
3254
3260
popd
3255
3261
continue
3256
3262
;;
0 commit comments