-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace test_android_template with test_android_helloworld (#44905)
Summary: Pull Request resolved: #44905 Replaces the last template CI job. Changelog: [Internal] [Changed] Use Helloworld in GHA CI workflow. Differential Revision: D58466813
- Loading branch information
1 parent
43a531b
commit e591645
Showing
1 changed file
with
11 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -780,13 +780,12 @@ jobs: | |
-H "Accept: application/vnd.github.v3+json" \ | ||
-H "Authorization: Bearer $REACT_NATIVE_BOT_GITHUB_TOKEN" \ | ||
-d "{\"event_type\": \"publish\", \"client_payload\": { \"version\": \"${{ github.ref_name }}\" }}" | ||
test_android_template: | ||
test_android_helloworld: | ||
runs-on: ubuntu-latest | ||
needs: [prepare_hermes_workspace, build_npm_package] | ||
container: | ||
image: reactnativecommunity/react-native-android:latest | ||
env: | ||
PROJECT_NAME: AndroidTemplateProject | ||
YARN_ENABLE_IMMUTABLE_INSTALLS: false | ||
TERM: "dumb" | ||
GRADLE_OPTS: "-Dorg.gradle.daemon=false" | ||
|
@@ -807,11 +806,6 @@ jobs: | |
with: | ||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }} | ||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} | ||
- name: Download npm package artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: react-native-package | ||
path: build | ||
- name: Run yarn | ||
shell: bash | ||
run: yarn install --non-interactive | ||
|
@@ -823,28 +817,23 @@ jobs: | |
- name: Unzip maven-local | ||
working-directory: /tmp | ||
run: unzip -q maven-local.zip | ||
- name: Create Android template project | ||
run: | | ||
node ./scripts/releases/update-template-package.js "{\"react-native\":\"file:$GITHUB_WORKSPACE/build/$(cat build/react-native-package-version)\"}" | ||
node ./scripts/e2e/init-template-e2e.js --projectName $PROJECT_NAME --templatePath "$GITHUB_WORKSPACE/packages/react-native" --directory "/tmp/$PROJECT_NAME" --verbose | ||
- name: Setup gradle | ||
uses: ./.github/actions/setup-gradle | ||
- name: Build the template application for ${{ matrix.flavor }} with Architecture set to ${{ matrix.architecture }}, and using the ${{ matrix.jsengine }} JS engine. | ||
shell: bash | ||
run: | | ||
sudo chmod +x /tmp/$PROJECT_NAME/node_modules/react-native/sdks/hermesc/linux64-bin/hermesc | ||
cd /tmp/$PROJECT_NAME/android/ | ||
if [[ ${{ matrix.architecture }} == "NewArch" ]]; then | ||
export ORG_GRADLE_PROJECT_newArchEnabled=true | ||
else | ||
export ORG_GRADLE_PROJECT_newArchEnabled=false | ||
cd packages/helloworld/android | ||
args=() | ||
if [[ ${{ matrix.architecture }} == "OldArch" ]]; then | ||
args+=(--arch old) | ||
fi | ||
if [[ ${{ matrix.jsengine }} == "Hermes" ]]; then | ||
export ORG_GRADLE_PROJECT_hermesEnabled=true | ||
else | ||
export ORG_GRADLE_PROJECT_hermesEnabled=false | ||
if [[ ${{ matrix.jsengine }} == "JSC" ]]; then | ||
args+=(--jsvm jsc) | ||
fi | ||
if [[ ${{ matrix.flavor }} == "Release" ]]; then | ||
args+=(--prod) | ||
fi | ||
./gradlew assemble${{ matrix.flavor }} -Preact.internal.mavenLocalRepo=/tmp/maven-local | ||
yarn build android "${args[@]}" -P react.internal.mavenLocalRepo=/tmp/maven-local | ||
- name: Upload artifact | ||
uses: actions/[email protected] | ||
with: | ||
|