mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
a7a51275b5
Summary: I've noticed that test_js (20) and test_js (24) are actually running on Node 22. That's because the `yarn-install` action is invoking setup-node again with the default value (22). This changes it. Also I'm cleaning up the workflows so that every `yarn-install` invocation is happening just after the `setup-node` invocation. ## Changelog: [INTERNAL] - Pull Request resolved: https://github.com/facebook/react-native/pull/52737 Test Plan: CI which will most likely be red for test_js (20) so will need a follow-up Reviewed By: cipolleschi Differential Revision: D78664671 Pulled By: cortinico fbshipit-source-id: c73390930d1511d1bf0f2d4ea92e83f50b10247f
105 lines
3.7 KiB
YAML
105 lines
3.7 KiB
YAML
name: test-ios-helloworld
|
|
description: Test iOS Hello World
|
|
inputs:
|
|
use-frameworks:
|
|
description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks"
|
|
default: StaticLibraries
|
|
ruby-version:
|
|
description: The version of ruby that must be used
|
|
default: 2.6.10
|
|
flavor:
|
|
description: The flavor of the build. Must be one of "Debug", "Release".
|
|
default: Debug
|
|
hermes-version:
|
|
description: The version of hermes
|
|
required: true
|
|
react-native-version:
|
|
description: The version of react-native
|
|
required: true
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Setup xcode
|
|
uses: ./.github/actions/setup-xcode
|
|
- name: Setup node.js
|
|
uses: ./.github/actions/setup-node
|
|
- name: Run yarn install
|
|
uses: ./.github/actions/yarn-install
|
|
- name: Create Hermes folder
|
|
shell: bash
|
|
run: mkdir -p "$HERMES_WS_DIR"
|
|
- name: Download Hermes
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: hermes-darwin-bin-${{ inputs.flavor }}
|
|
path: /tmp/hermes/hermes-runtime-darwin/
|
|
- name: Print Downloaded hermes
|
|
shell: bash
|
|
run: ls -lR "$HERMES_WS_DIR"
|
|
- name: Setup ruby
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: ${{ inputs.ruby-version }}
|
|
- name: Download ReactNativeDependencies
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz
|
|
path: /tmp/third-party
|
|
- name: Print third-party folder
|
|
shell: bash
|
|
run: ls -lR /tmp/third-party
|
|
- name: Download React Native Prebuilds
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: ReactCore${{ inputs.flavor }}.xcframework.tar.gz
|
|
path: /tmp/ReactCore
|
|
- name: Print ReactCore folder
|
|
shell: bash
|
|
run: ls -lR /tmp/ReactCore
|
|
- name: Install iOS dependencies - Configuration ${{ inputs.flavor }};
|
|
shell: bash
|
|
run: |
|
|
cd private/helloworld
|
|
args=()
|
|
|
|
if [[ ${{ inputs.use-frameworks }} == "DynamicFrameworks" ]]; then
|
|
args+=(--frameworks dynamic)
|
|
fi
|
|
|
|
# Tarball is restored with capital flavors suffix, but somehow the tarball name from JS at line 96 returns as lowercased.
|
|
# Let's ensure that the tarballs have the right names
|
|
|
|
if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" ]]; then
|
|
mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-debug.tar.gz"
|
|
fi
|
|
|
|
if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" ]]; then
|
|
mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-release.tar.gz"
|
|
fi
|
|
|
|
BUILD_TYPE="${{ inputs.flavor }}"
|
|
TARBALL_FILENAME=$(node ../../packages/react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE")
|
|
export HERMES_ENGINE_TARBALL_PATH="$HERMES_WS_DIR/hermes-runtime-darwin/$TARBALL_FILENAME"
|
|
export RCT_USE_LOCAL_RN_DEP="/tmp/third-party/ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz"
|
|
export RCT_TESTONLY_RNCORE_TARBALL_PATH="/tmp/ReactCore/ReactCore${{ inputs.flavor }}.xcframework.tar.gz"
|
|
|
|
yarn bootstrap ios "${args[@]}" | cat
|
|
|
|
- name: Run Helloworld tests
|
|
shell: bash
|
|
run: |
|
|
cd private/helloworld
|
|
yarn test
|
|
|
|
- name: Build HelloWorld project
|
|
shell: bash
|
|
run: |
|
|
cd private/helloworld
|
|
|
|
args=()
|
|
if [[ ${{ inputs.flavor }} == "Release" ]]; then
|
|
args+=(--prod)
|
|
fi
|
|
yarn build ios "${args[@]}" | cat
|
|
yarn bundle ios "${args[@]}" | cat
|