Skip to content

Commit

Permalink
test(ci): build against dev code / fix arch issue
Browse files Browse the repository at this point in the history
this will fix the build in CI for iOS at the same time it ensures
we run CI against the actual development code (vs github master, which
is what yarn installs by default)

pod install will fail on ubuntu (when building android) so allow it to fail
with the `|| true` bit, but we still install the dev code dependencies so
android tests actual dev code
  • Loading branch information
mikehardy committed Nov 11, 2021
1 parent 3e44228 commit a9506bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
max_attempts: 3
command: yarn install --frozen-lockfile
- name: Build android example app
run: cd RNFBSDKExample && yarn && cd android && ./gradlew assembleDebug
run: yarn example:install && yarn example:devcopy && yarn example:install && cd RNFBSDKExample && cd android && ./gradlew assembleDebug
ios-build:
runs-on: macOS-latest
steps:
Expand Down Expand Up @@ -109,4 +109,4 @@ jobs:
- name: Install pods
run: cd RNFBSDKExample/ios && rm -f Podfile.lock && pod install
- name: Build ios example app
run: cd RNFBSDKExample/ios && xcodebuild -scheme RNFBSDKExample -workspace RNFBSDKExample.xcworkspace ONLY_ACTIVE_ARCH=YES -sdk iphonesimulator -configuration Debug
run: yarn example:install && yarn example:devcopy && yarn example:install && cd RNFBSDKExample/ios && xcodebuild -scheme RNFBSDKExample -workspace RNFBSDKExample.xcworkspace VALID_ARCHS=\"`uname -m`\" ONLY_ACTIVE_ARCH=YES -sdk iphonesimulator -configuration Debug
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@
"validate:flow": "flow",
"validate:prettier": "prettier \"src/**/*.js\" --check",
"example:start": "cd ./RNFBSDKExample && yarn start",
"example:ios": "cd ./RNFBSDKExample/ios && pod install && yarn ios",
"example:ios": "cd ./RNFBSDKExample/ios && rm -f Podfile.lock && pod install && yarn ios",
"example:android": "cd ./RNFBSDKExample && yarn android --no-jetifier",
"example:clean": "cd RNFBSDKExample && \\rm -fr yarn.lock node_modules ios/Podfile.lock && cd ..",
"example:install": "cd RNFBSDKExample && yarn && cd ios && pod install && cd ..",
"example:install": "cd RNFBSDKExample && yarn && cd ios && (pod install || true) && cd ../..",
"example:devcopy": "yarn prepare && cp -rv android ios lib src types *.podspec RNFBSDKExample/node_modules/react-native-fbsdk-next/",
"semantic-release": "semantic-release"
},
Expand Down

0 comments on commit a9506bd

Please sign in to comment.