Files
flipper/.github/workflows/react-native-example.yml
Pranav Yadav 9b70adab7f react-native-example - Bump multiple actions (#4869)
Summary:
This diff bumps `actions/checkout@v3.5.3`, `actions/setup-node@v3.6.0`, `actions/setup-java@v3.11.0`, `actions/cache@v3.3.1`, `maxim-lobanov/setup-cocoapods@v1.3.0`, `NuGet/setup-nuget@v1.2.0` and `microsoft/setup-msbuild@v1.3.1`

### Ref.:
- `actions/checkout@v3.5.3` changelog: https://github.com/actions/checkout/releases/tag/v3.5.3
- `actions/setup-node@v3.6.0` changelog: https://github.com/actions/setup-node/releases/tag/v3.6.0
- `actions/setup-java@v3.11.0` changelog: https://github.com/actions/setup-java/releases/tag/v3.11.0
- `actions/cache@v3.3.1` changelog: https://github.com/actions/cache/releases/tag/v3.3.1
- `NuGet/setup-nuget@v1.2.0` changelog: https://github.com/NuGet/setup-nuget/releases/tag/v1.2.0
- `microsoft/setup-msbuild@v1.3.1` changelog: https://github.com/microsoft/setup-msbuild/releases/tag/v1.3.1

## Changelog:

[GENERAL] [SECURITY] - [Actions] `react-native-example` - Bump `actions/`- `checkout@v3.5.3`, `setup-node@3.6.0`, `setup-java@v3.11.0`, `cache@v3.3.1`, `maxim-lobanov/setup-cocoapods@v1.3.0`, `NuGet/setup-nuget@v1.2.0` and `microsoft/setup-msbuild@v1.3.1`

Pull Request resolved: https://github.com/facebook/flipper/pull/4869

Test Plan: - Workflow should run and work as usual.

Reviewed By: lblasa

Differential Revision: D47829485

Pulled By: passy

fbshipit-source-id: 8272357fc64b39a05a3d717d143ad1689dfd65ca
2023-07-27 03:35:25 -07:00

102 lines
3.8 KiB
YAML

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/checkout@v3.5.3
- uses: actions/setup-node@v3.6.0
with:
node-version: '18.x'
- uses: maxim-lobanov/setup-cocoapods@v1.3.0
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/checkout@v3.5.3
- uses: actions/setup-node@v3.6.0
with:
node-version: '18.x'
- name: set up JDK
uses: actions/setup-java@v3.11.0
with:
distribution: 'temurin'
java-version: '11'
- name: Compute build cache
run: ${GITHUB_WORKSPACE}/scripts/checksum-android.sh checksum-android.txt
- uses: actions/cache@v3.3.1
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/checkout@v3.5.3
- uses: actions/setup-node@v3.6.0
with:
node-version: '18.x'
- name: Set up NuGet.exe
- uses: NuGet/setup-nuget@v1.2.0
with:
nuget-version: '5.x'
- name: Add msbuild to PATH
- uses: microsoft/setup-msbuild@v1.3.1
- 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