Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getsentry/sentry-cocoa
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8.44.0
Choose a base ref
...
head repository: getsentry/sentry-cocoa
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8.46.0
Choose a head ref
Loading
Showing 516 changed files with 98,791 additions and 89,651 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @philipphofmann @brustolin @armcknight @philprime
* @philipphofmann @armcknight @philprime
2 changes: 1 addition & 1 deletion .github/last-release-runid
Original file line number Diff line number Diff line change
@@ -1 +1 @@
13055337413
13601083784
70 changes: 51 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -7,17 +7,17 @@ on:

pull_request:
paths:
- 'Sources/**'
- 'test-server/**'
- 'Samples/**'
- '.github/workflows/build.yml'
- 'fastlane/**'
- 'scripts/ci-select-xcode.sh'
- "Sources/**"
- "test-server/**"
- "Samples/**"
- ".github/workflows/build.yml"
- "fastlane/**"
- "scripts/ci-select-xcode.sh"
- Sentry.xcworkspace/**
- Sentry.xcodeproj/**
- Gemfile.lock
- 'Package.swift'
- 'scripts/build-xcframework.sh'
- "Package.swift"
- "scripts/build-xcframework.sh"

# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
@@ -85,33 +85,33 @@ jobs:
build-xcframework:
name: Build XCFramework
# The macos-13 uses an Intel processor and doesn't compile the XCFramework for visionOS.
# The macos-13 uses an Intel processor and doesn't compile the XCFramework for visionOS.
# The large image compiles on arm64 and successfully creates the XCFramework for visionOS.
runs-on: macos-13-xlarge
steps:
- uses: actions/checkout@v4
- run: ./scripts/ci-select-xcode.sh 15.2
- run: echo "FRAMEWORK_RUN_ID=$(./scripts/xcframework-generated-run.sh)" >> $GITHUB_ENV

- uses: actions/download-artifact@v4
if: startsWith(github.ref, 'refs/heads/release/')
with:
name: xcframeworks.zip
path: Carthage/
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ env.FRAMEWORK_RUN_ID }}

- name: Check XCFramework
#We dont compile the framework during releases to not change the artefact SHA value
#instead we use the one archive as an artefact
if: startsWith(github.ref, 'refs/heads/release/')
# We dont compile the framework during releases to not change the artefact SHA value
# instead we use the one archive as an artefact
if: startsWith(github.ref, 'refs/heads/release/')
run: |
ls -R Carthage
if [ ! -f Carthage/Sentry.xcframework.zip ]; then
echo "XCFramework is not available"
exit 1
fi
- name: Build xcframework
if: startsWith(github.ref, 'refs/heads/release/') == false
run: make build-xcframework
@@ -212,7 +212,15 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build for Debug
run: ./scripts/xcode-test.sh "iOS" "latest" $GITHUB_REF_NAME build "iPhone 14" DebugWithoutUIKit uikit-check-build
run: |
./scripts/sentry-xcodebuild.sh \
--platform iOS \
--os latest \
--ref ${{ github.ref }} \
--command build \
--device "iPhone 14" \
--configuration DebugWithoutUIKit \
--derived-data uikit-check-build
- name: Ensure UIKit is not linked
run: ./scripts/check-uikit-linkage.sh DebugWithoutUIKit uikit-check-build unlinked SentryWithoutUIKit

@@ -222,7 +230,15 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build for Release
run: ./scripts/xcode-test.sh "iOS" "latest" $GITHUB_REF_NAME build "iPhone 14" ReleaseWithoutUIKit uikit-check-build
run: |
./scripts/sentry-xcodebuild.sh \
--platform iOS \
--os latest \
--ref ${{ github.ref }} \
--command build \
--device "iPhone 14" \
--configuration ReleaseWithoutUIKit \
--derived-data uikit-check-build
- name: Ensure UIKit is not linked
run: ./scripts/check-uikit-linkage.sh ReleaseWithoutUIKit uikit-check-build unlinked SentryWithoutUIKit

@@ -232,7 +248,15 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build for Debug
run: ./scripts/xcode-test.sh "iOS" "latest" $GITHUB_REF_NAME build "iPhone 14" Debug uikit-check-build
run: |
./scripts/sentry-xcodebuild.sh \
--platform iOS \
--os latest \
--ref ${{ github.ref }} \
--command build \
--device "iPhone 14" \
--configuration Debug \
--derived-data uikit-check-build
- name: Ensure UIKit is linked
run: ./scripts/check-uikit-linkage.sh Debug uikit-check-build linked Sentry

@@ -242,6 +266,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build for Release
run: ./scripts/xcode-test.sh "iOS" "latest" $GITHUB_REF_NAME build "iPhone 14" Release uikit-check-build
run: |
./scripts/sentry-xcodebuild.sh \
--platform iOS \
--os latest \
--ref ${{ github.ref }} \
--command build \
--device "iPhone 14" \
--configuration Release \
--derived-data uikit-check-build
- name: Ensure UIKit is linked
run: ./scripts/check-uikit-linkage.sh Release uikit-check-build linked Sentry
5 changes: 5 additions & 0 deletions .github/workflows/format-code.yml
Original file line number Diff line number Diff line change
@@ -21,6 +21,11 @@ jobs:
- name: Install Clang-Format
run: brew install clang-format
- run: swiftlint --version
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: corepack enable
- run: yarn install
- name: Format Code
run: make format

46 changes: 46 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CocoaPods Integration Tests
on:
push:
branches:
- main

pull_request:
paths:
- ".github/workflows/integration-test.yml"
- "*.xcodeproj"
- "*.xcworkspace"
- "Samples/iOS-Cocoapods-*/**"
- "scripts/ci-select-xcode.sh"
- "Sources/**"

# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
cocoapods:
name: Integration Test
runs-on: macos-15
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Select Xcode
run: ./scripts/ci-select-xcode.sh 16

- name: Setup Ruby
uses: ruby/setup-ruby@32110d4e311bd8996b2a82bf2a43b714ccc91777 # v1.221.0
with:
bundler-cache: true

- name: Run Integration Test
run: bundle exec fastlane cocoapods_integration_test
working-directory: Samples/iOS-Cocoapods-Swift6

- name: Upload Result Bundle
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: integration-test-iOS-Cocoapods-Swift6.xcresult
path: fastlane/test_results/results.xcresult
20 changes: 18 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -10,7 +10,9 @@ on:
- "Samples/**"
- ".github/workflows/lint.yml"
- "scripts/ci-select-xcode.sh"

- "*.json"
- "*.md"

pull_request:
paths:
- "Sources/**"
@@ -22,7 +24,9 @@ on:
- "Sentry.xcodeproj/**"
- "*.podspec"
- "Gemfile.lock"

- "*.json"
- "*.md"

# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -82,3 +86,15 @@ jobs:
- uses: actions/checkout@v4
- run: brew install shellcheck
- run: shellcheck **/*.sh

lint-prettier:
name: Run Prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: corepack enable
- run: yarn install
- run: yarn prettier --check --ignore-unknown --config .prettierrc "**/*.{md,json}"
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Release
run-name: Release ${{ github.event.inputs.version }}

on:
workflow_dispatch:
inputs:
@@ -45,7 +47,7 @@ jobs:
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1
uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
52 changes: 39 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -15,9 +15,10 @@ on:
- "fastlane/**"
- "scripts/tests-with-thread-sanitizer.sh"
- "scripts/ci-select-xcode.sh"
- "scripts/xcode-test.sh"
- "scripts/sentry-xcodebuild.sh"
- ".codecov.yml"
- Sentry.xcodeproj
- "Sentry.xcodeproj"
- "**/*.xctestplan"

# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
@@ -85,23 +86,23 @@ jobs:
test-destination-os: "16.4"
device: "iPhone 14"
scheme: "Sentry"

# iOS 17
- runs-on: macos-14
platform: "iOS"
xcode: "15.4"
test-destination-os: "17.2"
device: "iPhone 15"
scheme: "Sentry"

