From 8e2b1db4f6b27eec05552f60c2f61dfa69fc8d98 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Fri, 9 Dec 2022 13:47:23 +0100 Subject: [PATCH 1/5] Squashed - rn versions ci builds --- .eslintrc.js | 10 ++ .github/workflows/e2e.yml | 145 +++++++++++++++++++++++++++- .gitignore | 1 + package.json | 2 +- sample/package.json | 4 +- sample/yarn.lock | 40 +++++++- test/react-native/rn.patch | 44 +++++++++ test/react-native/rn.patch.xcode.js | 114 ++++++++++++++++++++++ 8 files changed, 352 insertions(+), 8 deletions(-) create mode 100644 test/react-native/rn.patch create mode 100755 test/react-native/rn.patch.xcode.js diff --git a/.eslintrc.js b/.eslintrc.js index 3da59788d5..c1aaf99880 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -12,6 +12,9 @@ module.exports = { settings: { version: 'detect', // React version. "detect" automatically picks the version you have installed. }, + ignorePatterns: [ + 'test/react-native/versions/*', + ], overrides: [ { // Typescript Files @@ -44,6 +47,13 @@ module.exports = { 'no-console': 'off', }, }, + { + // RN Versions Test Tools + files: ['test/react-native/*'], + parserOptions: { + ecmaVersion: 2017, + }, + } ], rules: { // Bundle size isn't too much of an issue for React Native. diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index e4c5b0cf45..013810fe93 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -13,9 +13,18 @@ env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} jobs: + cancel-previous-workflow: + runs-on: ubuntu-latest + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 # pin@0.11.0 + with: + access_token: ${{ github.token }} + device-test: # Android emulator said to perform best with macos HAXM runs-on: macos-latest + if: ${{ secrets.SENTRY_AUTH_TOKEN }} != null strategy: # we want that the matrix keeps running, default is to cancel them if it fails. fail-fast: false @@ -90,7 +99,6 @@ jobs: TEST: true - name: Build ${{ matrix.platform }} sample app - if: env.SENTRY_AUTH_TOKEN != null id: build working-directory: ./sample/${{ matrix.platform }} run: | @@ -99,10 +107,26 @@ jobs: else mkdir -p DerivedData defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES - buildArgs=('-destination' 'platform=iOS Simulator,name=${{ matrix.device }}' 'ONLY_ACTIVE_ARCH=yes' '-sdk' 'iphonesimulator${{ matrix.runtime }}' '-derivedDataPath' $(cd "DerivedData" ; pwd -P)) + buildArgs=( + '-destination' 'platform=iOS Simulator,name=${{ matrix.device }}' + 'ONLY_ACTIVE_ARCH=yes' + '-sdk' 'iphonesimulator${{ matrix.runtime }}' + '-derivedDataPath' $(cd "DerivedData" ; pwd -P) + ) echo "buildArgs = ${buildArgs[@]}" - xcodebuild -workspace sample.xcworkspace -configuration Release -scheme sample "${buildArgs[@]}" build - xcodebuild -project ../node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO "${buildArgs[@]}" build + xcodebuild \ + -workspace sample.xcworkspace \ + -configuration Release \ + -scheme sample \ + "${buildArgs[@]}" \ + build + xcodebuild \ + -project ../node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj \ + -scheme WebDriverAgentRunner \ + GCC_TREAT_WARNINGS_AS_ERRORS=0 \ + COMPILER_INDEX_STORE_ENABLE=NO \ + "${buildArgs[@]}" \ + build fi - name: Start Appium Server @@ -262,3 +286,116 @@ jobs: config: ./test/perf/metrics-${{ matrix.platform }}.yml sauce-user: ${{ secrets.SAUCE_USERNAME }} sauce-key: ${{ secrets.SAUCE_ACCESS_KEY }} + + react-native-build: + name: Build RN ${{ matrix.rn-version }} ${{ matrix.rn-architecture }} ${{ matrix.platform }} ${{ matrix.build-type }} + runs-on: macos-latest + if: ${{ secrets.SENTRY_AUTH_TOKEN }} != null + env: + RN_DIFF_REPOSITORY: https://github.com/react-native-community/rn-diff-purge.git + strategy: + fail-fast: false # keeps matrix running if one fails + matrix: + rn-version: ['0.64.4', '0.70.6'] + rn-architecture: ['legacy'] + platform: ['android', 'ios'] + build-type: ['dev', 'production'] + include: + - platform: ios + runtime: '16.0' + device: 'iPhone 14' + # exclude all rn versions lower than 0.70.0 for new architecture + exclude: + - rn-version: '0.64.4' + rn-architecture: 'new' + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'adopt' + + - name: Setup JS Tools + run: yarn global add yalc semver + + - name: NPM cache SDK + uses: actions/cache@v3 + id: deps-cache + with: + path: node_modules + key: ${{ github.workflow }}-${{ github.job }}-npm-${{ hashFiles('yarn.lock') }} + + - name: Install SDK JS Dependencies + if: steps.deps-cache.outputs['cache-hit'] != 'true' + run: yarn install + + - name: Build SDK + run: yarn build + + - name: Package SDK + run: yalc publish + + - name: Download Plain RN ${{ matrix.rn-version }} App + working-directory: test/react-native/versions + run: git clone $RN_DIFF_REPOSITORY --branch release/${{ matrix.rn-version }} --single-branch ${{ matrix.rn-version }} + + - name: Add SDK to App + working-directory: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp + run: yalc add @sentry/react-native + + - name: Install App JS Dependencies + working-directory: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp + run: yarn install + + - name: Install App Pods + if: matrix.platform == 'ios' + working-directory: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp/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 + + - name: Patch App RN + working-directory: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp + run: patch --verbose --strip=0 --force --ignore-whitespace --fuzz 4 < ../../../rn.patch + + - name: Patch iOS App RN + if: matrix.platform == 'ios' + working-directory: test/react-native + run: | + ./rn.patch.xcode.js \ + --project 'versions/${{ matrix.rn-version }}/RnDiffApp/ios/RnDiffApp.xcodeproj/project.pbxproj' \ + --rn-version '${{ matrix.rn-version }}' + + - name: Build Android App + if: matrix.platform == 'android' + working-directory: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp/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: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp/ios + run: | + [[ "${{ matrix.build-type }}" == "production" ]] && CONFIG='Release' || CONFIG='Debug' + echo "Building $CONFIG" + derivedData="$(cd "DerivedData" ; pwd -P)" + mkdir -p "$derivedData" + xcodebuild \ + -workspace RnDiffApp.xcworkspace \ + -configuration "$CONFIG" \ + -scheme RnDiffApp \ + -destination 'platform=iOS Simulator,name=${{ matrix.device }}' \ + ONLY_ACTIVE_ARCH=yes \ + -sdk 'iphonesimulator${{ matrix.runtime }}' \ + -derivedDataPath "$derivedData" \ + build diff --git a/.gitignore b/.gitignore index 0b677ee5ab..805a58b4a8 100644 --- a/.gitignore +++ b/.gitignore @@ -78,3 +78,4 @@ sample/.vscode/.react/debuggerWorker.js # E2E tests sample/*.png +test/react-native/versions diff --git a/package.json b/package.json index e2eacbbad4..b8b8967f0a 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "build:tools": "tsc -p tsconfig.build.tools.json", "clean": "rimraf dist coverage", "test": "jest", - "lint": "eslint .", + "lint": "eslint --config .eslintrc.js .", "test:watch": "jest --watch", "run-ios": "cd sample && yarn react-native run-ios", "run-android": "cd sample && yarn react-native run-android" diff --git a/sample/package.json b/sample/package.json index 8d3309f5c2..53187e8357 100644 --- a/sample/package.json +++ b/sample/package.json @@ -25,7 +25,9 @@ "eslint": "^7.32.0", "jest": "^29.3.1", "metro-react-native-babel-preset": "0.73.3", - "webdriverio": "^7.26.0" + "minimist": "^1.2.7", + "webdriverio": "^7.26.0", + "xcode": "^3.0.1" }, "name": "sample", "private": true, diff --git a/sample/yarn.lock b/sample/yarn.lock index 48bdcef9ab..80dcb679c4 100644 --- a/sample/yarn.lock +++ b/sample/yarn.lock @@ -3256,6 +3256,13 @@ body-parser@1.20.1: type-is "~1.6.18" unpipe "1.0.0" +bplist-creator@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/bplist-creator/-/bplist-creator-0.1.0.tgz#018a2d1b587f769e379ef5519103730f8963ba1e" + integrity sha512-sXaHZicyEEmY86WyueLTQesbeoH/mquvarJaQNbjuOQO+7gbFcDEWqKmcWA4cOTLzFlfgvkiVxolk1k5bBIpmg== + dependencies: + stream-buffers "2.2.x" + bplist-creator@0.1.1, bplist-creator@^0.x: version "0.1.1" resolved "https://registry.yarnpkg.com/bplist-creator/-/bplist-creator-0.1.1.tgz#ef638af058a7021e10ebfd557ffd73d95e6799fc" @@ -3263,6 +3270,13 @@ bplist-creator@0.1.1, bplist-creator@^0.x: dependencies: stream-buffers "2.2.x" +bplist-parser@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.3.1.tgz#e1c90b2ca2a9f9474cc72f6862bbf3fee8341fd1" + integrity sha512-PyJxiNtA5T2PlLIeBot4lbp7rj4OadzjnMZD/G5zuBNt8ei/yCU7+wW0h2bag9vr8c+/WuRWmSxbqAl9hL1rBA== + dependencies: + big-integer "1.6.x" + bplist-parser@0.3.2, bplist-parser@^0.x: version "0.3.2" resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.3.2.tgz#3ac79d67ec52c4c107893e0237eb787cbacbced7" @@ -7139,7 +7153,7 @@ minimatch@^5.0.0, minimatch@^5.0.1, minimatch@^5.1.0: dependencies: brace-expansion "^2.0.1" -minimist@^1.2.6: +minimist@^1.2.6, minimist@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== @@ -7783,7 +7797,7 @@ pkg-up@^3.1.0: dependencies: find-up "^3.0.0" -plist@3.0.6, plist@^3.0.1: +plist@3.0.6, plist@^3.0.1, plist@^3.0.5: version "3.0.6" resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.6.tgz#7cfb68a856a7834bca6dbfe3218eb9c7740145d3" integrity sha512-WiIVYyrp8TD4w8yCvyeIr+lkmrGRd5u0VbRnU+tP/aRLxP/YadJUYOMZJ/6hIa3oUyVCsycXvtNRgd5XBJIbiA== @@ -8649,6 +8663,15 @@ signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== +simple-plist@^1.1.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-1.3.1.tgz#16e1d8f62c6c9b691b8383127663d834112fb017" + integrity sha512-iMSw5i0XseMnrhtIzRb7XpQEXepa9xhWxGUojHBL43SIpQuDQkh3Wpy67ZbDzZVr6EKxvwVChnVpdl8hEVLDiw== + dependencies: + bplist-creator "0.1.0" + bplist-parser "0.3.1" + plist "^3.0.5" + simple-swizzle@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" @@ -9405,6 +9428,11 @@ uuid@8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== +uuid@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b" + integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg== + uuid@^9.0.0: version "9.0.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" @@ -9679,6 +9707,14 @@ ws@^8.0.0: resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143" integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg== +xcode@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/xcode/-/xcode-3.0.1.tgz#3efb62aac641ab2c702458f9a0302696146aa53c" + integrity sha512-kCz5k7J7XbJtjABOvkc5lJmkiDh8VhjVCGNiqdKCscmVpdVUpEAyXv1xmCLkQJ5dsHqx3IPO4XW+NTDhU/fatA== + dependencies: + simple-plist "^1.1.0" + uuid "^7.0.3" + xhr@^2.0.1: version "2.6.0" resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.6.0.tgz#b69d4395e792b4173d6b7df077f0fc5e4e2b249d" diff --git a/test/react-native/rn.patch b/test/react-native/rn.patch new file mode 100644 index 0000000000..95339cbf8a --- /dev/null +++ b/test/react-native/rn.patch @@ -0,0 +1,44 @@ +diff -ruN App.js App.js +--- App.js 2022-12-06 11:42:35.000000000 +0100 ++++ App.js 2022-12-06 11:45:09.000000000 +0100 +@@ -26,6 +26,13 @@ + ReloadInstructions, + } from 'react-native/Libraries/NewAppScreen'; + ++import * as Sentry from '@sentry/react-native'; ++ ++Sentry.init({ ++ dsn: 'https://d870ad989e7046a8b9715a57f59b23b5@o447951.ingest.sentry.io/5428561', ++}); ++ ++ + const Section = ({children, title}): Node => { + const isDarkMode = useColorScheme() === 'dark'; + return ( +diff -ruN android/app/build.gradle android/app/build.gradle +--- android/app/build.gradle 2022-12-06 11:42:35.000000000 +0100 ++++ android/app/build.gradle 2022-12-06 11:44:50.000000000 +0100 +@@ -82,6 +82,7 @@ + ] + + apply from: "../../node_modules/react-native/react.gradle" ++apply from: "../../node_modules/@sentry/react-native/sentry.gradle" + + /** + * Set this to true to create two separate APKs instead of one: +diff -ruN android/sentry.properties android/sentry.properties +--- android/sentry.properties 1970-01-01 01:00:00.000000000 +0100 ++++ android/sentry.properties 2022-12-06 11:45:37.000000000 +0100 +@@ -0,0 +1,4 @@ ++defaults.url=https://sentry.io/ ++defaults.org=sentry-sdks ++defaults.project=sentry-react-native ++# auth.token= +diff -ruN ios/sentry.properties ios/sentry.properties +--- ios/sentry.properties 1970-01-01 01:00:00.000000000 +0100 ++++ ios/sentry.properties 2022-12-06 11:45:31.000000000 +0100 +@@ -0,0 +1,4 @@ ++defaults.url=https://sentry.io/ ++defaults.org=sentry-sdks ++defaults.project=sentry-react-native ++# auth.token= diff --git a/test/react-native/rn.patch.xcode.js b/test/react-native/rn.patch.xcode.js new file mode 100755 index 0000000000..645e720e2c --- /dev/null +++ b/test/react-native/rn.patch.xcode.js @@ -0,0 +1,114 @@ +#!/usr/bin/env node + +const fs = require('fs'); +const { argv } = require('process'); + +const xcode = require('xcode'); +const parseArgs = require('minimist'); +const semver = require('semver'); +const { logger } = require('@sentry/utils'); +logger.enable(); + +const args = parseArgs(argv.slice(2)); +if (!args.project) { + throw new Error('Missing --project'); +} +if (!args['rn-version']) { + throw new Error('Missing --rn-version'); +} + +logger.info('Patching Xcode project', args.project, 'for RN version', args['rn-version']); + +const newBundleScriptRNVersion = '0.69.0-rc.0'; + +let bundleScript; +let bundleScriptRegex; +let bundlePatchRegex; +const symbolsScript = ` +export SENTRY_PROPERTIES=sentry.properties +../node_modules/@sentry/cli/bin/sentry-cli upload-dsym +`; +const symbolsPatchRegex = /sentry-cli\s+(upload-dsym|debug-files upload)/; +if (semver.satisfies(args['rn-version'], `< ${newBundleScriptRNVersion}`)) { + logger.info('Applying old bundle script patch'); + bundleScript = ` +export SENTRY_PROPERTIES=sentry.properties +export EXTRA_PACKAGER_ARGS="--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.map" +set -e + +export NODE_BINARY=node +../node_modules/@sentry/cli/bin/sentry-cli react-native xcode ../node_modules/react-native/scripts/react-native-xcode.sh + +/bin/sh ../node_modules/@sentry/react-native/scripts/collect-modules.sh +`; + bundleScriptRegex = /(packager|scripts)\/react-native-xcode\.sh\b/; + bundlePatchRegex = /sentry-cli\s+react-native[\s-]xcode/; + + +} else if (semver.satisfies(args['rn-version'], `>= ${newBundleScriptRNVersion}`)) { + logger.info('Applying new bundle script patch'); + bundleScript = ` +export SENTRY_PROPERTIES=sentry.properties +export EXTRA_PACKAGER_ARGS="--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.map" +set -e + +WITH_ENVIRONMENT="../node_modules/react-native/scripts/xcode/with-environment.sh" +REACT_NATIVE_XCODE="../node_modules/react-native/scripts/react-native-xcode.sh" + +/bin/sh -c "$WITH_ENVIRONMENT \\"../node_modules/@sentry/cli/bin/sentry-cli react-native xcode $REACT_NATIVE_XCODE\\"" + +/bin/sh ../node_modules/@sentry/react-native/scripts/collect-modules.sh +`; + bundleScriptRegex = /\/scripts\/react-native-xcode\.sh/i; + bundlePatchRegex = /sentry-cli\s+react-native\s+xcode/i; +} else { + throw new Error('Unknown RN version'); +} + +const project = xcode.project(args.project); + +project.parseSync(); + +const buildPhasesRaw = project.hash.project.objects.PBXShellScriptBuildPhase; +const buildPhases = []; +for (const key in buildPhasesRaw) { + if (buildPhasesRaw[key].isa) { + buildPhases.push(buildPhasesRaw[key]); + } +} + +buildPhases.forEach((phase) => { + const isBundleReactNative = phase.shellScript.match(bundleScriptRegex); + const isPatched = phase.shellScript.match(bundlePatchRegex); + if (!isBundleReactNative) { + return; + } + if (isPatched) { + logger.warn('Xcode project Bundle RN Build phase already patched'); + return; + } + phase.shellScript = JSON.stringify(bundleScript); + logger.info('Patched Xcode project Bundle RN Build phase'); +}); + +const isSymbolsPhase = (phase) => phase.shellScript.match(symbolsPatchRegex); +const areSymbolsPatched = buildPhases.some(isSymbolsPhase); + +if (!areSymbolsPatched) { + project.addBuildPhase( + [], + 'PBXShellScriptBuildPhase', + 'Upload Debug Symbols to Sentry', + null, + { + shellPath: '/bin/sh', + shellScript: symbolsScript, + }, + ); + logger.info('Added Xcode project Upload Debug Symbols Build phase'); +} else { + logger.warn('Xcode project Upload Debug Symbols Build phase already patched'); +} + +fs.writeFileSync(args.project, project.writeSync()); +logger.info('Patched Xcode project successfully!'); From ff67002489ba016c18ce82fa9af83b4cb4ecfa6a Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Fri, 9 Dec 2022 14:02:22 +0100 Subject: [PATCH 2/5] Add new arch for v5 --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 013810fe93..41338c983c 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -297,7 +297,7 @@ jobs: fail-fast: false # keeps matrix running if one fails matrix: rn-version: ['0.64.4', '0.70.6'] - rn-architecture: ['legacy'] + rn-architecture: ['legacy', 'new'] platform: ['android', 'ios'] build-type: ['dev', 'production'] include: From be93bbfb07dffdfb496cc7bdbced5f18ff55013e Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Fri, 9 Dec 2022 14:12:28 +0100 Subject: [PATCH 3/5] Revert "Do not run e2e for contributors" This reverts commit 212133a2415fbec0c4263541a047ffc367cef463. --- .github/workflows/e2e.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 41338c983c..cb312f3801 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -24,7 +24,6 @@ jobs: device-test: # Android emulator said to perform best with macos HAXM runs-on: macos-latest - if: ${{ secrets.SENTRY_AUTH_TOKEN }} != null strategy: # we want that the matrix keeps running, default is to cancel them if it fails. fail-fast: false @@ -99,6 +98,7 @@ jobs: TEST: true - name: Build ${{ matrix.platform }} sample app + if: env.SENTRY_AUTH_TOKEN != null id: build working-directory: ./sample/${{ matrix.platform }} run: | @@ -290,7 +290,6 @@ jobs: react-native-build: name: Build RN ${{ matrix.rn-version }} ${{ matrix.rn-architecture }} ${{ matrix.platform }} ${{ matrix.build-type }} runs-on: macos-latest - if: ${{ secrets.SENTRY_AUTH_TOKEN }} != null env: RN_DIFF_REPOSITORY: https://github.com/react-native-community/rn-diff-purge.git strategy: From 5eae924b26ffbb0c37efb7ff59d127feae5efcc3 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Fri, 9 Dec 2022 14:19:42 +0100 Subject: [PATCH 4/5] Add versions dir --- test/react-native/versions/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test/react-native/versions/.keep diff --git a/test/react-native/versions/.keep b/test/react-native/versions/.keep new file mode 100644 index 0000000000..e69de29bb2 From e077626e5f23226b9c4670c14d0ee38c2684a379 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Wed, 4 Jan 2023 21:44:32 +0100 Subject: [PATCH 5/5] Set min RN version to 0.65 sentry-cocoa v7 and v8 has min ios version 11 and rn 0.65 is the oldest version supporting ios 11 rn 0.64 supports ios 10 --- .github/workflows/e2e.yml | 4 ++-- RNSentry.podspec | 6 +++--- package.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index b0c71eadc9..21b6998863 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -295,7 +295,7 @@ jobs: strategy: fail-fast: false # keeps matrix running if one fails matrix: - rn-version: ['0.64.4', '0.70.6'] + rn-version: ['0.65.3', '0.70.6'] rn-architecture: ['legacy', 'new'] platform: ['android', 'ios'] build-type: ['dev', 'production'] @@ -305,7 +305,7 @@ jobs: device: 'iPhone 14' # exclude all rn versions lower than 0.70.0 for new architecture exclude: - - rn-version: '0.64.4' + - rn-version: '0.65.3' rn-architecture: 'new' steps: - uses: actions/checkout@v3 diff --git a/RNSentry.podspec b/RNSentry.podspec index d4a8f9dc70..4bd0f33eaa 100644 --- a/RNSentry.podspec +++ b/RNSentry.podspec @@ -12,9 +12,9 @@ Pod::Spec.new do |s| s.homepage = "https://github.com/getsentry/sentry-react-native" s.source = { :git => 'https://github.com/getsentry/sentry-react-native.git', :tag => "#{s.version}"} - s.ios.deployment_target = "12.4" - s.osx.deployment_target = "10.10" - s.tvos.deployment_target = "12.4" + s.ios.deployment_target = "11.0" + s.osx.deployment_target = "10.13" + s.tvos.deployment_target = "11.0" s.preserve_paths = '*.js' diff --git a/package.json b/package.json index d6e234e3a2..e2972ec192 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ ], "peerDependencies": { "react": ">=17.0.0", - "react-native": ">=0.70.0" + "react-native": ">=0.65.0" }, "dependencies": { "@sentry/browser": "7.28.1",