Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
krystofwoldrich committed Jun 22, 2023
2 parents 267921c + f93cfbe commit d1b9f08
Show file tree
Hide file tree
Showing 98 changed files with 377 additions and 14,441 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
dist

# Ignore standalone apps
sample
sample-new-architecture
test/perf/TestApp*

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/buildandtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,20 +180,20 @@ jobs:
uses: actions/cache@v3
id: cache-sample
with:
path: sample/node_modules
key: ${{ runner.os }}-${{ hashFiles('sample/yarn.lock') }}
path: sample-new-architecture/node_modules
key: ${{ runner.os }}-${{ hashFiles('sample-new-architecture/yarn.lock') }}
- name: Install Dependencies
if: ${{ steps.cache.outputs['cache-hit'] != 'true' }}
run: yarn install
- name: Install Sample Dependencies
if: ${{ steps.cache-sample.outputs['cache-hit'] != 'true' }}
run: yarn install
working-directory: sample
working-directory: sample-new-architecture
- name: Build
run: yarn build
- name: Make Sample Build Directory
run: mkdir build
working-directory: sample
working-directory: sample-new-architecture
- name: Bundle
run: |
yarn run react-native bundle \
Expand All @@ -203,4 +203,4 @@ jobs:
--reset-cache \
--bundle-output build/bundle.${{ matrix.platform }}.js \
--sourcemap-output build/bundle.${{ matrix.platform }}.map
working-directory: sample
working-directory: sample-new-architecture
102 changes: 0 additions & 102 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,108 +21,6 @@ jobs:
with:
access_token: ${{ github.token }}

sample:
# Android emulator said to perform best with macos HAXM
runs-on: macos-latest
strategy:
# we want that the matrix keeps running, default is to cancel them if it fails.
fail-fast: false
matrix:
platform: ['ios', 'android']
include:
- platform: ios
runtime: 'latest'
device: 'iPhone 14'
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'

- name: Install Global Dependencies
run: brew install xcbeautify

- name: NPM cache
uses: actions/cache@v3
id: deps-cache
with:
path: |
node_modules
sample/node_modules
key: ${{ github.workflow }}-${{ github.job }}-npm-${{ hashFiles('yarn.lock', 'sample/yarn.lock') }}

- name: iOS cache
if: ${{ matrix.platform == 'ios' }}
uses: actions/cache@v3
with:
path: |
sample/ios/Pods
sample/ios/DerivedData
# Note: we cannot use sample/ios/Podfile.lock because it's not source controlled.
key: ${{ github.workflow }}-${{ github.job }}-ios${{ matrix.runtime }}-${{ hashFiles('yarn.lock', 'sample/yarn.lock') }}

- name: Install Dependencies
if: ${{ steps.deps-cache.outputs['cache-hit'] != 'true' }}
run: yarn install

- name: Build SDK
run: yarn build

- name: Install Sample Dependencies
if: ${{ steps.deps-cache.outputs['cache-hit'] != 'true' }}
working-directory: ./sample
run: yarn install

- run: pod install
if: ${{ matrix.platform == 'ios' }}
env:
PRODUCTION: 1
working-directory: ./sample/ios

