Skip to content

Commit

Permalink
replace test_android_template with test_android_helloworld (#44905)
Browse files Browse the repository at this point in the history
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
blakef authored and facebook-github-bot committed Jun 12, 2024
1 parent 43a531b commit c247618
Showing 1 changed file with 12 additions and 23 deletions.
35 changes: 12 additions & 23 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
needs: [prepare_hermes_workspace, build_android]
container:
image: reactnativecommunity/react-native-android:latest
env:
PROJECT_NAME: AndroidTemplateProject
YARN_ENABLE_IMMUTABLE_INSTALLS: false
TERM: "dumb"
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
Expand All @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit c247618

Please sign in to comment.