diff --git a/.github/actions/buildcocoasdk/action.yml b/.github/actions/buildcocoasdk/action.yml new file mode 100644 index 0000000000..d7dc4066b6 --- /dev/null +++ b/.github/actions/buildcocoasdk/action.yml @@ -0,0 +1,17 @@ +name: Build Native Dependencies +description: Builds Sentry Cocoa SDK with custom Carthage +runs: + using: composite + + steps: + - name: Cache Sentry Cocoa SDK + id: cache-sentry-cocoa + uses: actions/cache@v3 + with: + path: modules/sentry-cocoa/Carthage + key: sentry-cocoa-${{ hashFiles('scripts/build-sentry-cocoa.sh') }}-${{ hashFiles('.git/modules/modules/sentry-cocoa/HEAD') }} + + - name: Build Sentry Cocoa SDK + if: ${{ steps.cache-sentry-cocoa.outputs.cache-hit != 'true' }} + shell: bash + run: scripts/build-sentry-cocoa.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index df1d3c25f9..f3d0d646e3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -204,6 +204,10 @@ jobs: if: ${{ !matrix.container }} uses: ./.github/actions/buildnative + - name: Build Cocoa SDK + if: runner.os == 'macOS' + uses: ./.github/actions/buildcocoasdk + - name: Restore .NET Dependencies run: dotnet restore ${{ matrix.slnf }} --nologo diff --git a/.github/workflows/device-tests-ios.yml b/.github/workflows/device-tests-ios.yml index c56226bdb6..4cfc8fef4d 100644 --- a/.github/workflows/device-tests-ios.yml +++ b/.github/workflows/device-tests-ios.yml @@ -27,6 +27,9 @@ jobs: with: submodules: recursive + - name: Build Cocoa SDK + uses: ./.github/actions/buildcocoasdk + - name: Setup Environment uses: ./.github/actions/environment diff --git a/.github/workflows/update-deps.yml b/.github/workflows/update-deps.yml index 626240a456..aee9bb85ed 100644 --- a/.github/workflows/update-deps.yml +++ b/.github/workflows/update-deps.yml @@ -15,7 +15,7 @@ jobs: matrix: include: - name: Cocoa SDK - path: modules/sentry-cocoa.properties + path: modules/sentry-cocoa - name: Java SDK path: scripts/update-java.ps1 - name: Native SDK diff --git a/.gitignore b/.gitignore index 23c230d87a..6644a9ce1b 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,3 @@ test/**/*.apk *.log .sentry-native **/EnvironmentVariables.g.cs - -# Download cache for Cocoa SDK -modules/sentry-cocoa diff --git a/.gitmodules b/.gitmodules index 71bd96d198..172d270909 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,9 @@ [submodule "modules/Ben.Demystifier"] path = modules/Ben.Demystifier url = https://github.com/getsentry/Ben.Demystifier +[submodule "modules/sentry-cocoa"] + path = modules/sentry-cocoa + url = https://github.com/getsentry/sentry-cocoa.git [submodule "modules/perfview"] path = modules/perfview url = https://github.com/getsentry/perfview.git diff --git a/Sentry.sln b/Sentry.sln index 3730377a46..a1312136c3 100644 --- a/Sentry.sln +++ b/Sentry.sln @@ -156,9 +156,6 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SingleFileTestApp", "test\SingleFileTestApp\SingleFileTestApp.csproj", "{162A1CAE-ACEE-45CA-A6D0-7702ADE4D3DE}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "modules", "modules", "{A3CCA27E-4DF8-479D-833C-CAA0950715AA}" - ProjectSection(SolutionItems) = preProject - modules\sentry-cocoa.properties = modules\sentry-cocoa.properties - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TraceEvent", "modules\perfview\src\TraceEvent\TraceEvent.csproj", "{67269916-C417-4CEE-BD7D-CA66C3830AEE}" EndProject diff --git a/modules/sentry-cocoa b/modules/sentry-cocoa new file mode 160000 index 0000000000..50699cb682 --- /dev/null +++ b/modules/sentry-cocoa @@ -0,0 +1 @@ +Subproject commit 50699cb682a6821c257009158bc9b3d41d48a81e diff --git a/modules/sentry-cocoa.properties b/modules/sentry-cocoa.properties deleted file mode 100644 index d4dde9863e..0000000000 --- a/modules/sentry-cocoa.properties +++ /dev/null @@ -1,2 +0,0 @@ -version = 8.56.0 -repo = https://github.com/getsentry/sentry-cocoa diff --git a/samples/Sentry.Samples.Maui/MainPage.xaml b/samples/Sentry.Samples.Maui/MainPage.xaml index f9fcdbd562..7eb477deac 100644 --- a/samples/Sentry.Samples.Maui/MainPage.xaml +++ b/samples/Sentry.Samples.Maui/MainPage.xaml @@ -55,6 +55,12 @@ Clicked="OnUnhandledExceptionClicked" HorizontalOptions="Center" /> +