- name: Build ${{ matrix.platform }} sample app
if: ${{ env.SENTRY_AUTH_TOKEN != null }}
id: build
working-directory: ./sample/${{ matrix.platform }}
run: |
if [[ "${{ matrix.platform }}" == "android" ]]; then
./gradlew :app:assembleRelease -PreactNativeArchitectures=x86
else
mkdir -p DerivedData
defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES
buildArgs=(
'-destination' 'platform=iOS Simulator,OS=${{ matrix.runtime }},name=${{ matrix.device }}'
'ONLY_ACTIVE_ARCH=yes'
'-derivedDataPath' $(cd "DerivedData" ; pwd -P)
)
echo "buildArgs = ${buildArgs[@]}"
set -o pipefail && xcodebuild \
-workspace sample.xcworkspace \
-configuration Release \
-scheme sample \
"${buildArgs[@]}" \
build \
| tee sample-xcodebuild.log \
| xcbeautify --quieter --is-ci --disable-colored-output
set -o pipefail && xcodebuild \
-project ../node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj \
-scheme WebDriverAgentRunner \
GCC_TREAT_WARNINGS_AS_ERRORS=0 \
COMPILER_INDEX_STORE_ENABLE=NO \
"${buildArgs[@]}" \
build \
| tee webdriveragent-xcodebuild.log \
| xcbeautify --quieter --is-ci --disable-colored-output
fi
- name: Upload logs
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.platform }}-logs
path: ./sample/ios/*.log

metrics:
runs-on: macos-latest
strategy:
Expand Down
119 changes: 119 additions & 0 deletions .github/workflows/sample-application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: Sample Application

on:
push:
branches: [main]
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
RN_SENTRY_POD_NAME: RNSentry

jobs:
cancel-previous-workflow:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 # [email protected]
with:
access_token: ${{ github.token }}

build:
name: Build ${{ matrix.rn-architecture }} ${{ matrix.platform }} ${{ matrix.build-type }}
# Android emulator said to perform best with macos HAXM
runs-on: macos-latest
strategy:
# we want that the matrix keeps running, default is to cancel them if it fails.
fail-fast: false
matrix:
rn-architecture: ['legacy', 'new']
platform: ['android', 'ios']
build-type: ['dev', 'production']
include:
- platform: ios
runtime: 'latest'
device: 'iPhone 14'
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'

- name: Install Global Dependencies
run: brew install xcbeautify

- name: NPM cache
uses: actions/cache@v3
id: deps-cache
with:
path: |
node_modules
sample-new-architecture/node_modules
key: ${{ github.workflow }}-${{ github.job }}-npm-${{ hashFiles('yarn.lock', 'sample-new-architecture/node_modules/yarn.lock') }}

- name: Install SDK Dependencies
if: ${{ steps.deps-cache.outputs['cache-hit'] != 'true' }}
run: yarn install

- name: Build SDK
run: yarn build

- name: Install Sample Dependencies
if: ${{ steps.deps-cache.outputs['cache-hit'] != 'true' }}
working-directory: sample-new-architecture
run: yarn install

- name: Install App Pods
if: ${{ matrix.platform == 'ios' }}
working-directory: sample-new-architecture/ios
run: |
[[ "${{ matrix.build-type }}" == "production" ]] && ENABLE_PROD=1 || ENABLE_PROD=0
[[ "${{ matrix.rn-architecture }}" == "new" ]] && ENABLE_NEW_ARCH=1 || ENABLE_NEW_ARCH=0
echo "ENABLE_PROD=$ENABLE_PROD"
echo "ENABLE_NEW_ARCH=$ENABLE_NEW_ARCH"
PRODUCTION=$ENABLE_PROD RCT_NEW_ARCH_ENABLED=$ENABLE_NEW_ARCH pod install
cat Podfile.lock | grep $RN_SENTRY_POD_NAME
- name: Build Android App
if: ${{ matrix.platform == 'android' }}
working-directory: sample-new-architecture/android
run: |
if [[ ${{ matrix.rn-architecture }} == 'new' ]]; then
perl -i -pe's/newArchEnabled=false/newArchEnabled=true/g' gradle.properties
echo 'New Architecture enabled'
fi
[[ "${{ matrix.build-type }}" == "production" ]] && CONFIG='Release' || CONFIG='Debug'
echo "Building $CONFIG"
./gradlew ":app:assemble$CONFIG" -PreactNativeArchitectures=x86
- name: Build iOS App
if: ${{ matrix.platform == 'ios' }}
working-directory: sample-new-architecture/ios
run: |
[[ "${{ matrix.build-type }}" == "production" ]] && CONFIG='Release' || CONFIG='Debug'
echo "Building $CONFIG"
mkdir -p "DerivedData"
derivedData="$(cd "DerivedData" ; pwd -P)"
set -o pipefail && xcodebuild \
-workspace sampleNewArchitecture.xcworkspace \
-configuration "$CONFIG" \
-scheme sampleNewArchitecture \
-destination 'platform=iOS Simulator,OS=${{ matrix.runtime }},name=${{ matrix.device }}' \
ONLY_ACTIVE_ARCH=yes \
-derivedDataPath "$derivedData" \
build \
| tee xcodebuild.log \
| xcbeautify --quieter --is-ci --disable-colored-output
- name: Upload logs
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: build-sample-${{ matrix.rn-architecture }}-${{ matrix.platform }}-${{ matrix.build-type }}-logs
path: sample-new-architecture/ios/*.log
5 changes: 3 additions & 2 deletions .github/workflows/update-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ jobs:
sample-rn:
uses: getsentry/github-workflows/.github/workflows/updater.yml@v2
with:
path: sample/scripts/update-rn.sh
name: Sample React Native
path: scripts/update-rn.sh
name: React Native
pattern: '^v[0-9.]+$' # only match non-preview versions, also ignores "latest"
pr-strategy: update
changelog-entry: false
secrets:
api-token: ${{ secrets.CI_DEPLOY_KEY }}
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,5 @@ wheelhouse
.yalc/
yalc.lock

# Sample
sample/.vscode/.react/index.bundle
sample/.vscode/.react/index.map
sample/.vscode/.react/debuggerWorker.js

# E2E tests
sample/*.png
test/react-native/versions
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
"editor.formatOnPaste": false,
"editor.formatOnSave": false
},
"react-native-tools.projectRoot": "./sample",
"react-native-tools.projectRoot": "./sample-new-architecture",
"dart.flutterAdbConnectOnChromeOs": false
}
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@

### Features

- Use `android.namespace` to be compatible with AGP 8.x and RN 0.73 ([#3133](https://github.com/getsentry/sentry-react-native/pull/3133))
- Use `android.namespace` for AGP 8 and RN 0.73 ([#3133](https://github.com/getsentry/sentry-react-native/pull/3133))

### Dependencies

- Bump JavaScript SDK from v7.54.0 to v7.56.0 ([#3119](https://github.com/getsentry/sentry-react-native/pull/3119))
- [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#7560)
- [diff](https://github.com/getsentry/sentry-javascript/compare/7.54.0...7.56.0)

## 5.6.0

Expand Down
25 changes: 12 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"lint:eslint": "eslint --config .eslintrc.js .",
"lint:prettier": "prettier --check \"{src,test,scripts}/**/**.ts\"",
"test:watch": "jest --watch",
"run-ios": "cd sample && yarn react-native run-ios",
"run-android": "cd sample && yarn react-native run-android"
"run-ios": "cd sample-new-architecture && yarn react-native run-ios",
"run-android": "cd sample-new-architecture && yarn react-native run-android"
},
"keywords": [
"react-native",
Expand All @@ -55,20 +55,20 @@
"react-native": ">=0.65.0"
},
"dependencies": {
"@sentry/browser": "7.54.0",
"@sentry/browser": "7.56.0",
"@sentry/cli": "2.18.1",
"@sentry/core": "7.54.0",
"@sentry/hub": "7.54.0",
"@sentry/integrations": "7.54.0",
"@sentry/react": "7.54.0",
"@sentry/types": "7.54.0",
"@sentry/utils": "7.54.0"
"@sentry/core": "7.56.0",
"@sentry/hub": "7.56.0",
"@sentry/integrations": "7.56.0",
"@sentry/react": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0"
},
"devDependencies": {
"@sentry-internal/eslint-config-sdk": "7.54.0",
"@sentry-internal/eslint-plugin-sdk": "7.54.0",
"@sentry-internal/eslint-config-sdk": "7.56.0",
"@sentry-internal/eslint-plugin-sdk": "7.56.0",
"@sentry/typescript": "^5.20.1",
"@sentry/wizard": "3.0.0",
"@sentry/wizard": "3.2.3",
"@types/jest": "^29.2.5",
"@types/react": "^18.0.25",
"babel-jest": "^29.3.1",
Expand Down Expand Up @@ -110,7 +110,6 @@
"js"
],
"testPathIgnorePatterns": [
"<rootDir>/sample/",
"<rootDir>/test/e2e/"
],
"testEnvironment": "node",
Expand Down
6 changes: 0 additions & 6 deletions sample/.buckconfig

This file was deleted.

4 changes: 0 additions & 4 deletions sample/.eslintrc.js

This file was deleted.

Loading

0 comments on commit d1b9f08

Please sign in to comment.