-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat(qa-build): update pipeline for generating ios and android builds #17601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
a8b8f77
feat(qa-build): update pipeline for generating ios and android builds
alucardzom dd0c3cb
chore: update token
alucardzom 8bf6ad2
chore: test build now
alucardzom d419385
chore: test without prev steps
alucardzom 252d39a
chore: add setup:github-ci command
alucardzom fcab962
chore: introduce command within the same step
alucardzom 681540c
chore: run android pipeline
alucardzom a0f3b8c
chore: remove repeated input
alucardzom 59042d0
chore: remove input
alucardzom 274f3ab
chore: re enabled ios and launch both
alucardzom 94b070c
chore: add missing env vars for the build step
alucardzom 6aa089f
chore: simplify upload
alucardzom 4be3d14
chore: build pods
alucardzom 58b5872
chore: set node memory limit to avoid OOO issue
alucardzom a76d156
chore: added ipa app source map as optional
alucardzom d3facfb
chore: we need to run the env setup as figured
alucardzom 4a41c3e
chore: improved legibility and structure
alucardzom de4e08e
chore: fix shellcheck
alucardzom 3f87b95
chore: add quotes to github output id
alucardzom b55e5a3
chore: set proper name to artifacts
alucardzom eaf3096
chore: test self hosted nodes
alucardzom 789052a
chore: test different branch for self hosted runners
alucardzom be0fca4
chore: test xl android instance for test
alucardzom 84a0cdd
chore: test
alucardzom 1164b83
chore: test some gradle limits for selfhosted
alucardzom 468c92c
chore: remove maxpermsize option
alucardzom e5da965
chore: set memory limit
alucardzom 2ffb430
chore: another limit
alucardzom 793f039
chore: test limit memory gradle parallel arch
alucardzom f149418
chore: test xl self hosted
alucardzom ed308a0
chore: use xl mmsdk
alucardzom 3090d41
chore: try to use gradle_opts variables
alucardzom 75df401
gradle configs
makemesteaks e0d12df
more gradle configs
makemesteaks 34677c4
gradle for bitrrise and gha
makemesteaks a50b491
caps
makemesteaks 7b44107
try to override
makemesteaks 8530500
add gradle args
makemesteaks dfdb84c
path
makemesteaks ab10e9f
copy gradle
makemesteaks 0606b45
add gradle cache
makemesteaks c47f490
add only one build type
makemesteaks 7aa42a3
Merge branch 'main' into ale/improve-qa-build-apps-job
makemesteaks 4db514b
E2e with builds (#17897)
makemesteaks 76e90a8
Merge branch 'main' into ale/improve-qa-build-apps-job
makemesteaks e76a617
Merge branch 'main' into ale/improve-qa-build-apps-job
makemesteaks 657095f
update build gradle
makemesteaks 6bd9738
typos
makemesteaks 5fb546c
run tests only if build passes
makemesteaks 4d12e33
variable reassign
makemesteaks 37cca10
defensive check
makemesteaks 8a4f905
no more test build
makemesteaks ab46324
run e2e fix
makemesteaks 640bc08
comment ios
makemesteaks 44a60e0
Revert "no more test build"
makemesteaks 1ce7a5b
remove auto push
makemesteaks 68855bb
correct file
makemesteaks 8dc8505
emulator config changes test
makemesteaks af8127e
actionlint
makemesteaks e350bc3
actionlint
makemesteaks 8a198b8
paths
makemesteaks b85588c
ignore
makemesteaks 1b498fa
ignore
makemesteaks 5a031dd
test
makemesteaks e9ce79a
actionlint
makemesteaks f749d93
add new vars for e2e
makemesteaks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Revert "no more test build"
This reverts commit 8a4f905.
- Loading branch information
commit 44a60e08d8391df8ad746ff6f7849aea5ec3939f
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,179 @@ | ||
| name: Test Android Build QA App | ||
|
|
||
| on: | ||
| push: | ||
cursor[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| workflow_dispatch: | ||
| inputs: | ||
| retention_days: | ||
| description: 'Number of days to retain artifacts' | ||
| required: false | ||
| default: '7' | ||
| type: string | ||
|
|
||
| permissions: | ||
| contents: write | ||
| id-token: write | ||
|
|
||
| jobs: | ||
| android-build: | ||
| name: Test Android Build QA App | ||
| #runs-on: gha-mm-scale-set-ubuntu-22.04-amd64-large | ||
| runs-on: gha-mmsdk-scale-set-ubuntu-22.04-amd64-xl | ||
| outputs: | ||
| artifacts-url: ${{ steps.set-artifacts-url.outputs.artifacts-url }} | ||
| apk-uploaded: ${{ steps.upload-apk.outcome == 'success' }} | ||
| aab-uploaded: ${{ steps.upload-aab.outcome == 'success' }} | ||
| sourcemap-uploaded: ${{ steps.upload-sourcemap.outcome == 'success' }} | ||
| steps: | ||
| # Get the source code from the repository | ||
| - name: Checkout repo | ||
| uses: actions/checkout@v4 | ||
|
|
||
| # Install Android SDK, Node.js, and other Android development dependencies | ||
| - name: Installing Android Environment Setup | ||
| # uses: MetaMask/github-tools/.github/actions/setup-e2e-env@e2e-env-actions | ||
| uses: MetaMask/github-tools/.github/actions/setup-e2e-env@self-hosted-runners-config | ||
| with: | ||
| platform: android | ||
| setup-simulator: false | ||
|
|
||
| # Cache Gradle dependencies (most important for build speed) | ||
| - name: Cache Gradle | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.gradle/caches | ||
| ~/.gradle/wrapper | ||
| android/.gradle | ||
| key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
| restore-keys: | | ||
| gradle-${{ runner.os }}- | ||
|
|
||
|
|
||
|
|
||
| # Display Android development tools information for debugging | ||
| - name: Print Android Environment Info | ||
| run: | | ||
| echo "🔧 Node.js Version:" | ||
| node -v || echo "Node not found" | ||
| echo "Android Studio Version:" | ||
| /Applications/Android\ Studio.app/Contents/MacOS/studio --version || echo "Check manually via finder" | ||
| echo "🧶 Yarn Version:" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| yarn -v || echo "Yarn not found" | ||
| echo "📦 SDK Manager Version:" | ||
| sdkmanager --version || echo "sdkmanager not found" | ||
| echo "📱 ADB Version:" | ||
| adb version || echo "adb not found" | ||
| echo "🖥️ Emulator Version:" | ||
| emulator -version || echo "emulator not found" | ||
| echo "🧱 NDK Info:" | ||
| echo "NDK Dir: $ANDROID_SDK_ROOT/ndk/${NDK_VERSION:-unknown}" | ||
| if [ -n "${NDK_VERSION}" ] && [ -f "$ANDROID_SDK_ROOT/ndk/${NDK_VERSION}/source.properties" ]; then | ||
| grep "Pkg.Revision" "$ANDROID_SDK_ROOT/ndk/${NDK_VERSION}/source.properties" || echo "NDK version info not found" | ||
| else | ||
| echo "NDK not found or NDK_VERSION not set" | ||
| fi | ||
| echo "🔧 Checking for ndk-build:" | ||
| command -v ndk-build || echo "ndk-build not found in PATH" | ||
| echo "🔧 Checking for clang:" | ||
| command -v clang || echo "clang not found in PATH" | ||
| echo "🔧 Checking for llvm-ar:" | ||
| command -v llvm-ar || echo "llvm-ar not found in PATH" | ||
| echo "📱 Available AVD Devices:" | ||
| avdmanager list device || echo "avdmanager not found" | ||
| echo "📱 Available System Images:" | ||
| sdkmanager --list | grep "system-images;" || echo "No system images listed" | ||
| echo "🟢 Emulator Processes:" | ||
| pgrep -fl emulator || echo "No running emulator processes" | ||
| echo "📱 Connected Android Devices:" | ||
| adb devices || echo "adb devices failed" | ||
| shell: bash | ||
|
|
||
|
|
||
|
|
||
| # Run project setup and build the Android QA app (APK and AAB) | ||
| - name: Setup and Build Android App | ||
| run: | | ||
| echo "🚀 Finishing Android Setup..." | ||
| yarn setup:github-ci --no-build-ios | ||
| echo "🏗 Building Android APP..." | ||
| export NODE_OPTIONS="--max-old-space-size=8192" | ||
| cp android/gradle.properties.github android/gradle.properties | ||
| yarn build:android:qa | ||
| shell: bash | ||
| env: | ||
| PLATFORM: android | ||
| METAMASK_ENVIRONMENT: qa | ||
| METAMASK_BUILD_TYPE: main | ||
| IS_TEST: true | ||
| IGNORE_BOXLOGS_DEVELOPMENT: true | ||
| GITHUB_CI: "true" | ||
| CI: "true" | ||
|
|
||
| NODE_OPTIONS: "--max-old-space-size=8192" | ||
|
|
||
| SEGMENT_WRITE_KEY_QA: ${{ secrets.SEGMENT_WRITE_KEY_QA }} | ||
| SEGMENT_PROXY_URL_QA: ${{ secrets.SEGMENT_PROXY_URL_QA }} | ||
| SEGMENT_DELETE_API_SOURCE_ID_QA: ${{ secrets.SEGMENT_DELETE_API_SOURCE_ID_QA }} | ||
| SEGMENT_REGULATIONS_ENDPOINT_QA: ${{ secrets.SEGMENT_REGULATIONS_ENDPOINT_QA }} | ||
|
|
||
| MM_SENTRY_DSN_TEST: ${{ secrets.MM_SENTRY_DSN_TEST }} | ||
| MM_SENTRY_AUTH_TOKEN: ${{ secrets.MM_SENTRY_AUTH_TOKEN }} | ||
|
|
||
| MAIN_IOS_GOOGLE_CLIENT_ID_UAT: ${{ secrets.MAIN_IOS_GOOGLE_CLIENT_ID_UAT }} | ||
| MAIN_IOS_GOOGLE_REDIRECT_URI_UAT: ${{ secrets.MAIN_IOS_GOOGLE_REDIRECT_URI_UAT }} | ||
| MAIN_ANDROID_APPLE_CLIENT_ID_UAT: ${{ secrets.MAIN_ANDROID_APPLE_CLIENT_ID_UAT }} | ||
| MAIN_ANDROID_GOOGLE_CLIENT_ID_UAT: ${{ secrets.MAIN_ANDROID_GOOGLE_CLIENT_ID_UAT }} | ||
| MAIN_ANDROID_GOOGLE_SERVER_CLIENT_ID_UAT: ${{ secrets.MAIN_ANDROID_GOOGLE_SERVER_CLIENT_ID_UAT }} | ||
| GOOGLE_SERVICES_B64_IOS: ${{ secrets.GOOGLE_SERVICES_B64_IOS }} | ||
| GOOGLE_SERVICES_B64_ANDROID: ${{ secrets.GOOGLE_SERVICES_B64_ANDROID }} | ||
|
|
||
| # Upload the Android APK file for device installation and testing | ||
| - name: Upload Android APK Artifact | ||
| id: upload-apk | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: app-qa-release.apk | ||
| path: android/app/build/outputs/apk/qa/release/app-qa-release.apk | ||
| retention-days: ${{ inputs.retention_days }} | ||
| if-no-files-found: error | ||
| continue-on-error: true | ||
|
|
||
| # Upload the Android App Bundle (AAB) for Play Store distribution | ||
| - name: Upload Android AAB Artifact | ||
| id: upload-aab | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: app-qa-release.aab | ||
| path: android/app/build/outputs/bundle/qaRelease/app-qa-release.aab | ||
| retention-days: ${{ inputs.retention_days }} | ||
| if-no-files-found: warn | ||
| continue-on-error: true | ||
|
|
||
| # Upload source map file for crash debugging and error tracking | ||
| - name: Upload Android Source Map | ||
| id: upload-sourcemap | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: index.android.bundle.map | ||
| path: sourcemaps/android/index.android.bundle.map | ||
| retention-days: ${{ inputs.retention_days }} | ||
| if-no-files-found: warn | ||
| continue-on-error: true | ||
|
|
||
| # Generate artifact download URL and display upload status summary | ||
| - name: Set Artifacts URL and Status | ||
| id: set-artifacts-url | ||
| run: | | ||
| ARTIFACTS_URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" | ||
| echo "artifacts-url=${ARTIFACTS_URL}" >> "$GITHUB_OUTPUT" | ||
| echo "📦 Artifacts available at: ${ARTIFACTS_URL}" | ||
| echo "" | ||
| echo "Upload Status Summary:" | ||
| echo "- 🤖 APK: ${{ steps.upload-apk.outcome }}" | ||
| echo "- 📦 AAB Bundle: ${{ steps.upload-aab.outcome }}" | ||
| echo "- 📦 Source Map: ${{ steps.upload-sourcemap.outcome }}" | ||
|
|
||
| env: | ||
| GITHUB_REPOSITORY: "${{ github.repository }}" | ||
| GITHUB_RUN_ID: "${{ github.run_id }}" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be removed, added for testing into this branch