-
-
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 all commits
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
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
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,21 @@ | ||
| self-hosted-runner: | ||
| # Labels of self-hosted runner in array of strings. | ||
| labels: | ||
| - "gha-mmsdk-scale-set-ubuntu-22.04-amd64-xl" | ||
| - "gha-mmsdk-scale-set-ubuntu-22.04-amd64-large" | ||
| - "gha-mm-scale-set-ubuntu-22.04-amd64-large" | ||
| - "macos-15" | ||
|
|
||
| # Configuration variables in array of strings defined in your repository or | ||
| # organization. `null` means disabling configuration variables check. | ||
| # Empty array means no configuration variable is allowed. | ||
| config-variables: null | ||
|
|
||
| # Configuration for file paths. The keys are glob patterns to match to file | ||
| # paths relative to the repository root. The values are the configurations for | ||
| # the file paths. Note that the path separator is always '/'. | ||
| # The following configurations are available. | ||
| # | ||
| # "ignore" is an array of regular expression patterns. Matched error messages | ||
| # are ignored. This is similar to the "-ignore" command line option. | ||
| paths: |
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,126 @@ | ||
| # Pure Android E2E build workflow - just builds APKs and uploads artifacts | ||
| # No testing, no unnecessary setup - optimized for speed and efficiency | ||
|
|
||
| name: Build Android E2E APKs | ||
|
|
||
| on: | ||
| workflow_call: | ||
| outputs: | ||
| apk-uploaded: | ||
| description: 'Whether the APK was successfully uploaded' | ||
| value: ${{ jobs.build-android-apks.outputs.apk-uploaded }} | ||
| aab-uploaded: | ||
| description: 'Whether the AAB was successfully uploaded' | ||
| value: ${{ jobs.build-android-apks.outputs.aab-uploaded }} | ||
| sourcemap-uploaded: | ||
| description: 'Whether the sourcemap was successfully uploaded' | ||
| value: ${{ jobs.build-android-apks.outputs.sourcemap-uploaded }} | ||
|
|
||
| jobs: | ||
| build-android-apks: | ||
| name: Build Android E2E APKs | ||
| runs-on: gha-mmsdk-scale-set-ubuntu-22.04-amd64-xl | ||
| outputs: | ||
| apk-uploaded: ${{ steps.upload-apk.outcome == 'success' }} | ||
| aab-uploaded: ${{ steps.upload-aab.outcome == 'success' }} | ||
| sourcemap-uploaded: ${{ steps.upload-sourcemap.outcome == 'success' }} | ||
|
|
||
| steps: | ||
| - name: Checkout repo | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Android Build Environment | ||
| uses: MetaMask/github-tools/.github/actions/setup-e2e-env@self-hosted-runners-config | ||
| with: | ||
| platform: android | ||
| setup-simulator: false | ||
| configure-keystores: true | ||
| target: qa | ||
|
|
||
| - name: Cache Gradle dependencies | ||
| 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 }}- | ||
|
|
||
| - name: Build Android E2E APKs | ||
| run: | | ||
| echo "🚀 Setting up project..." | ||
| yarn setup:github-ci --no-build-ios | ||
|
|
||
| echo "🏗 Building Android E2E APKs..." | ||
| export NODE_OPTIONS="--max-old-space-size=8192" | ||
| cp android/gradle.properties.github android/gradle.properties | ||
| yarn build:android:main:e2e | ||
| shell: bash | ||
| env: | ||
| PLATFORM: android | ||
| METAMASK_ENVIRONMENT: qa | ||
| METAMASK_BUILD_TYPE: main | ||
| IS_TEST: true | ||
| E2E: "true" | ||
| IGNORE_BOXLOGS_DEVELOPMENT: true | ||
| GITHUB_CI: "true" | ||
| CI: "true" | ||
| NODE_OPTIONS: "--max-old-space-size=8192" | ||
| MM_UNIFIED_SWAPS_ENABLED: "true" | ||
| MM_BRIDGE_ENABLED: "true" | ||
| BRIDGE_USE_DEV_APIS: "true" | ||
| RAMP_INTERNAL_BUILD: "true" | ||
| 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 }} | ||
| MM_INFURA_PROJECT_ID: ${{ secrets.MM_INFURA_PROJECT_ID }} | ||
|
|
||
| - name: Upload Android APK | ||
| id: upload-apk | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: app-prod-release.apk | ||
| path: android/app/build/outputs/apk/prod/release/app-prod-release.apk | ||
| retention-days: 7 | ||
| if-no-files-found: error | ||
|
|
||
| - name: Upload Android Test APK | ||
| id: upload-test-apk | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: app-prod-release-androidTest.apk | ||
| path: android/app/build/outputs/apk/androidTest/prod/release/app-prod-release-androidTest.apk | ||
| retention-days: 7 | ||
| if-no-files-found: error | ||
|
|
||
| - name: Upload Android AAB | ||
| id: upload-aab | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: app-prod-release.aab | ||
| path: android/app/build/outputs/bundle/prodRelease/app-prod-release.aab | ||
| retention-days: 7 | ||
| if-no-files-found: warn | ||
| continue-on-error: true | ||
|
|
||
| - 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: 7 | ||
| if-no-files-found: warn | ||
| continue-on-error: true | ||
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
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
Oops, something went wrong.
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.
Bug: Artifact Path Mismatch Causes Build Failures
The
build-android-e2e.ymlworkflow builds Android E2E artifacts withMETAMASK_ENVIRONMENT: qa, producingqaflavor outputs. However, the subsequent artifact upload steps in this workflow (for main APK, test APK, and AAB), and the artifact download/setup for Android E2E tests inrun-e2e-workflow.yml, incorrectly expect these artifacts to be inprodflavor paths. This mismatch causes artifact uploads to fail and prevents Android E2E tests from running due to missing APKs.Additional Locations (3)
.github/workflows/build-android-e2e.yml#L98-L99.github/workflows/build-android-e2e.yml#L107-L108.github/workflows/run-e2e-workflow.yml#L91-L94