Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ jobs:
path: package-dev/Plugins/Android
wait-timeout: 3600

- name: Download Cocoa SDK
uses: vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848 # v4-with-wait-timeout
with:
name: Cocoa-sdk
path: package-dev/Plugins
wait-timeout: 3600

- name: Download Linux SDK
uses: vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848 # v4-with-wait-timeout
with:
Expand All @@ -91,7 +98,7 @@ jobs:
run: docker exec unity dotnet build -c Release

- name: Install assemblyalias
run: docker exec unity dotnet tool install --global Alias --version 0.4.3
run: docker exec unity dotnet tool install --global Alias --version 0.4.3 --allow-roll-forward

- name: Alias editor assemblies
run: docker exec unity /home/gh/.dotnet/tools/assemblyalias --target-directory "package-dev/Editor" --internalize --prefix "Sentry." --assemblies-to-alias "Microsoft*;Mono.Cecil*"
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:
host: ubuntu-latest
- target: Windows
host: windows-latest
- target: Cocoa
host: macos-latest
uses: ./.github/workflows/sdk.yml
with:
target: ${{ matrix.target }}
Expand Down Expand Up @@ -284,7 +286,7 @@ jobs:
# Numbers as string otherwise GH will reformat the runtime numbers removing the fractions.
# Also make sure to match the versions available here:
# - https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
ios-version: ["16.1", latest] # last updated October 2024
ios-version: ["17.0", latest] # last updated October 2024
init-type: ["runtime", "buildtime"]

smoke-test-run:
Expand Down Expand Up @@ -352,7 +354,7 @@ jobs:
run: echo "unityVersion=$(./scripts/ci-env.ps1 "unity${{ matrix.unity-version }}")" >> $env:GITHUB_OUTPUT

- name: Setup Unity
uses: getsentry/setup-unity@d84ad1d1fb3020e48883c3ac8e87d64baf1135c7
uses: getsentry/setup-unity@3bdc8c022b6d30ecf2d21d12a564bfa55a54fa2e
with:
unity-version: ${{ steps.env.outputs.unityVersion }}
unity-modules: ${{ matrix.unity-modules }}
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/format-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ jobs:
-o -name "*.m"
| xargs clang-format -i -style=file

- name: Install .NET SDK
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5
with:
global-json-file: global.json

- name: Restore .NET Workload
run: dotnet workload restore

- name: Format C# Code Whitespace
run: dotnet format whitespace Sentry.Unity.sln --exclude src/sentry-dotnet --verbosity diag

Expand Down
28 changes: 24 additions & 4 deletions .github/workflows/sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
run: |
if [[ "${TARGET}" == "Android" ]]; then
submodules="modules/sentry-java"
elif [[ "${TARGET}" == "Cocoa" ]]; then
submodules=""
else
submodules="modules/sentry-native"
fi
Expand All @@ -59,7 +61,13 @@ jobs:
- name: Get submodule status
run: git submodule status --cached ${{ steps.env.outputs.submodules }} | tee submodules-status

- run: cp -r package-dev/Plugins/${{ env.TARGET }} sdk-static || echo "never mind, no files checked in..."
- run: |
if [[ "${{ env.TARGET }}" == "Cocoa" ]]; then
cp -r package-dev/Plugins/iOS sdk-static/ || echo "never mind, no iOS files checked in..."
cp -r package-dev/Plugins/macOS sdk-static/ || echo "never mind, no macOS files checked in..."
else
cp -r package-dev/Plugins/${{ env.TARGET }} sdk-static || echo "never mind, no files checked in..."
fi
shell: bash

- name: Restore from cache
Expand All @@ -71,7 +79,7 @@ jobs:
# hash of package/package.json for cache busting on release builds (version bump)
path: |
package-dev/Plugins
key: sdk=${{ env.TARGET }}-${{ hashFiles('submodules-status', 'package/package.json', 'Directory.Build.targets', 'sdk-static/**') }}
key: sdk=${{ env.TARGET }}-${{ hashFiles('submodules-status', 'package/package.json', 'Directory.Build.targets', 'sdk-static/**') }}${{ env.TARGET == 'Cocoa' && hashFiles('modules/sentry-cocoa.properties') || '' }}

