Skip to content
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 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
Prev Previous commit
Next Next commit
Revert "no more test build"
This reverts commit 8a4f905.
  • Loading branch information
makemesteaks committed Aug 6, 2025
commit 44a60e08d8391df8ad746ff6f7849aea5ec3939f
179 changes: 179 additions & 0 deletions .github/workflows/test-android-build-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
name: Test Android Build QA App

on:
push:
Copy link
Contributor Author

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

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:"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Cross-Platform Path Error

The workflow attempts to check for Android Studio using a macOS-specific path (/Applications/Android\ Studio.app/Contents/MacOS/studio --version) on an Ubuntu runner, causing the check to always fail.

Fix in Cursor Fix in Web

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 }}"
Loading