getsentry / sentry-cocoa

The official Sentry SDK for iOS, tvOS, macOS, watchOS.
https://sentry.io/for/cocoa/
MIT License
798 stars 314 forks source link

CI: Run a clean project in the simulator targeting SPM for every platform #3778

Open brustolin opened 5 months ago

brustolin commented 5 months ago

Description

Most of our CI today consist in compiling different projects for different targets. The issue https://github.com/getsentry/sentry-cocoa/issues/3763 happened in runtime, which dont happen in our UITests because they embed Sentry directly from the same project.

We need to really open and run a clean app, that adds Sentry Dependency from SPM.

Preferable we should use xcodebuild -create-xcproject <project_name>.xcodeproj so we really have a new project every time that cannot be tempered with in advance.

To add sentry to it we could use the Wizard (we need to try this tho). (Needs user interaction to choose options)

for SPM we need to test Static and Dynamic linking

### Platform x Package Manager matrix
- [ ] iOS with SPM
- [ ] iOS with CocoaPod
- [ ] macCatalyst with SPM
- [ ] macCatalyst with Cocoapod
- [ ] tvOS with SPM
- [ ] tvOS with Cocoapod
- [ ] macOS with SPM
- [ ] macOS with Cocoapod
### Tasks to run per matrix item
- [ ] create new app
- [ ] add Sentry SDK
- [ ] build
- [ ] run
- [ ] validate against App Store
brustolin commented 5 months ago

We can validate an app with

xcrun altool --validate-app
philipphofmann commented 5 months ago

Let's use caching to speed up these GH action workflows. If they are speedy, we can run them for every PR, especially considering the recent interoperability with ObjC to Swift code, which caused numerous problems.

philipphofmann commented 5 months ago

P1 is for iOS only. We can delay CI for the other platforms.

armcknight commented 5 months ago

This will also fix https://github.com/getsentry/sentry-cocoa/issues/3350, closing that to keep this one.