- name: Installing Linux Dependencies
if: ${{ env.TARGET == 'Linux' && steps.cache.outputs.cache-hit != 'true' }}
Expand All @@ -92,16 +100,28 @@ jobs:
dotnet msbuild /t:Build${{ env.TARGET }}SDK /p:Configuration=Release /p:OutDir=other src/Sentry.Unity

- name: Upload build logs on failure
if: ${{ failure() }}
# No build logs for Cocoa SDK as we assemble the xcframework from a downloaded release artifact
if: ${{ failure() && env.TARGET != 'Cocoa' }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
path: ${{ steps.env.outputs.submodulesPath }}/build.log
# Lower retention period - we only need this to retry CI.
retention-days: 14

- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: ${{ env.TARGET == 'Cocoa' }}
with:
name: ${{ env.TARGET }}-sdk
path: package-dev/Plugins/${{ env.TARGET }}
path: |
package-dev/Plugins/iOS/Sentry.xcframework~
package-dev/Plugins/macOS/Sentry
# Lower retention period - we only need this to retry CI.
retention-days: 14

- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: ${{ env.TARGET != 'Cocoa' }}
with:
name: ${{ env.TARGET }}-sdk
path: package-dev/Plugins/${{ env.TARGET }}
# Lower retention period - we only need this to retry CI.
retention-days: 14
8 changes: 4 additions & 4 deletions .github/workflows/smoke-test-compile-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ defaults:
jobs:
compile:
name: ${{ inputs.unity-version }} ${{ inputs.init-type }}
runs-on: 'macos-latest'
runs-on: 'macos-14' # Pinning to get the oldest, supported version of iOS simulator
env:
UNITY_VERSION: ${{ inputs.unity-version }}
INIT_TYPE: ${{ inputs.init-type }}
Expand All @@ -31,10 +31,10 @@ jobs:
name: testapp-ios-${{ env.UNITY_VERSION }}-${{ env.INIT_TYPE }}

- name: Extract app project
run: tar -xvzf test-app-${env:INIT_TYPE}.tar.gz
run: tar -xvzf "test-app-$env:INIT_TYPE.tar.gz"

- name: iOS smoke test
run: ./scripts/smoke-test-ios.ps1 Build -IsIntegrationTest -UnityVersion "${env:UNITY_VERSION}" -iOSMinVersion "16.1"
run: ./scripts/smoke-test-ios.ps1 Build -IsIntegrationTest -UnityVersion "${env:UNITY_VERSION}" -iOSMinVersion "17.0"
timeout-minutes: 20

- name: Upload integration-test project on failure
Expand Down Expand Up @@ -62,4 +62,4 @@ jobs:
!**/Release-iphonesimulator/*.dSYM
!**/Release-iphonesimulator/UnityFramework.framework/*
# Lower retention period - we only need this to retry CI.
retention-days: 14
retention-days: 14
4 changes: 2 additions & 2 deletions .github/workflows/smoke-test-run-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ defaults:
jobs:
run:
name: ${{ inputs.unity-version }} ${{ inputs.ios-version }} ${{ inputs.init-type }}
runs-on: macos-13 # Pinning to get the oldest, supported version of iOS simulator
runs-on: macos-14 # Pinning to get the oldest, supported version of iOS simulator
# Map the job outputs to step outputs
outputs:
status: ${{ steps.smoke-test.outputs.status }}
Expand All @@ -51,7 +51,7 @@ jobs:
if: ${{ env.IOS_VERSION != 'latest'}}
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # pin@v1.6
with:
xcode-version: '14.1' # to run iOS 16.1 we need Xcode 14.1
xcode-version: '15.0' # to run iOS 17.0 we need Xcode 15.0

- name: Run iOS Smoke Tests
id: smoke-test
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## Unreleased

### Dependencies

- Bump Cocoa SDK from v8.51.0 to v8.57.0 ([#2371](https://github.com/getsentry/sentry-unity/pull/2371))
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8570)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.51.0...8.57.0)

## 3.2.3

### Significant change in behavior
Expand Down
32 changes: 4 additions & 28 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,9 @@ Expected to exist:
<Exec Command="pwsh &quot;$(RepoRoot)scripts/download-sentry-cli.ps1&quot;"></Exec>
</Target>

<!-- Downloads and sets up the Cocoa SDK: dotnet msbuild /t:SetupCocoaSDK src/Sentry.Unity -->
<Target Name="SetupCocoaSDK"
<!-- Build the Cocoa SDK: dotnet msbuild /t:BuildCocoaSDK src/Sentry.Unity -->
<!-- Note: Not actually building the Cocoa SDK - yet. We're downloading the release artifact and extract for iOS and macOS -->
<Target Name="BuildCocoaSDK"
Condition="!$([MSBuild]::IsOSPlatform('Windows')) AND '$(MSBuildProjectName)' == 'Sentry.Unity'
And (!Exists('$(SentryiOSArtifactsDestination)') Or !Exists('$(SentrymacOSArtifactsDestination)Sentry.dylib'))"
BeforeTargets="BeforeBuild">
Expand All @@ -197,34 +198,9 @@ Expected to exist:

<Message Importance="High" Text="Setting up the Cocoa SDK version '$(CocoaVersion)'." />

<!-- Clean cache if version does not exist to get rid of old versions -->
<RemoveDir
Condition="!Exists('$(SentryCocoaCache)Sentry-Dynamic-$(CocoaVersion).xcframework.zip')"
Directories="$(SentryCocoaCache)" />

<!-- Create cache directory -->
<MakeDir Condition="!Exists('$(SentryCocoaCache)')" Directories="$(SentryCocoaCache)" />

<!-- Download the Cocoa SDK as pre-built .xcframework -->
<Exec
Condition="!Exists('$(SentryCocoaCache)Sentry-Dynamic-$(CocoaVersion).xcframework.zip')"
Command="curl -L https://github.com/getsentry/sentry-cocoa/releases/download/$(CocoaVersion)/Sentry-Dynamic.xcframework.zip -o $(SentryCocoaCache)Sentry-Dynamic-$(CocoaVersion).xcframework.zip" />
<Exec Command="pwsh &quot;$(RepoRoot)scripts/setup-cocoa-sdk.ps1&quot; -RepoRoot &quot;$(RepoRoot)&quot; -CocoaVersion &quot;$(CocoaVersion)&quot; -CocoaCache &quot;$(SentryCocoaCache)&quot; -iOSDestination &quot;$(SentryiOSArtifactsDestination)&quot; -macOSDestination &quot;$(SentrymacOSArtifactsDestination)Sentry.dylib&quot;" />

<Exec
Condition="!Exists('$(SentryCocoaCache)Sentry-Dynamic.xcframework')"
Command="unzip -o $(SentryCocoaCache)Sentry-Dynamic-$(CocoaVersion).xcframework.zip -d $(SentryCocoaCache)" />

<!-- Set up the iOS support -->
<ItemGroup>
<!-- Itemgroup for the output Sentry.framework so we have access to '%(RecursiveDir)' when copying -->
<xcframeworkdPath Include="$(SentryCocoaCache)/Sentry-Dynamic.xcframework/**/*" />
</ItemGroup>
<Copy SourceFiles="@(xcframeworkdPath)" DestinationFiles="@(xcframeworkdPath->'$(SentryiOSArtifactsDestination)%(RecursiveDir)%(Filename)%(Extension)')" />
<Error Condition="(!Exists('$(SentryiOSArtifactsDestination)'))" Text="Failed to set up the iOS SDK." />

<!-- Set up the macOS support -->
<Copy SourceFiles="$(SentryCocoaCache)Sentry-Dynamic.xcframework/macos-arm64_arm64e_x86_64/Sentry.framework/Sentry" DestinationFiles="$(SentrymacOSArtifactsDestination)Sentry.dylib" />
<Copy SourceFiles="$(SentryCocoaCache)Sentry-Dynamic.xcframework/macos-arm64_arm64e_x86_64/dSYMs/Sentry.framework.dSYM/Contents/Resources/DWARF/Sentry" DestinationFiles="$(SentrymacOSArtifactsDestination)Sentry.dylib.dSYM" />
<Error Condition="(!Exists('$(SentrymacOSArtifactsDestination)Sentry.dylib') Or !Exists('$(SentrymacOSArtifactsDestination)Sentry.dylib.dSYM'))" Text="Failed to set up the macOS SDK." />
</Target>

Expand Down
3 changes: 3 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"sdk": {
"version": "9.0.301",
"workloadVersion": "9.0.301",
"rollForward": "disable",
"allowPrerelease": false
}
}
2 changes: 1 addition & 1 deletion modules/sentry-cocoa.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = 8.51.0
version = 8.57.0
repo = https://github.com/getsentry/sentry-cocoa
Loading