Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix check-expo-dev-client CI #5898

Merged
merged 10 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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