-
Notifications
You must be signed in to change notification settings - Fork 24.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RN][GHA] Move HelloWorld jobs from CCI to GHA
- Loading branch information
1 parent
d72ac96
commit 807b6a9
Showing
5 changed files
with
98 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,37 @@ | ||
name: test_ios_template | ||
description: Test iOS Template | ||
name: test_ios_helloworld | ||
description: Test iOS Hello World | ||
inputs: | ||
jsengine: | ||
description: Which JavaScript engine to use. Must be one of "Hermes", "JSC". | ||
type: choice | ||
default: Hermes | ||
options: | ||
- JSC | ||
- Hermes | ||
use-frameworks: | ||
description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks" | ||
type: choice | ||
default: StaticLibraries | ||
options: | ||
- StaticLibraries | ||
- DynamicFrameworks | ||
architecture: | ||
description: The React Native architecture to Test. RNTester has always Fabric enabled, but we want to run integration test with the old arch setup | ||
type: choice | ||
default: OldArch | ||
options: | ||
- OldArch | ||
- NewArch | ||
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". | ||
type: choice | ||
default: Debug | ||
options: | ||
- Debug | ||
- Release | ||
hermes-version: | ||
description: The version of hermes | ||
required: true | ||
|
@@ -38,11 +54,6 @@ runs: | |
with: | ||
hermes-version: ${{ inputs.hermes-version }} | ||
react-native-version: ${{ inputs.react-native-version }} | ||
- name: Download npm package artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: react-native-package | ||
path: build | ||
- name: Setup Hermes workspace | ||
uses: ./.github/actions/setup_hermes_workspace | ||
- name: Setup ruby | ||
|
@@ -56,43 +67,30 @@ runs: | |
BUILD_TYPE="${{ inputs.flavor }}" | ||
TARBALL_FILENAME=$(node ./packages/react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE") | ||
echo "export HERMES_ENGINE_TARBALL_PATH=$HERMES_WS_DIR/hermes-runtime-darwin/$TARBALL_FILENAME" >> $GITHUB_ENV | ||
- name: Create iOS template project | ||
shell: bash | ||
run: | | ||
PACKAGE=$(cat build/react-native-package-version) | ||
PATH_TO_PACKAGE="$GITHUB_WORKSPACE/build/$PACKAGE" | ||
node ./scripts/releases/update-template-package.js "{\"react-native\":\"file:$PATH_TO_PACKAGE\"}" | ||
node ./scripts/e2e/init-template-e2e.js --projectName $PROJECT_NAME --templatePath "$GITHUB_WORKSPACE/packages/react-native" --directory "/tmp/$PROJECT_NAME" --verbose | ||
- name: Yarn install in template project | ||
shell: bash | ||
run: | | ||
cd /tmp/$PROJECT_NAME/android/ | ||
yarn install --non-interactive | ||
- name: Install iOS dependencies - Configuration ${{ inputs.flavor }}; New Architecture ${{ inputs.architecture }}; JS Engine ${{ inputs.jsengine }} | ||
shell: bash | ||
run: | | ||
cd /tmp/$PROJECT_NAME/ios | ||
cd packages/helloworld | ||
args=() | ||
if [[ ${{ inputs.architecture }} == "NewArch" ]]; then | ||
export RCT_NEW_ARCH_ENABLED=1 | ||
if [[ ${{ inputs.architecture }} == "OldArch" ]]; then | ||
args+=(--arch old) | ||
fi | ||
if [[ ${{ inputs.jsengine }} == "JSC" ]]; then | ||
export USE_HERMES=0 | ||
args+=(--jsvm jsc) | ||
fi | ||
if [[ ${{ inputs.use-frameworks }} == "DynamicFrameworks" ]]; then | ||
export USE_FRAMEWORKS=dynamic | ||
args+=(--frameworks dynamic) | ||
fi | ||
cd .. | ||
bundle install | ||
bundle exec pod install --project-directory=ios | ||
- name: Build template project | ||
yarn bootstrap ios "${args[@]}" | cat | ||
- name: Build HelloWorld project | ||
shell: bash | ||
run: | | ||
xcodebuild build \ | ||
-configuration ${{ inputs.flavor }} \ | ||
-workspace /tmp/$PROJECT_NAME/ios/$PROJECT_NAME.xcworkspace \ | ||
-scheme $PROJECT_NAME \ | ||
-sdk iphonesimulator | ||
cd packages/helloworld | ||
args=() | ||
if [[ ${{ inputs.flavor }} == "Release" ]]; then | ||
args+=(--prod) | ||
fi | ||
yarn build ios "${args[@]}" | cat | ||
yarn bundle ios "${args[@]}" | cat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.