Skip to content
Merged
Show file tree
Hide file tree
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 Jul 25, 2025
dd0c3cb
chore: update token
alucardzom Jul 25, 2025
8bf6ad2
chore: test build now
alucardzom Jul 25, 2025
d419385
chore: test without prev steps
alucardzom Jul 25, 2025
252d39a
chore: add setup:github-ci command
alucardzom Jul 25, 2025
fcab962
chore: introduce command within the same step
alucardzom Jul 25, 2025
681540c
chore: run android pipeline
alucardzom Jul 25, 2025
a0f3b8c
chore: remove repeated input
alucardzom Jul 25, 2025
59042d0
chore: remove input
alucardzom Jul 25, 2025
274f3ab
chore: re enabled ios and launch both
alucardzom Jul 28, 2025
94b070c
chore: add missing env vars for the build step
alucardzom Jul 28, 2025
6aa089f
chore: simplify upload
alucardzom Jul 28, 2025
4be3d14
chore: build pods
alucardzom Jul 28, 2025
58b5872
chore: set node memory limit to avoid OOO issue
alucardzom Jul 28, 2025
a76d156
chore: added ipa app source map as optional
alucardzom Jul 29, 2025
d3facfb
chore: we need to run the env setup as figured
alucardzom Jul 29, 2025
4a41c3e
chore: improved legibility and structure
alucardzom Jul 29, 2025
de4e08e
chore: fix shellcheck
alucardzom Jul 29, 2025
3f87b95
chore: add quotes to github output id
alucardzom Jul 29, 2025
b55e5a3
chore: set proper name to artifacts
alucardzom Jul 29, 2025
eaf3096
chore: test self hosted nodes
alucardzom Jul 30, 2025
789052a
chore: test different branch for self hosted runners
alucardzom Jul 30, 2025
be0fca4
chore: test xl android instance for test
alucardzom Jul 31, 2025
84a0cdd
chore: test
alucardzom Jul 31, 2025
1164b83
chore: test some gradle limits for selfhosted
alucardzom Jul 31, 2025
468c92c
chore: remove maxpermsize option
alucardzom Jul 31, 2025
e5da965
chore: set memory limit
alucardzom Jul 31, 2025
2ffb430
chore: another limit
alucardzom Jul 31, 2025
793f039
chore: test limit memory gradle parallel arch
alucardzom Jul 31, 2025
f149418
chore: test xl self hosted
alucardzom Jul 31, 2025
ed308a0
chore: use xl mmsdk
alucardzom Jul 31, 2025
3090d41
chore: try to use gradle_opts variables
alucardzom Jul 31, 2025
75df401
gradle configs
makemesteaks Aug 1, 2025
e0d12df
more gradle configs
makemesteaks Aug 1, 2025
34677c4
gradle for bitrrise and gha
makemesteaks Aug 1, 2025
a50b491
caps
makemesteaks Aug 1, 2025
7b44107
try to override
makemesteaks Aug 1, 2025
8530500
add gradle args
makemesteaks Aug 1, 2025
dfdb84c
path
makemesteaks Aug 1, 2025
ab10e9f
copy gradle
makemesteaks Aug 1, 2025
0606b45
add gradle cache
makemesteaks Aug 1, 2025
c47f490
add only one build type
makemesteaks Aug 3, 2025
7aa42a3
Merge branch 'main' into ale/improve-qa-build-apps-job
makemesteaks Aug 4, 2025
4db514b
E2e with builds (#17897)
makemesteaks Aug 6, 2025
76e90a8
Merge branch 'main' into ale/improve-qa-build-apps-job
makemesteaks Aug 6, 2025
e76a617
Merge branch 'main' into ale/improve-qa-build-apps-job
makemesteaks Aug 6, 2025
657095f
update build gradle
makemesteaks Aug 6, 2025
6bd9738
typos
makemesteaks Aug 6, 2025
5fb546c
run tests only if build passes
makemesteaks Aug 6, 2025
4d12e33
variable reassign
makemesteaks Aug 6, 2025
37cca10
defensive check
makemesteaks Aug 6, 2025
8a4f905
no more test build
makemesteaks Aug 6, 2025
ab46324
run e2e fix
makemesteaks Aug 6, 2025
640bc08
comment ios
makemesteaks Aug 6, 2025
44a60e0
Revert "no more test build"
makemesteaks Aug 6, 2025
1ce7a5b
remove auto push
makemesteaks Aug 6, 2025
68855bb
correct file
makemesteaks Aug 7, 2025
8dc8505
emulator config changes test
makemesteaks Aug 7, 2025
af8127e
actionlint
makemesteaks Aug 7, 2025
e350bc3
actionlint
makemesteaks Aug 7, 2025
8a198b8
paths
makemesteaks Aug 7, 2025
b85588c
ignore
makemesteaks Aug 7, 2025
1b498fa
ignore
makemesteaks Aug 7, 2025
5a031dd
test
makemesteaks Aug 7, 2025
e9ce79a
actionlint
makemesteaks Aug 7, 2025
f749d93
add new vars for e2e
makemesteaks Aug 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions .detoxrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ module.exports = {
device: 'android.bitrise.emulator',
app: 'android.release',
},
'android.github_ci.release': {
device: 'android.github_ci.emulator',
app: 'android.release',
},
'android.emu.flask.release': {
device: 'android.bitrise.emulator',
app: 'android.flask.release',
Expand All @@ -75,10 +79,19 @@ module.exports = {
device: {
avdName: 'emulator',
},
// to be used by github action runners later on
// bootArgs: '-skin 1080x2340 -memory 4096 -cores 4 -gpu swiftshader_indirect -no-audio -no-boot-anim -partition-size 4096',
// forceAdbInstall: true,
// gpuMode: 'swiftshader_indirect',
// optimized for Bitrise CI runners
bootArgs: '-verbose -show-kernel -no-audio -netdelay none -no-snapshot -wipe-data -gpu auto -no-window -no-boot-anim -read-only',
forceAdbInstall: true,
},
'android.github_ci.emulator': {
type: 'android.emulator',
device: {
avdName: 'emulator',
},
// optimized for GitHub Actions CI runners
bootArgs: '-skin 1080x2340 -memory 6144 -cores 4 -gpu swiftshader_indirect -no-audio -no-boot-anim -partition-size 4096 -no-snapshot-save -no-snapshot-load -cache-size 1024 -accel on -wipe-data -read-only',
forceAdbInstall: true,
gpuMode: 'swiftshader_indirect',
},
'android.emulator': {
type: 'android.emulator',
Expand Down
21 changes: 21 additions & 0 deletions .github/actionlint.yaml
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:
126 changes: 126 additions & 0 deletions .github/workflows/build-android-e2e.yml
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
Copy link

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.yml workflow builds Android E2E artifacts with METAMASK_ENVIRONMENT: qa, producing qa flavor 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 in run-e2e-workflow.yml, incorrectly expect these artifacts to be in prod flavor paths. This mismatch causes artifact uploads to fail and prevents Android E2E tests from running due to missing APKs.

Additional Locations (3)
Fix in Cursor Fix in Web

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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ jobs:
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/62dc61a45fc95efe8c800af7a557ab0b9165d63b/scripts/download-actionlint.bash) 1.7.1
shell: bash
- name: Check workflow files
run: ${{ steps.download-actionlint.outputs.executable }} -color
run: ${{ steps.download-actionlint.outputs.executable }} -color -config-file .github/actionlint.yaml
shell: bash
all-jobs-pass:
name: All jobs pass
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/run-e2e-api-specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ on:
workflow_call:
workflow_dispatch:
pull_request:
types: [labeled]
types: [opened, synchronize]

jobs:
api-specs-ios:
name: "api-specs-ios"
if: false
runs-on: macos-latest-xlarge
continue-on-error: true

env:
METAMASK_ENVIRONMENT: 'local'
Expand Down
Loading
Loading