Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ self-hosted-runner:
- "ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg"
- "ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-xl"
- "low-priority"
# Namespace runner profile labels (INFRA-3592). Format: namespace-profile-<profile-name>.
- "namespace-profile-metamask-ci-linux"
- "namespace-profile-metamask-android-build"
- "namespace-profile-metamask-ios-build"
- "namespace-profile-metamask-ios-e2e"

# Configuration variables in array of strings defined in your repository or
# organization. `null` means disabling configuration variables check.
Expand Down
3 changes: 2 additions & 1 deletion .github/actions/setup-e2e-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,10 @@ runs:
if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' && runner.os == 'Linux' }}
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 #v3.0.2
with:
timeout_minutes: 3
timeout_minutes: 5
max_attempts: 3
retry_wait_seconds: 30
retry_on: error
on_retry_command: sudo apt-get clean
command: |
set -euo pipefail
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/build-android-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,16 @@ on:
required: false
default: 'qa'
type: string
runner_provider:
description: Runner provider forwarded from the caller
required: false
type: string
default: current

jobs:
build-android-apks:
name: Build Android E2E APKs
runs-on: ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg # Optimized for lg runner (48GB) with conservative memory settings
runs-on: ${{ inputs.runner_provider == 'namespace' && 'namespace-profile-metamask-android-build' || 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg' }} # Optimized for lg runner (48GB) with conservative memory settings
timeout-minutes: 40
env:
GRADLE_USER_HOME: /home/admin/_work/.gradle
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/build-ios-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ on:
required: false
default: 'qa'
type: string
runner_provider:
description: Runner provider forwarded from the caller
required: false
type: string
default: current

permissions:
contents: read
Expand All @@ -25,7 +30,7 @@ permissions:
jobs:
build-ios-apps:
name: Build iOS E2E Apps
runs-on: ghcr.io/cirruslabs/macos-runner:tahoe-xl
runs-on: ${{ inputs.runner_provider == 'namespace' && 'namespace-profile-metamask-ios-build' || 'ghcr.io/cirruslabs/macos-runner:tahoe-xl' }}
outputs:
artifacts-url: ${{ steps.set-artifacts-url.outputs.artifacts-url }}
app-uploaded: ${{ steps.upload-app.outcome == 'success' }}
Expand Down
32 changes: 27 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ on:
required: false
type: boolean
default: false
runner_provider:
description: Runner provider forwarded from the caller
required: false
type: string
default: current
outputs:
build_name:
description: 'build_name input passed to this workflow'
Expand Down Expand Up @@ -81,6 +86,14 @@ on:
required: false
type: boolean
default: false
runner_provider:
description: Runner provider for this manual trial run
required: true
type: choice
options:
- current
- namespace
default: current

permissions:
contents: read
Expand All @@ -104,7 +117,7 @@ jobs:
prepare:
needs: [update-build-version]
if: ${{ always() && !failure() && !cancelled() }}
runs-on: ubuntu-latest
runs-on: ${{ inputs.runner_provider == 'namespace' && 'namespace-profile-metamask-ci-linux' || 'ubuntu-latest' }}
outputs:
github_environment: ${{ steps.config.outputs.github_environment }}
secrets_json: ${{ steps.config.outputs.secrets_json }}
Expand All @@ -117,7 +130,6 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ !inputs.skip_version_bump && needs.update-build-version.outputs.commit-hash || (inputs.source_branch || github.ref_name) }}
- name: Setup Node.js
uses: actions/setup-node@v4
Expand Down Expand Up @@ -165,6 +177,7 @@ jobs:
upload-artifact: true
artifact-name: node-modules-${{ inputs.build_name }}-${{ matrix.platform }}
artifact-retention-days: 1
runner_provider: ${{ inputs.runner_provider }}

# Build
build:
Expand All @@ -175,7 +188,7 @@ jobs:
matrix:
platform: ${{ inputs.platform == 'both' && fromJSON('["android", "ios"]') || fromJSON(format('["{0}"]', inputs.platform)) }}
# Android: Cirrus lg (large) runner for 8GB Gradle heap; iOS: Cirrus macOS Tahoe (has Xcode 26.x)
runs-on: ${{ matrix.platform == 'ios' && 'ghcr.io/cirruslabs/macos-runner:tahoe-xl' || 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg' }}
runs-on: ${{ inputs.runner_provider == 'namespace' && (matrix.platform == 'ios' && 'namespace-profile-metamask-ios-build' || 'namespace-profile-metamask-android-build') || (matrix.platform == 'ios' && 'ghcr.io/cirruslabs/macos-runner:tahoe-xl' || 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg') }}
environment: ${{ needs.prepare.outputs.github_environment }}
steps:
- name: Validate version-bump commit
Expand Down Expand Up @@ -316,6 +329,16 @@ jobs:
SECRETS_JSON: ${{ toJSON(secrets) }}
run: node scripts/validate-secrets-from-config.js

- name: Restore CocoaPods specs cache (iOS)
if: matrix.platform == 'ios'
uses: actions/cache@v4
with:
path: ~/.cocoapods/repos
key: ${{ runner.os }}-cocoapods-specs-${{ hashFiles('ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-cocoapods-specs-
continue-on-error: true

# iOS: Install Pods here so generated paths match this runner (setup-node-modules skips pod install with --no-install-pods).
- name: Install CocoaPods dependencies (iOS)
if: matrix.platform == 'ios'
Expand Down Expand Up @@ -508,7 +531,7 @@ jobs:
name: Emit build metadata
needs: [prepare, build]
if: ${{ !failure() && !cancelled() && needs.prepare.result == 'success' && needs.build.result == 'success' }}
runs-on: ubuntu-latest
runs-on: ${{ inputs.runner_provider == 'namespace' && 'namespace-profile-metamask-ci-linux' || 'ubuntu-latest' }}
outputs:
checkout_ref: ${{ steps.meta.outputs.checkout_ref }}
built_commit_sha: ${{ steps.meta.outputs.built_commit_sha }}
Expand All @@ -518,7 +541,6 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ needs.prepare.outputs.checkout_ref_for_setup }}

- name: Setup Node.js
Expand Down
Loading
Loading