-
Notifications
You must be signed in to change notification settings - Fork 955
101 lines (98 loc) · 3.8 KB
/
react-native-example.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Build React Native example
# This action runs on 'git push' and PRs
on: [push, pull_request]
jobs:
build-react-native-example-ios:
runs-on: macos-latest
defaults:
run:
working-directory: react-native/ReactNativeFlipperExample
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
node-version: '18.x'
- uses: maxim-lobanov/[email protected]
with:
# Path to Podfile.lock file to determine Cocoapods version
# n.b. doesn't seem to respect cwd:
podfile-path: react-native/ReactNativeFlipperExample/ios/Podfile.lock
- name: Install yarn dependencies
run: yarn install --ignore-scripts
- name: Install react-native-flipper
run: yarn relative-deps
- name: Install pod dependencies
run: cd ios && pod install --repo-update
- name: Build React Native iOS Example debug app
run: |
cd ios
IPHONESIMULATOR=$(xcodebuild -showsdks | grep -o "iphonesimulator[0-9]\\+\\.[0-9]\\+$") && echo $IPHONESIMULATOR
xcodebuild -workspace ReactNativeFlipperExample.xcworkspace -configuration Debug -scheme ReactNativeFlipperExample -sdk $IPHONESIMULATOR EXCLUDED_ARCHS="arm64"
build-react-native-example-android:
runs-on: ubuntu-latest
defaults:
run:
working-directory: react-native/ReactNativeFlipperExample
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
node-version: '18.x'
- name: set up JDK
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: '11'
- name: Compute build cache
run: ${GITHUB_WORKSPACE}/scripts/checksum-android.sh checksum-android.txt
- uses: actions/[email protected]
with:
path: |
~/.gradle/caches/modules-*
~/.gradle/caches/jars-*
~/.gradle/caches/build-cache-*
key: gradle-${{ hashFiles('checksum-android.txt') }}
- name: Install yarn dependencies
run: yarn install --ignore-scripts
- name: Install react-native-flipper
run: yarn relative-deps
- name: Build React Native Android Example debug app
run: |
mkdir -p android/app/src/main/assets
yarn react-native bundle --platform android --dev true --entry-file index.native.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
cd android && ./gradlew assembleDebug
build-react-native-example-windows:
runs-on: windows-2019
defaults:
run:
working-directory: react-native/ReactNativeFlipperExample
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
node-version: '18.x'
- name: Set up NuGet.exe
- uses: NuGet/[email protected]
with:
nuget-version: '5.x'
- name: Add msbuild to PATH
- uses: microsoft/[email protected]
- name: Gather environment info
run: npx envinfo
- name: Install vcpkg packages
run: vcpkg install openssl:x64-uwp openssl:arm-uwp
- name: Integrate vcpkg
run: vcpkg integrate install
- name: Install yarn dependencies (react-native-flipper)
run: yarn install
working-directory: react-native/react-native-flipper
- name: Nuget restore (react-native-flipper)
run: nuget install ReactNativeFlipper/packages.config
working-directory: react-native/react-native-flipper/windows
- name: Install yarn dependencies
run: yarn install
- name: Install react-native-flipper
run: yarn relative-deps
- name: Build React Native Windows Example debug app
shell: powershell
run: npx react-native run-windows --logging --no-autolink --no-packager --no-deploy --no-launch --arch x64