From 1577825585409aec1aba147454857b9df59af772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sun, 2 Jul 2023 13:23:08 +0200 Subject: [PATCH 1/3] GitHub CI: test Xcode 14.3.1, macOS 13 --- .github/workflows/CI.yml | 56 +++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 21 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 35d8640fb..066f4b8bd 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -40,24 +40,32 @@ jobs: fail-fast: false matrix: include: + - xcode: "Xcode_14.3.1.app" + runsOn: macOS-13 + destination: "platform=macOS" + name: "macOS" + - xcode: "Xcode_14.3.1.app" + runsOn: macOS-13 + destination: "OS=16.4,name=iPhone 14 Pro" + name: "iOS" + - xcode: "Xcode_14.3.1.app" + runsOn: macOS-13 + destination: "OS=16.4,name=Apple TV" + name: "tvOS" - xcode: "Xcode_14.2.app" - runsOn: macOS-12 + runsOn: macOS-13 destination: "platform=macOS" name: "macOS" - xcode: "Xcode_14.2.app" - runsOn: macOS-12 + runsOn: macOS-13 destination: "OS=16.2,name=iPhone 14" name: "iOS" - - xcode: "Xcode_14.2.app" - runsOn: macOS-12 - destination: "OS=16.1,name=Apple TV" - name: "tvOS" - xcode: "Xcode_14.1.app" - runsOn: macOS-12 + runsOn: macOS-13 destination: "platform=macOS" name: "macOS" - xcode: "Xcode_14.1.app" - runsOn: macOS-12 + runsOn: macOS-13 destination: "OS=16.1,name=iPhone 14" name: "iOS" - xcode: "Xcode_14.0.1.app" @@ -82,11 +90,14 @@ jobs: fail-fast: false matrix: include: + - xcode: "Xcode_14.3.1.app" + runsOn: macOS-13 + name: "Xcode 14.3.1" - xcode: "Xcode_14.2.app" - runsOn: macOS-12 + runsOn: macOS-13 name: "Xcode 14.2" - xcode: "Xcode_14.1.app" - runsOn: macOS-12 + runsOn: macOS-13 name: "Xcode 14.1" - xcode: "Xcode_14.0.1.app" runsOn: macOS-12 @@ -105,9 +116,12 @@ jobs: fail-fast: false matrix: include: - - xcode: "Xcode_14.2.app" + - xcode: "Xcode_14.3.1.app" + runsOn: macOS-13 + name: "Xcode 14.3.1" + - xcode: "Xcode_14.0.1.app" runsOn: macOS-12 - name: "Xcode 14.2" + name: "Xcode 14.0.1" steps: - uses: actions/checkout@v3 - name: ${{ matrix.name }} @@ -122,9 +136,9 @@ jobs: fail-fast: false matrix: include: - - xcode: "Xcode_14.2.app" - runsOn: macOS-12 - name: "Xcode 14.2" + - xcode: "Xcode_14.3.1.app" + runsOn: macOS-13 + name: "Xcode 14.3.1" - xcode: "Xcode_14.0.1.app" runsOn: macOS-12 name: "Xcode 14.0.1" @@ -142,9 +156,9 @@ jobs: fail-fast: false matrix: include: - - xcode: "Xcode_14.2.app" - runsOn: macOS-12 - name: "Xcode 14.2" + - xcode: "Xcode_14.3.1.app" + runsOn: macOS-13 + name: "Xcode 14.3.1" - xcode: "Xcode_14.0.1.app" runsOn: macOS-12 name: "Xcode 14.0.1" @@ -162,9 +176,9 @@ jobs: fail-fast: false matrix: include: - - xcode: "Xcode_14.2.app" - runsOn: macOS-12 - name: "Xcode 14.2" + - xcode: "Xcode_14.3.1.app" + runsOn: macOS-13 + name: "Xcode 14.3.1" - xcode: "Xcode_14.0.1.app" runsOn: macOS-12 name: "Xcode 14.0.1" From 2bd080799faa8f96b2a15334e3841dbc401603fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sun, 2 Jul 2023 14:08:32 +0200 Subject: [PATCH 2/3] Test universal xcframework --- .github/workflows/CI.yml | 2 +- Makefile | 41 ++++++++++++++++++++++++++++++++++------ 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 066f4b8bd..443234b51 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -185,5 +185,5 @@ jobs: steps: - uses: actions/checkout@v3 - name: ${{ matrix.name }} - run: make test_archive_GRDBOSX_xcframework + run: make test_universal_xcframework \ No newline at end of file diff --git a/Makefile b/Makefile index a794a98b2..4d5da809e 100644 --- a/Makefile +++ b/Makefile @@ -75,7 +75,7 @@ test_framework_darwin: test_framework_GRDB test_framework_GRDBCustom test_framew test_framework_GRDB: test_framework_GRDBOSX test_framework_GRDBiOS test_framework_GRDBtvOS test_framework_GRDBCustom: test_framework_GRDBCustomSQLiteOSX test_framework_GRDBCustomSQLiteiOS test_framework_SQLCipher: test_framework_SQLCipher3 test_framework_SQLCipher3Encrypted test_framework_SQLCipher4 test_framework_SQLCipher4Encrypted -test_archive: test_archive_GRDBOSX_xcframework +test_archive: test_universal_xcframework test_install: test_install_manual test_install_SPM test_install_customSQLite test_install_GRDB_CocoaPods test_CocoaPodsLint test_CocoaPodsLint: test_CocoaPodsLint_GRDB test_demo_apps: test_GRDBDemoiOS test_GRDBCombineDemo test_GRDBAsyncDemo @@ -219,22 +219,51 @@ test_SPM: $(SWIFT) build -c release set -o pipefail && $(SWIFT) test --parallel -test_archive_GRDBOSX_xcframework: +test_universal_xcframework: rm -rf Tests/products mkdir Tests/products $(XCODEBUILD) archive \ -project GRDB.xcodeproj \ -scheme GRDB \ - -configuration Release \ + -destination "generic/platform=iOS" \ + OTHER_SWIFT_FLAGS=$(OTHER_SWIFT_FLAGS) \ + GCC_PREPROCESSOR_DEFINITIONS=$(GCC_PREPROCESSOR_DEFINITIONS) \ + -archivePath "$(PWD)/Tests/products/GRDB-iOS.xcarchive" \ + SKIP_INSTALL=NO \ + BUILD_LIBRARY_FOR_DISTRIBUTION=YES + $(XCODEBUILD) archive \ + -project GRDB.xcodeproj \ + -scheme GRDB \ + -destination "generic/platform=iOS Simulator" \ + OTHER_SWIFT_FLAGS=$(OTHER_SWIFT_FLAGS) \ + GCC_PREPROCESSOR_DEFINITIONS=$(GCC_PREPROCESSOR_DEFINITIONS) \ + -archivePath "$(PWD)/Tests/products/GRDB-iOS_Simulator.xcarchive" \ + SKIP_INSTALL=NO \ + BUILD_LIBRARY_FOR_DISTRIBUTION=YES + $(XCODEBUILD) archive \ + -project GRDB.xcodeproj \ + -scheme GRDB \ -destination "generic/platform=macOS" \ OTHER_SWIFT_FLAGS=$(OTHER_SWIFT_FLAGS) \ GCC_PREPROCESSOR_DEFINITIONS=$(GCC_PREPROCESSOR_DEFINITIONS) \ - -archivePath "$(PWD)/Tests/products/GRDB.xcarchive" \ + -archivePath "$(PWD)/Tests/products/GRDB-macOS.xcarchive" \ + SKIP_INSTALL=NO \ + BUILD_LIBRARY_FOR_DISTRIBUTION=YES + $(XCODEBUILD) archive \ + -project GRDB.xcodeproj \ + -scheme GRDB \ + -destination "generic/platform=macOS,variant=Mac Catalyst" \ + OTHER_SWIFT_FLAGS=$(OTHER_SWIFT_FLAGS) \ + GCC_PREPROCESSOR_DEFINITIONS=$(GCC_PREPROCESSOR_DEFINITIONS) \ + -archivePath "$(PWD)/Tests/products/GRDB-Mac_Catalyst.xcarchive" \ SKIP_INSTALL=NO \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES $(XCODEBUILD) -create-xcframework \ - -framework '$(PWD)/Tests/products/GRDB.xcarchive/Products/Library/Frameworks/GRDB.framework' \ - -output '$(PWD)/Tests/products/GRDB.xcframework' + -archive '$(PWD)/Tests/products/GRDB-iOS.xcarchive' -framework GRDB.framework \ + -archive '$(PWD)/Tests/products/GRDB-iOS_Simulator.xcarchive' -framework GRDB.framework \ + -archive '$(PWD)/Tests/products/GRDB-macOS.xcarchive' -framework GRDB.framework \ + -archive '$(PWD)/Tests/products/GRDB-Mac_Catalyst.xcarchive' -framework GRDB.framework \ + -output '$(PWD)/Tests/products/GRDB.xcframework' test_install_manual: $(XCODEBUILD) \ From 5fca5fdabfaa69a12762b7c1f61ebdf0751cad9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sun, 2 Jul 2023 14:12:12 +0200 Subject: [PATCH 3/3] Force MACOSX_DEPLOYMENT_TARGET on SQLCipher CocoaPods tests Workaround for https://github.com/CocoaPods/CocoaPods/issues/11839 --- Tests/CocoaPods/SQLCipher3/Podfile | 3 +++ Tests/CocoaPods/SQLCipher4/Podfile | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Tests/CocoaPods/SQLCipher3/Podfile b/Tests/CocoaPods/SQLCipher3/Podfile index c8066b3ae..6d99439cf 100644 --- a/Tests/CocoaPods/SQLCipher3/Podfile +++ b/Tests/CocoaPods/SQLCipher3/Podfile @@ -17,6 +17,9 @@ end post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| + # Workaround for Xcode 14.3+ + # https://github.com/CocoaPods/CocoaPods/issues/11839 + config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.13' config.build_settings['GCC_OPTIMIZATION_LEVEL'] = '3' end end diff --git a/Tests/CocoaPods/SQLCipher4/Podfile b/Tests/CocoaPods/SQLCipher4/Podfile index d8cd6ce44..008d26d86 100644 --- a/Tests/CocoaPods/SQLCipher4/Podfile +++ b/Tests/CocoaPods/SQLCipher4/Podfile @@ -17,6 +17,9 @@ end post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| + # Workaround for Xcode 14.3+ + # https://github.com/CocoaPods/CocoaPods/issues/11839 + config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.13' config.build_settings['GCC_OPTIMIZATION_LEVEL'] = '3' end end