Skip to content

Commit

Permalink
Fix check-expo-dev-client CI (#5898)
Browse files Browse the repository at this point in the history
## Summary

## Test plan
  • Loading branch information
tjzel committed Apr 17, 2024
1 parent dee01dc commit 0feaeb2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 17 deletions.
35 changes: 22 additions & 13 deletions .github/workflows/check-expo-dev-client-nightly.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Check Expo dev-client nightly build
env:
YARN_ENABLE_HARDENED_MODE: 0
SCRIPT_PATH: reanimated_repo/.github/workflows/helper/configureDevClient.js
SCRIPT_PATH: ${{github.workspace}}/reanimated_repo/.github/workflows/helper/configureDevClient.js
on:
pull_request:
paths:
Expand All @@ -27,32 +27,34 @@ jobs:
with:
path: 'reanimated_repo'
- name: Create Expo app
run: npx create-expo-app app
run: npx create-expo-app ExpoApp
- name: Install expo-dev-client
working-directory: app
working-directory: ExpoApp
run: |
if npm view expo dist-tags | grep -q 'next:' ; then
npm install expo@next
else
npm install expo@latest
fi
- name: Setup configuration
working-directory: ExpoApp
run: node ${{ env.SCRIPT_PATH }} setBundleIdentifier
- name: Expo prebuild
working-directory: app
working-directory: ExpoApp
run: npx expo prebuild
- name: Install Reanimated
working-directory: app
working-directory: ExpoApp
run: npm install react-native-reanimated@nightly
- name: Set Fabric
working-directory: ExpoApp
if: ${{ matrix.react-native-architecture == 'Fabric' }}
run: node ${{ env.SCRIPT_PATH }} setupFabricIOS
- name: Install Pods
working-directory: app/ios
working-directory: ExpoApp/ios
run: pod install
- name: Build app
working-directory: app
run: yarn react-native run-ios --simulator='iPhone 14'
working-directory: ExpoApp
run: npx react-native run-ios --simulator='iPhone 14' --terminal='Terminal'

build_android:
if: github.repository == 'software-mansion/react-native-reanimated'
Expand All @@ -70,26 +72,33 @@ jobs:
with:
path: 'reanimated_repo'
- name: Create Expo app
run: npx create-expo-app app
run: npx create-expo-app ExpoApp
- name: Setup Java 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Install expo-dev-client
working-directory: app
working-directory: ExpoApp
run: |
if npm view expo dist-tags | grep -q 'next:' ; then
npm install expo@next
else
npm install expo@latest
fi
- name: Setup configuration
working-directory: ExpoApp
run: node ${{ env.SCRIPT_PATH }} setBundleIdentifier
- name: Expo prebuild
working-directory: app
working-directory: ExpoApp
run: npx expo prebuild
- name: Install Reanimated
working-directory: app
working-directory: ExpoApp
run: npm install react-native-reanimated@nightly
- name: Set Fabric
working-directory: ExpoApp
if: ${{ matrix.react-native-architecture == 'Fabric' }}
run: node ${{ env.SCRIPT_PATH }} setupFabricAndroid
- name: Build app
working-directory: app/android
working-directory: ExpoApp/android
run: ./gradlew assembleDebug --console=plain
8 changes: 4 additions & 4 deletions .github/workflows/helper/configureDevClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@ const command = process.argv[2];

if (command === 'setBundleIdentifier') {
patchFile(
'app/app.json',
'app.json',
'"ios": {',
'"ios": {"bundleIdentifier":"com.swmansion.app",'
);

patchFile(
'app/app.json',
'app.json',
'"android": {',
'"android": {"package": "com.swmansion.app",'
);
}

if (command === 'setupFabricIOS') {
patchFile(
'app/ios/Podfile.properties.json',
'ios/Podfile.properties.json',
'"expo.jsEngine"',
'"newArchEnabled":"true","expo.jsEngine"'
);
}

if (command === 'setupFabricAndroid') {
patchFile(
'app/android/gradle.properties',
'android/gradle.properties',
'newArchEnabled=false',
'newArchEnabled=true'
);
Expand Down

0 comments on commit 0feaeb2

Please sign in to comment.