@@ -488,7 +488,6 @@ function set_build_options_for_host() {
488
488
swiftpm_bootstrap_options=(
489
489
--sysroot=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
490
490
)
491
- playgroundlogger_build_target=(" PlaygroundLogger_TestDriver" )
492
491
;;
493
492
iphonesimulator-i386)
494
493
xcrun_sdk_name=" iphonesimulator"
@@ -504,7 +503,6 @@ function set_build_options_for_host() {
504
503
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
505
504
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
506
505
)
507
- playgroundlogger_build_target=(" PlaygroundLogger_iOS" )
508
506
;;
509
507
iphonesimulator-x86_64)
510
508
xcrun_sdk_name=" iphonesimulator"
@@ -520,7 +518,6 @@ function set_build_options_for_host() {
520
518
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
521
519
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
522
520
)
523
- playgroundlogger_build_target=(" PlaygroundLogger_iOS" )
524
521
;;
525
522
iphoneos-armv7)
526
523
xcrun_sdk_name=" iphoneos"
@@ -536,7 +533,6 @@ function set_build_options_for_host() {
536
533
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
537
534
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
538
535
)
539
- playgroundlogger_build_target=(" PlaygroundLogger_iOS" )
540
536
;;
541
537
iphoneos-armv7s)
542
538
xcrun_sdk_name=" iphoneos"
@@ -552,7 +548,6 @@ function set_build_options_for_host() {
552
548
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
553
549
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
554
550
)
555
- playgroundlogger_build_target=(" PlaygroundLogger_iOS" )
556
551
;;
557
552
iphoneos-arm64)
558
553
xcrun_sdk_name=" iphoneos"
@@ -568,7 +563,6 @@ function set_build_options_for_host() {
568
563
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
569
564
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
570
565
)
571
- playgroundlogger_build_target=(" PlaygroundLogger_iOS" )
572
566
;;
573
567
appletvsimulator-x86_64)
574
568
xcrun_sdk_name=" appletvsimulator"
@@ -584,7 +578,6 @@ function set_build_options_for_host() {
584
578
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
585
579
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
586
580
)
587
- playgroundlogger_build_target=(" PlaygroundLogger_tvOS" )
588
581
;;
589
582
appletvos-arm64)
590
583
xcrun_sdk_name=" appletvos"
@@ -600,7 +593,6 @@ function set_build_options_for_host() {
600
593
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
601
594
-DCMAKE_OSX_SYSROOT:PATH=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) "
602
595
)
603
- playgroundlogger_build_target=(" PlaygroundLogger_tvOS" )
604
596
;;
605
597
watchsimulator-i386)
606
598
xcrun_sdk_name=" watchsimulator"
@@ -1188,13 +1180,7 @@ XCTEST_SOURCE_DIR="${WORKSPACE}/swift-corelibs-xctest"
1188
1180
FOUNDATION_SOURCE_DIR=" ${WORKSPACE} /swift-corelibs-foundation"
1189
1181
LIBDISPATCH_SOURCE_DIR=" ${WORKSPACE} /swift-corelibs-libdispatch"
1190
1182
LIBICU_SOURCE_DIR=" ${WORKSPACE} /icu"
1191
- PLAYGROUNDLOGGER_SOURCE_DIR=" ${WORKSPACE} /swift-xcode-playground-support/PlaygroundLogger"
1192
- PLAYGROUNDSUPPORT_SOURCE_DIR=" ${WORKSPACE} /swift-xcode-playground-support/PlaygroundSupport"
1193
-
1194
- if [[ ! " ${SKIP_BUILD_PLAYGROUNDLOGGER} " && ! -d ${PLAYGROUNDLOGGER_SOURCE_DIR} ]]; then
1195
- echo " Couldn't find PlaygroundLogger source directory."
1196
- exit 1
1197
- fi
1183
+ PLAYGROUNDSUPPORT_SOURCE_DIR=" ${WORKSPACE} /swift-xcode-playground-support"
1198
1184
1199
1185
if [[ ! " ${SKIP_BUILD_PLAYGROUNDSUPPORT} " && ! -d ${PLAYGROUNDSUPPORT_SOURCE_DIR} ]]; then
1200
1186
echo " Couldn't find PlaygroundSupport source directory."
@@ -2622,18 +2608,26 @@ for host in "${ALL_HOSTS[@]}"; do
2622
2608
exit 1
2623
2609
fi
2624
2610
2625
- PLAYGROUNDSUPPORT_BUILD_DIR=$( build_directory ${host} ${product} )
2626
2611
SWIFTC_BIN=" $( build_directory_bin ${host} swift) /swiftc"
2627
2612
2628
2613
set -x
2629
2614
pushd " ${PLAYGROUNDSUPPORT_SOURCE_DIR} "
2630
- mkdir -p " ${PLAYGROUNDSUPPORT_BUILD_DIR} "
2631
- " xcodebuild" -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -target AllProducts SWIFT_EXEC=" ${SWIFTC_BIN} " DSTROOT=" $( get_host_install_destdir ${host} ) "
2632
- popd
2633
-
2634
- pushd " ${PLAYGROUNDLOGGER_SOURCE_DIR} "
2635
- mkdir -p " ${PLAYGROUNDSUPPORT_BUILD_DIR} "
2636
- " xcodebuild" -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -target " ${playgroundlogger_build_target} " install SWIFT_EXEC=" ${SWIFTC_BIN} " DSTROOT=${build_dir} INSTALL_PATH=" /" SKIP_INSTALL=NO
2615
+ if [[ $( not ${SKIP_BUILD_OSX} ) ]]; then
2616
+ " 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
2617
+
2618
+ if [[ $( not ${SKIP_TEST_PLAYGROUNDSUPPORT} ) ]]; then
2619
+ # If we're going to end up testing PlaygroundLogger/PlaygroundSupport, then we need to build the tests too.
2620
+ " 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
2621
+ fi
2622
+ fi
2623
+
2624
+ if [[ $( not ${SKIP_BUILD_IOS_SIMULATOR} ) ]]; then
2625
+ " 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
2626
+ fi
2627
+
2628
+ if [[ $( not ${SKIP_BUILD_TVOS_SIMULATOR} ) ]]; then
2629
+ " 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
2630
+ fi
2637
2631
popd
2638
2632
{ set +x; } 2> /dev/null
2639
2633
continue
@@ -2957,14 +2951,18 @@ for host in "${ALL_HOSTS[@]}"; do
2957
2951
continue
2958
2952
;;
2959
2953
playgroundsupport)
2954
+ if [[ " ${SKIP_TEST_PLAYGROUNDSUPPORT} " ]]; then
2955
+ continue
2956
+ fi
2957
+
2960
2958
if [[ " ${host} " != " macosx" * ]]; then
2961
2959
echo " Skipping PlaygroundLogger tests on non-macOS platform"
2962
2960
continue
2963
2961
fi
2964
2962
2965
- SWIFT_DYLIB_PATH=$( build_directory ${host} swift) /lib/swift/macosx/
2966
- PLAYGROUNDLOGGER_FRAMEWORK_PATH=$( build_directory ${host} ${product} )
2967
2963
set -x
2964
+ SWIFT_DYLIB_PATH=$( build_directory ${host} swift) /lib/swift/macosx/
2965
+ PLAYGROUNDLOGGER_FRAMEWORK_PATH=$( build_directory ${host} ${product} ) /DerivedData/Build/Products/${PLAYGROUNDSUPPORT_BUILD_TYPE}
2968
2966
pushd " ${PLAYGROUNDLOGGER_FRAMEWORK_PATH} "
2969
2967
DYLD_LIBRARY_PATH=$SWIFT_DYLIB_PATH DYLD_FRAMEWORK_PATH=$PLAYGROUNDLOGGER_FRAMEWORK_PATH ./PlaygroundLogger_TestDriver
2970
2968
popd
@@ -3278,14 +3276,22 @@ for host in "${ALL_HOSTS[@]}"; do
3278
3276
3279
3277
echo " --- Installing ${product} ---"
3280
3278
3279
+ PLAYGROUNDSUPPORT_BUILD_DIR=$( build_directory ${host} ${product} )
3280
+
3281
3281
case " $( uname -s) " in
3282
3282
Darwin)
3283
3283
pushd " ${PLAYGROUNDSUPPORT_SOURCE_DIR} "
3284
- xcodebuild -target AllProducts -configuration ${PLAYGROUNDSUPPORT_BUILD_TYPE} install SWIFT_EXEC=" ${SWIFTC_BIN} " DT_TOOLCHAIN_DIR=" ${TOOLCHAIN_PREFIX} " DSTROOT=" $( get_host_install_destdir ${host} ) "
3285
- popd
3286
-
3287
- pushd " ${PLAYGROUNDLOGGER_SOURCE_DIR} "
3288
- 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} ) "
3284
+ if [[ $( not ${SKIP_BUILD_OSX} ) ]]; then
3285
+ " 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
3286
+ fi
3287
+
3288
+ if [[ $( not ${SKIP_BUILD_IOS_SIMULATOR} ) ]]; then
3289
+ " 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
3290
+ fi
3291
+
3292
+ if [[ $( not ${SKIP_BUILD_TVOS_SIMULATOR} ) ]]; then
3293
+ " 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
3294
+ fi
3289
3295
popd
3290
3296
continue
3291
3297
;;
0 commit comments