From 40051c61b5896037e1cc1451598cae7b208119e2 Mon Sep 17 00:00:00 2001 From: Joe Heck Date: Mon, 20 May 2024 14:40:16 -0700 Subject: [PATCH 1/7] CI update to shift off macOS-11 runner due to deprecation --- .github/workflows/iostest.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/iostest.yml b/.github/workflows/iostest.yml index e8db49b..ca2d218 100644 --- a/.github/workflows/iostest.yml +++ b/.github/workflows/iostest.yml @@ -18,7 +18,7 @@ jobs: build: - runs-on: macos-11 + runs-on: macos-14 #env: # sets the version of Xcode to utilize within the VM for all steps # DEVELOPER_DIR: /Applications/Xcode_13.app/Contents/Developer @@ -56,6 +56,6 @@ jobs: run: | xcodebuild -scheme SwiftUI-Notes \ -configuration Debug \ - -sdk iphonesimulator15.0 \ - -destination 'platform=iOS Simulator,OS=15.0,name=iPhone 8' \ + -sdk iphonesimulator17.0 \ + -destination 'platform=iOS Simulator,OS=16.4,name=iPhone 8' \ test -showBuildTimingSummary From ec3287e22d080cd9a78eb8891fd13a3dcef2cfbd Mon Sep 17 00:00:00 2001 From: Joe Heck Date: Mon, 20 May 2024 14:46:10 -0700 Subject: [PATCH 2/7] more wrangling to try this... --- .github/workflows/iostest.yml | 6 ++++- SwiftUI-Notes.xcodeproj/project.pbxproj | 22 +++++-------------- .../xcschemes/SwiftUI-Notes.xcscheme | 2 +- .../xcschemes/UIKit-Combine.xcscheme | 2 +- 4 files changed, 12 insertions(+), 20 deletions(-) diff --git a/.github/workflows/iostest.yml b/.github/workflows/iostest.yml index ca2d218..4e20551 100644 --- a/.github/workflows/iostest.yml +++ b/.github/workflows/iostest.yml @@ -52,7 +52,11 @@ jobs: - name: Show available destinations run: xcodebuild -scheme SwiftUI-Notes -showdestinations - - name: Run the Combine test suite + - name: Run the Combine test suite (macOS) + run: | + xcodebuild -scheme SwiftUI-Notes test + + - name: Run the Combine test suite (iOS) run: | xcodebuild -scheme SwiftUI-Notes \ -configuration Debug \ diff --git a/SwiftUI-Notes.xcodeproj/project.pbxproj b/SwiftUI-Notes.xcodeproj/project.pbxproj index 992bdb8..c16246f 100644 --- a/SwiftUI-Notes.xcodeproj/project.pbxproj +++ b/SwiftUI-Notes.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -476,8 +476,9 @@ 1AC8C76D22B1BED80064C1AE /* Project object */ = { isa = PBXProject; attributes = { + BuildIndependentTargetsInParallel = YES; LastSwiftUpdateCheck = 1100; - LastUpgradeCheck = 1210; + LastUpgradeCheck = 1540; ORGANIZATIONNAME = "SwiftUI-Notes"; TargetAttributes = { 1A6006DD22D267F10030A471 = { @@ -485,18 +486,15 @@ }; 1A6006F222D267F30030A471 = { CreatedOnToolsVersion = 11.0; - TestTargetID = 1A6006DD22D267F10030A471; }; 1AC8C77422B1BED80064C1AE = { CreatedOnToolsVersion = 11.0; }; 1AC8C78A22B1BED90064C1AE = { CreatedOnToolsVersion = 11.0; - TestTargetID = 1AC8C77422B1BED80064C1AE; }; 1AEA9C2322CD5FE7006709F1 = { CreatedOnToolsVersion = 11.0; - TestTargetID = 1AC8C77422B1BED80064C1AE; }; }; }; @@ -753,7 +751,6 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = BDV4VC27D3; INFOPLIST_FILE = "UIKit-CombineTests/Info.plist"; @@ -766,7 +763,6 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UIKit-Combine.app/UIKit-Combine"; }; name = Debug; }; @@ -774,7 +770,6 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = BDV4VC27D3; INFOPLIST_FILE = "UIKit-CombineTests/Info.plist"; @@ -787,7 +782,6 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UIKit-Combine.app/UIKit-Combine"; }; name = Release; }; @@ -828,6 +822,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -889,6 +884,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -955,7 +951,6 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = BDV4VC27D3; INFOPLIST_FILE = "SwiftUI-NotesTests/Info.plist"; @@ -968,7 +963,6 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftUI-Notes.app/SwiftUI-Notes"; }; name = Debug; }; @@ -976,7 +970,6 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = BDV4VC27D3; INFOPLIST_FILE = "SwiftUI-NotesTests/Info.plist"; @@ -989,14 +982,12 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftUI-Notes.app/SwiftUI-Notes"; }; name = Release; }; 1AEA9C2B22CD5FE7006709F1 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = BDV4VC27D3; INFOPLIST_FILE = UsingCombineTests/Info.plist; @@ -1009,14 +1000,12 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftUI-Notes.app/SwiftUI-Notes"; }; name = Debug; }; 1AEA9C2C22CD5FE7006709F1 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = BDV4VC27D3; INFOPLIST_FILE = UsingCombineTests/Info.plist; @@ -1029,7 +1018,6 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftUI-Notes.app/SwiftUI-Notes"; }; name = Release; }; diff --git a/SwiftUI-Notes.xcodeproj/xcshareddata/xcschemes/SwiftUI-Notes.xcscheme b/SwiftUI-Notes.xcodeproj/xcshareddata/xcschemes/SwiftUI-Notes.xcscheme index 379369f..0648840 100644 --- a/SwiftUI-Notes.xcodeproj/xcshareddata/xcschemes/SwiftUI-Notes.xcscheme +++ b/SwiftUI-Notes.xcodeproj/xcshareddata/xcschemes/SwiftUI-Notes.xcscheme @@ -1,6 +1,6 @@ Date: Mon, 20 May 2024 14:48:32 -0700 Subject: [PATCH 3/7] show SDKs and destinations --- .github/workflows/iostest.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/iostest.yml b/.github/workflows/iostest.yml index 4e20551..20d0004 100644 --- a/.github/workflows/iostest.yml +++ b/.github/workflows/iostest.yml @@ -49,6 +49,8 @@ jobs: - name: xcodebuild -list run: xcodebuild -list + - name: Show available destinations + run: xcodebuild -scheme SwiftUI-Notes -showsdks - name: Show available destinations run: xcodebuild -scheme SwiftUI-Notes -showdestinations From 2f5b3a01be2723e8eb31e2d52b187baf0988b44a Mon Sep 17 00:00:00 2001 From: Joe Heck Date: Mon, 20 May 2024 14:50:38 -0700 Subject: [PATCH 4/7] lock in new destination and SDK with macOS 14 runner --- .github/workflows/iostest.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/iostest.yml b/.github/workflows/iostest.yml index 20d0004..128e04b 100644 --- a/.github/workflows/iostest.yml +++ b/.github/workflows/iostest.yml @@ -49,19 +49,13 @@ jobs: - name: xcodebuild -list run: xcodebuild -list - - name: Show available destinations - run: xcodebuild -scheme SwiftUI-Notes -showsdks - name: Show available destinations run: xcodebuild -scheme SwiftUI-Notes -showdestinations - - name: Run the Combine test suite (macOS) - run: | - xcodebuild -scheme SwiftUI-Notes test - - name: Run the Combine test suite (iOS) run: | xcodebuild -scheme SwiftUI-Notes \ -configuration Debug \ -sdk iphonesimulator17.0 \ - -destination 'platform=iOS Simulator,OS=16.4,name=iPhone 8' \ + -destination 'platform=iOS Simulator,OS=17.5,name=iPhone 14' \ test -showBuildTimingSummary From 0f1305058cd932f969b6969fa0a7e6b2e49b87a5 Mon Sep 17 00:00:00 2001 From: Joe Heck Date: Mon, 20 May 2024 14:54:28 -0700 Subject: [PATCH 5/7] re-linking to host app --- SwiftUI-Notes.xcodeproj/project.pbxproj | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SwiftUI-Notes.xcodeproj/project.pbxproj b/SwiftUI-Notes.xcodeproj/project.pbxproj index c16246f..77a80bf 100644 --- a/SwiftUI-Notes.xcodeproj/project.pbxproj +++ b/SwiftUI-Notes.xcodeproj/project.pbxproj @@ -486,15 +486,18 @@ }; 1A6006F222D267F30030A471 = { CreatedOnToolsVersion = 11.0; + TestTargetID = 1A6006DD22D267F10030A471; }; 1AC8C77422B1BED80064C1AE = { CreatedOnToolsVersion = 11.0; }; 1AC8C78A22B1BED90064C1AE = { CreatedOnToolsVersion = 11.0; + TestTargetID = 1AC8C77422B1BED80064C1AE; }; 1AEA9C2322CD5FE7006709F1 = { CreatedOnToolsVersion = 11.0; + TestTargetID = 1AC8C77422B1BED80064C1AE; }; }; }; @@ -763,6 +766,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UIKit-Combine.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/UIKit-Combine"; }; name = Debug; }; @@ -782,6 +786,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UIKit-Combine.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/UIKit-Combine"; }; name = Release; }; @@ -963,6 +968,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftUI-Notes.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/SwiftUI-Notes"; }; name = Debug; }; @@ -982,6 +988,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftUI-Notes.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/SwiftUI-Notes"; }; name = Release; }; @@ -1000,6 +1007,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftUI-Notes.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/SwiftUI-Notes"; }; name = Debug; }; @@ -1018,6 +1026,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftUI-Notes.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/SwiftUI-Notes"; }; name = Release; }; From 7fcd4219772d347f5814abf6107f6bb5855a6d12 Mon Sep 17 00:00:00 2001 From: Joe Heck Date: Mon, 20 May 2024 14:55:50 -0700 Subject: [PATCH 6/7] only run on push --- .github/workflows/iostest.yml | 2 +- .github/workflows/publish.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/iostest.yml b/.github/workflows/iostest.yml index 128e04b..8f7dd8c 100644 --- a/.github/workflows/iostest.yml +++ b/.github/workflows/iostest.yml @@ -1,6 +1,6 @@ name: CI -on: [push, pull_request] +on: [push] jobs: test-adoc-generation: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7e43b02..3067282 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -25,7 +25,7 @@ jobs: - name: generate zh-CN html with asciidoctor from docs/ run: docker run --rm -v $(pwd):/documents/ --name asciidoc-to-html heckj/docker-asciidoctor asciidoctor -v -t -D /documents/output -r ./docs/lib/google-analytics-docinfoprocessor.rb docs_zh-CN/using-combine_zh-CN.adoc - # results to appear in the directory 'output', which on GH action is owned by root, not `me` + # results to appear in the directory 'output', which on GH action is owned by root, not `me` - name: permission check run: ls -altr From 4f042f0f50e9a477da21b79fe7900035c5646df5 Mon Sep 17 00:00:00 2001 From: Joe Heck Date: Mon, 20 May 2024 14:58:16 -0700 Subject: [PATCH 7/7] these are legacy tests at this point, so I'm not going to maintain the quirky CI for the iOS tests, but they still work locally --- .github/workflows/iostest.yml | 38 +++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/iostest.yml b/.github/workflows/iostest.yml index 8f7dd8c..8d432fc 100644 --- a/.github/workflows/iostest.yml +++ b/.github/workflows/iostest.yml @@ -16,14 +16,14 @@ jobs: run: docker run --rm -v $(pwd):/documents/ --name asciidoc-to-html heckj/docker-asciidoctor asciidoctor -v -t -D /documents/output -r ./docs/lib/google-analytics-docinfoprocessor.rb docs/using-combine-book.adoc # results to appear in the directory 'output' - build: + # build: - runs-on: macos-14 + # runs-on: macos-14 #env: # sets the version of Xcode to utilize within the VM for all steps # DEVELOPER_DIR: /Applications/Xcode_13.app/Contents/Developer - steps: - - uses: actions/checkout@v2 + # steps: + # - uses: actions/checkout@v2 # - name: docker version # run: docker -v @@ -31,14 +31,14 @@ jobs: # - name: docker help # run: docker --help - - name: Show what's in Applications - run: ls -al /Applications + # - name: Show what's in Applications + # run: ls -al /Applications # - name: xcodebuild --help # run: xcodebuild --help - - name: xcodebuild --showsdks - run: xcodebuild -showsdks + # - name: xcodebuild --showsdks + # run: xcodebuild -showsdks # - name: xcodebuild -showBuildSettings # run: xcodebuild -showBuildSettings @@ -46,16 +46,16 @@ jobs: # - name: xcodebuild -showTestPlans # run: xcodebuild -showTestPlans - - name: xcodebuild -list - run: xcodebuild -list + # - name: xcodebuild -list + # run: xcodebuild -list - - name: Show available destinations - run: xcodebuild -scheme SwiftUI-Notes -showdestinations + # - name: Show available destinations + # run: xcodebuild -scheme SwiftUI-Notes -showdestinations - - name: Run the Combine test suite (iOS) - run: | - xcodebuild -scheme SwiftUI-Notes \ - -configuration Debug \ - -sdk iphonesimulator17.0 \ - -destination 'platform=iOS Simulator,OS=17.5,name=iPhone 14' \ - test -showBuildTimingSummary + # - name: Run the Combine test suite (iOS) + # run: | + # xcodebuild -scheme SwiftUI-Notes \ + # -configuration Debug \ + # -sdk iphonesimulator17.0 \ + # -destination 'platform=iOS Simulator,OS=17.5,name=iPhone 14' \ + # test -showBuildTimingSummary