diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 47902f58fac..7ad17026a2d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -127,6 +127,9 @@ jobs: pattern: xcframework-${{github.sha}}-sentry-swiftui path: Carthage/ - run: ./scripts/ci-select-xcode.sh 16.4 + - name: Unzip all XCFrameworks + run: | + find Carthage -name "*.xcframework.zip" -print0 | xargs -t0I @ unzip @ -d Carthage - run: make build-xcframework-sample - name: Run CI Diagnostics if: failure() diff --git a/.gitignore b/.gitignore index 5df579c8beb..2c055947428 100644 --- a/.gitignore +++ b/.gitignore @@ -44,8 +44,6 @@ Packages Carthage/Build Carthage/Checkouts Carthage -Sentry.Carthage.json -SentrySwiftUI.Carthage.json # CocoaPods Examples/**/Pods diff --git a/Brewfile-ci-deploy b/Brewfile-ci-deploy deleted file mode 100644 index a56b4f9953b..00000000000 --- a/Brewfile-ci-deploy +++ /dev/null @@ -1 +0,0 @@ -brew 'carthage' diff --git a/Makefile b/Makefile index b4850f916a5..fd943a9b351 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .PHONY: init -init: init-local init-ci-build init-ci-deploy init-ci-format +init: init-local init-ci-build init-ci-format .PHONY: init-local init-local: @@ -17,11 +17,6 @@ init-local: .PHONY: init-ci-build init-ci-build: brew bundle --file Brewfile-ci-build - -# installs the tools needed to run CI deploy tasks locally (note that carthage is preinstalled in github actions) -.PHONY: init-ci-deploy -init-ci-deploy: - brew bundle --file Brewfile-ci-deploy # installs the tools needed to run CI format tasks locally .PHONY: init-ci-format @@ -131,21 +126,16 @@ analyze: exit 1; \ fi -# Since Carthage 0.38.0 we need to create separate .framework.zip and .xcframework.zip archives. -# After creating the zips we create a JSON to be able to test Carthage locally. -# For more info check out: https://github.com/Carthage/Carthage/releases/tag/0.38.0 build-xcframework: - @echo "--> Carthage: creating Sentry xcframework" + @echo "--> Creating Sentry xcframework" ./scripts/build-xcframework-local.sh | tee build-xcframework.log build-signed-xcframework: - @echo "--> Carthage: creating Signed Sentry xcframework" + @echo "--> Creating Signed Sentry xcframework" ./scripts/build-xcframework-local.sh | tee build-xcframework.log build-xcframework-sample: - ./scripts/create-carthage-json.sh - cd Samples/Carthage-Validation/XCFramework/ && carthage update --use-xcframeworks - xcodebuild -project "Samples/Carthage-Validation/XCFramework/XCFramework.xcodeproj" -configuration Release CODE_SIGNING_ALLOWED="NO" build + xcodebuild -project "Samples/XCFramework-Validation/XCFramework.xcodeproj" -configuration Release CODE_SIGNING_ALLOWED="NO" build # call this like `make bump-version TO=5.0.0-rc.0` bump-version: clean-version-bump diff --git a/Samples/Carthage-Validation/README.md b/Samples/Carthage-Validation/README.md deleted file mode 100644 index e1699f20316..00000000000 --- a/Samples/Carthage-Validation/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Carthage Samples - -This directory contains samples to validate installing the SDK via Carthage. - -Carthage can resolve a dependency by downloading the source code into `Carthage/Checkouts` or downloading a pre-compiled framework. The library authors can either attach the pre-compiled framework to a GitHub release or use a [binary project specification][1] for binary-only frameworks that don't provide the source code. -Carthage encourages its users [to use XCFrameworks][2] since version 0.37.0, released in January 2021. - -Given the above, there are three different ways of installing a dependency via Carthage: - -1. pre-compiled XCFramework -2. pre-compiled framework (Dropped support for that in 8.0.0) -3. downloading the source code - -Since Carthage only downloads the source code if no pre-compiled binaries are available and we upload these binaries for every release, we only have to validate the first way. - -Take a look at [GitHub Actions](../../.github/workflows/build.yml) to see how the validation works. - -[1]: https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#binary-project-specification -[2]: https://github.com/Carthage/Carthage#getting-started diff --git a/Samples/Carthage-Validation/XCFramework/Cartfile b/Samples/Carthage-Validation/XCFramework/Cartfile deleted file mode 100644 index ed13ea1e678..00000000000 --- a/Samples/Carthage-Validation/XCFramework/Cartfile +++ /dev/null @@ -1,2 +0,0 @@ -binary "../Sentry.Carthage.json" ~> 1.0 -binary "../SentrySwiftUI.Carthage.json" ~> 1.0 diff --git a/Samples/Carthage-Validation/XCFramework/XCFramework.xcodeproj/project.pbxproj b/Samples/XCFramework-Validation/XCFramework.xcodeproj/project.pbxproj similarity index 96% rename from Samples/Carthage-Validation/XCFramework/XCFramework.xcodeproj/project.pbxproj rename to Samples/XCFramework-Validation/XCFramework.xcodeproj/project.pbxproj index 2809479991d..7c18e827558 100644 --- a/Samples/Carthage-Validation/XCFramework/XCFramework.xcodeproj/project.pbxproj +++ b/Samples/XCFramework-Validation/XCFramework.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 60; objects = { /* Begin PBXBuildFile section */ @@ -36,7 +36,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 1573CAE22BBCA4820018A2B7 /* SentrySwiftUI.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = SentrySwiftUI.xcframework; path = Carthage/Build/SentrySwiftUI.xcframework; sourceTree = ""; }; + 1573CAE22BBCA4820018A2B7 /* SentrySwiftUI.xcframework */ = {isa = PBXFileReference; expectedSignature = "AppleDeveloperProgram:97JCY7859U:GetSentry LLC"; lastKnownFileType = wrapper.xcframework; name = SentrySwiftUI.xcframework; path = ../../Carthage/SentrySwiftUI.xcframework; sourceTree = ""; }; 1573CAE62BBCA8260018A2B7 /* CheckTracedView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckTracedView.swift; sourceTree = ""; }; 7BA13E2E267B3F5200DEE308 /* XCFramework.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = XCFramework.app; sourceTree = BUILT_PRODUCTS_DIR; }; 7BA13E31267B3F5200DEE308 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -46,7 +46,7 @@ 7BA13E3A267B3F5400DEE308 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 7BA13E3D267B3F5400DEE308 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 7BA13E3F267B3F5400DEE308 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 7BA13E46267B4A2D00DEE308 /* Sentry.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Sentry.xcframework; path = Carthage/Build/Sentry.xcframework; sourceTree = ""; }; + 7BA13E46267B4A2D00DEE308 /* Sentry.xcframework */ = {isa = PBXFileReference; expectedSignature = "AppleDeveloperProgram:97JCY7859U:GetSentry LLC"; lastKnownFileType = wrapper.xcframework; name = Sentry.xcframework; path = ../../Carthage/Sentry.xcframework; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ diff --git a/Samples/Carthage-Validation/XCFramework/XCFramework.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Samples/XCFramework-Validation/XCFramework.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from Samples/Carthage-Validation/XCFramework/XCFramework.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to Samples/XCFramework-Validation/XCFramework.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/Samples/Carthage-Validation/XCFramework/XCFramework.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Samples/XCFramework-Validation/XCFramework.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from Samples/Carthage-Validation/XCFramework/XCFramework.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to Samples/XCFramework-Validation/XCFramework.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Samples/Carthage-Validation/XCFramework/XCFramework/AppDelegate.swift b/Samples/XCFramework-Validation/XCFramework/AppDelegate.swift similarity index 100% rename from Samples/Carthage-Validation/XCFramework/XCFramework/AppDelegate.swift rename to Samples/XCFramework-Validation/XCFramework/AppDelegate.swift diff --git a/Samples/Carthage-Validation/XCFramework/XCFramework/Assets.xcassets/AccentColor.colorset/Contents.json b/Samples/XCFramework-Validation/XCFramework/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from Samples/Carthage-Validation/XCFramework/XCFramework/Assets.xcassets/AccentColor.colorset/Contents.json rename to Samples/XCFramework-Validation/XCFramework/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/Samples/Carthage-Validation/XCFramework/XCFramework/Assets.xcassets/AppIcon.appiconset/Contents.json b/Samples/XCFramework-Validation/XCFramework/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from Samples/Carthage-Validation/XCFramework/XCFramework/Assets.xcassets/AppIcon.appiconset/Contents.json rename to Samples/XCFramework-Validation/XCFramework/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/Samples/Carthage-Validation/XCFramework/XCFramework/Assets.xcassets/Contents.json b/Samples/XCFramework-Validation/XCFramework/Assets.xcassets/Contents.json similarity index 100% rename from Samples/Carthage-Validation/XCFramework/XCFramework/Assets.xcassets/Contents.json rename to Samples/XCFramework-Validation/XCFramework/Assets.xcassets/Contents.json diff --git a/Samples/Carthage-Validation/XCFramework/XCFramework/Base.lproj/LaunchScreen.storyboard b/Samples/XCFramework-Validation/XCFramework/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from Samples/Carthage-Validation/XCFramework/XCFramework/Base.lproj/LaunchScreen.storyboard rename to Samples/XCFramework-Validation/XCFramework/Base.lproj/LaunchScreen.storyboard diff --git a/Samples/Carthage-Validation/XCFramework/XCFramework/CheckTracedView.swift b/Samples/XCFramework-Validation/XCFramework/CheckTracedView.swift similarity index 100% rename from Samples/Carthage-Validation/XCFramework/XCFramework/CheckTracedView.swift rename to Samples/XCFramework-Validation/XCFramework/CheckTracedView.swift diff --git a/Samples/Carthage-Validation/XCFramework/XCFramework/ContentView.swift b/Samples/XCFramework-Validation/XCFramework/ContentView.swift similarity index 100% rename from Samples/Carthage-Validation/XCFramework/XCFramework/ContentView.swift rename to Samples/XCFramework-Validation/XCFramework/ContentView.swift diff --git a/Samples/Carthage-Validation/XCFramework/XCFramework/Info.plist b/Samples/XCFramework-Validation/XCFramework/Info.plist similarity index 100% rename from Samples/Carthage-Validation/XCFramework/XCFramework/Info.plist rename to Samples/XCFramework-Validation/XCFramework/Info.plist diff --git a/Samples/Carthage-Validation/XCFramework/XCFramework/Preview Content/Preview Assets.xcassets/Contents.json b/Samples/XCFramework-Validation/XCFramework/Preview Content/Preview Assets.xcassets/Contents.json similarity index 100% rename from Samples/Carthage-Validation/XCFramework/XCFramework/Preview Content/Preview Assets.xcassets/Contents.json rename to Samples/XCFramework-Validation/XCFramework/Preview Content/Preview Assets.xcassets/Contents.json diff --git a/Samples/Carthage-Validation/XCFramework/XCFramework/SceneDelegate.swift b/Samples/XCFramework-Validation/XCFramework/SceneDelegate.swift similarity index 100% rename from Samples/Carthage-Validation/XCFramework/XCFramework/SceneDelegate.swift rename to Samples/XCFramework-Validation/XCFramework/SceneDelegate.swift diff --git a/Sentry.xcodeproj/project.pbxproj b/Sentry.xcodeproj/project.pbxproj index 46c011026f2..82151706668 100644 --- a/Sentry.xcodeproj/project.pbxproj +++ b/Sentry.xcodeproj/project.pbxproj @@ -1957,7 +1957,6 @@ 846D3F0E2E286ECF00D4E7E3 /* Unit_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Unit_Tests.swift; sourceTree = ""; }; 846D3F102E286ECF00D4E7E3 /* DuplicatedSDKTest.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = DuplicatedSDKTest.xcodeproj; sourceTree = ""; }; 846D3F112E286ECF00D4E7E3 /* DuplicatedSDKTest.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = DuplicatedSDKTest.xctestplan; sourceTree = ""; }; - 846F90332D56F59D009E86C1 /* Brewfile-ci-deploy */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; path = "Brewfile-ci-deploy"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 848214B42E32B10900DF6998 /* SwiftUITestSample_Crash.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = SwiftUITestSample_Crash.xctestplan; sourceTree = ""; }; 848214B52E32B10900DF6998 /* SwiftUITestSample_Envelope.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = SwiftUITestSample_Envelope.xctestplan; sourceTree = ""; }; 848A45172BBF8D33006AAAEC /* SentryContinuousProfiler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryContinuousProfiler.h; path = ../include/SentryContinuousProfiler.h; sourceTree = ""; }; @@ -4707,7 +4706,6 @@ 843BD6282AD8752300B0098F /* .clang-format */, 844DA80B28246D5000E6B62E /* Brewfile */, 8452E77D2DBC43CF0087020B /* Brewfile-ci-build */, - 846F90332D56F59D009E86C1 /* Brewfile-ci-deploy */, 846628B82DF0E52C00F11CD9 /* Brewfile-ci-format */, ); name = Aux; diff --git a/scripts/create-carthage-json.sh b/scripts/create-carthage-json.sh deleted file mode 100755 index c0279c97696..00000000000 --- a/scripts/create-carthage-json.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -set -euo pipefail - -echo "{ \"1.0\": \"file://$(pwd)/Carthage/Sentry.framework.zip?alt=file://$(pwd)/Carthage/Sentry.xcframework.zip\" }" > ./Samples/Carthage-Validation/Sentry.Carthage.json -echo "{ \"1.0\": \"file://$(pwd)/Carthage/SentrySwiftUI.framework.zip?alt=file://$(pwd)/Carthage/SentrySwiftUI.xcframework.zip\" }" > ./Samples/Carthage-Validation/SentrySwiftUI.Carthage.json