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] 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) \