# iOS 18
- runs-on: macos-15
platform: "iOS"
xcode: "16.2"
test-destination-os: "18.2"
device: "iPhone 16"
scheme: "Sentry"

# We don't run the unit tests on macOS 13 cause we run them on all on GH actions available iOS versions.
# The chance of missing a bug solely on tvOS 16 that doesn't occur on iOS, macOS 12 or macOS 14 is minimal.
# We are running tests on macOS 14 and later, as there were OS-internal changes introduced in succeeding versions.
@@ -112,14 +113,14 @@ jobs:
xcode: "15.4"
test-destination-os: "latest"
scheme: "Sentry"

# macOS 15
- runs-on: macos-15
platform: "macOS"
xcode: "16.2"
test-destination-os: "latest"
scheme: "Sentry"

# Catalyst. We test the latest version, as the risk something breaking on Catalyst and not
# on an older iOS or macOS version is low.
# In addition we are running tests on macOS 14, as there were OS-internal changes introduced in succeeding versions.
@@ -128,7 +129,7 @@ jobs:
xcode: "15.4"
test-destination-os: "latest"
scheme: "Sentry"

- runs-on: macos-15
platform: "Catalyst"
xcode: "16.2"
@@ -145,8 +146,8 @@ jobs:
xcode: "15.4"
test-destination-os: "17.5"
scheme: "Sentry"
# iOS 17

# iOS 17
- runs-on: macos-14
platform: "iOS"
xcode: "15.4"
@@ -185,14 +186,39 @@ jobs:
# We split building and running tests in two steps so we know how long running the tests takes.
- name: Build tests
id: build_tests
run: ./scripts/xcode-test.sh ${{matrix.platform}} ${{matrix.test-destination-os}} $GITHUB_REF_NAME build-for-testing "${{matrix.device}}" TestCI ${{matrix.scheme}}
run: |
./scripts/sentry-xcodebuild.sh \
--platform ${{matrix.platform}} \
--os ${{matrix.test-destination-os}} \
--ref ${{ github.ref_name }} \
--command build-for-testing \
--device "${{matrix.device}}" \
--configuration TestCI \
--scheme ${{matrix.scheme}}
- name: Run tests
# We call a script with the platform so the destination
# passed to xcodebuild doesn't end up in the job name,
# because GitHub Actions don't provide an easy way of
# manipulating string in expressions.
run: ./scripts/xcode-test.sh ${{matrix.platform}} ${{matrix.test-destination-os}} $GITHUB_REF_NAME test-without-building "${{matrix.device}}" TestCI ${{matrix.scheme}}
run: |
./scripts/sentry-xcodebuild.sh \
--platform ${{matrix.platform}} \
--os ${{matrix.test-destination-os}} \
--ref ${{ github.ref_name }} \
--command test-without-building \
--device "${{matrix.device}}" \
--configuration TestCI \
--scheme ${{matrix.scheme}}
- name: Publish Test Report
uses: mikepenz/action-junit-report@b14027d33d3a745ccc4d6a12f649e83110b5a373 # v5.4.0
if: always()
with:
report_paths: "build/reports/junit.xml"
fail_on_failure: true
fail_on_parse_error: true
detailed_summary: true

- name: Slowest Tests
if: ${{ always() }}
@@ -255,7 +281,7 @@ jobs:
runs-on: macos-13
timeout-minutes: 20
needs: [build-test-server]

# There are several ways this test can flake. Sometimes threaded tests will just hang and the job will time out, other times waiting on expectations will take much longer than in a non-TSAN run and the test case will fail. We're making this nonfailable and will grep the logs to extract any actual thread sanitizer warnings to push to the PR, and ignore everything else.
continue-on-error: true

3 changes: 2 additions & 1 deletion .github/workflows/testflight.yml
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ on:
push:
branches:
- main
- release/**

paths:
- 'Sources/**'
@@ -19,7 +20,7 @@ on:
jobs:
upload_to_testflight:
name: Build and Upload iOS-Swift to Testflight
runs-on: macos-13
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- run: ./scripts/ci-select-xcode.sh 15.2
Loading