Skip to content

Commit f833d69

Browse files
authored
Merge branch 'main' into ci/reusable-build-e2e-v3
2 parents 362701c + 4b4292d commit f833d69

83 files changed

Lines changed: 4302 additions & 271 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-android-e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ on:
4343
jobs:
4444
build-android-apks:
4545
name: Build Android E2E APKs
46-
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
46+
runs-on: ${{ inputs.runner_provider == 'namespace' && 'namespace-profile-metamask-android-build' || (startsWith(github.base_ref, 'release/') && fromJSON('["ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg"]') || fromJSON('["ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg", "low-priority"]')) }} # Optimized for lg runner (48GB) with conservative memory settings
4747
timeout-minutes: 40
4848
env:
4949
GRADLE_USER_HOME: ${{ inputs.runner_provider == 'namespace' && '/home/runner/_work/.gradle' || '/home/admin/_work/.gradle' }}

.github/workflows/build-ios-e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ on:
3535
jobs:
3636
build-ios-apps:
3737
name: Build iOS E2E Apps
38-
runs-on: ${{ inputs.runner_provider == 'namespace' && 'namespace-profile-metamask-ios-build' || 'ghcr.io/cirruslabs/macos-runner:tahoe-xl' }}
38+
runs-on: ${{ inputs.runner_provider == 'namespace' && 'namespace-profile-metamask-ios-build' || (startsWith(github.base_ref, 'release/') && fromJSON('["ghcr.io/cirruslabs/macos-runner:tahoe-xl"]') || fromJSON('["ghcr.io/cirruslabs/macos-runner:tahoe-xl", "low-priority"]')) }}
3939
outputs:
4040
artifacts-url: ${{ steps.set-artifacts-url.outputs.artifacts-url }}
4141
app-uploaded: ${{ steps.upload-app.outcome == 'success' }}

.github/workflows/build.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ jobs:
130130
steps:
131131
- uses: actions/checkout@v4
132132
with:
133+
fetch-depth: 1
133134
ref: ${{ !inputs.skip_version_bump && needs.update-build-version.outputs.commit-hash || (inputs.source_branch || github.ref_name) }}
134135
- name: Setup Node.js
135136
uses: actions/setup-node@v4
@@ -169,7 +170,7 @@ jobs:
169170
uses: ./.github/workflows/setup-node-modules.yml
170171
with:
171172
ref: ${{ needs.prepare.outputs.checkout_ref_for_setup }}
172-
fetch-depth: 0
173+
fetch-depth: 1
173174
checkout-submodules: true
174175
platform: ${{ matrix.platform }}
175176
build_name: ${{ inputs.build_name }}
@@ -190,6 +191,9 @@ jobs:
190191
# Android: Cirrus lg (large) runner for 8GB Gradle heap; iOS: Cirrus macOS Tahoe (has Xcode 26.x)
191192
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') }}
192193
environment: ${{ needs.prepare.outputs.github_environment }}
194+
env:
195+
GRADLE_USER_HOME: /home/admin/_work/.gradle
196+
CACHE_GENERATION: v1
193197
steps:
194198
- name: Validate version-bump commit
195199
if: ${{ !inputs.skip_version_bump }}
@@ -375,6 +379,29 @@ jobs:
375379
java-version: '17'
376380
distribution: 'temurin'
377381

382+
- name: Apply release Gradle config (Android)
383+
if: matrix.platform == 'android'
384+
run: cp android/gradle.properties.release android/gradle.properties
385+
386+
- name: Restore Gradle dependencies from branch cache (Android)
387+
if: matrix.platform == 'android'
388+
id: gradle-cache-restore
389+
uses: cirruslabs/cache@bba69c6578b863ad0398ad40567bd2ef70290fe0 # v4
390+
with:
391+
path: |
392+
~/_work/.gradle/caches
393+
~/_work/.gradle/wrapper
394+
key: gradle-release-${{ github.ref_name }}-${{ env.CACHE_GENERATION }}-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
395+
396+
- name: Restore Gradle dependencies from main cache (Android)
397+
if: matrix.platform == 'android' && steps.gradle-cache-restore.outputs.cache-hit != 'true' && github.ref_name != 'main'
398+
uses: cirruslabs/cache/restore@bba69c6578b863ad0398ad40567bd2ef70290fe0 # v4
399+
with:
400+
path: |
401+
~/_work/.gradle/caches
402+
~/_work/.gradle/wrapper
403+
key: gradle-release-main-${{ env.CACHE_GENERATION }}-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
404+
378405
# iOS: Clean up any existing keychains from previous runs
379406
- name: Clean up existing keychains
380407
if: matrix.platform == 'ios' && needs.prepare.outputs.signing_aws_role != ''
@@ -425,6 +452,12 @@ jobs:
425452
timeout-minutes: 115
426453
env:
427454
GIT_BRANCH: ${{ inputs.source_branch || github.ref_name }}
455+
# React Native 0.81's ReactAndroid/build.gradle.kts requests CMake 3.30.5
456+
# via `System.getenv("CMAKE_VERSION") ?: "3.30.5"`. The self-hosted runner
457+
# only ships CMake 3.22.1 in /opt/android-sdk/cmake/ and AGP cannot auto-
458+
# download missing components, causing CXX1300. RN's CMakeLists.txt files
459+
# only require >= 3.13, so 3.22.1 is fully sufficient.
460+
CMAKE_VERSION: '3.22.1'
428461
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 #v3.0.2
429462
with:
430463
timeout_minutes: 55
@@ -541,6 +574,7 @@ jobs:
541574
steps:
542575
- uses: actions/checkout@v4
543576
with:
577+
fetch-depth: 1
544578
ref: ${{ needs.prepare.outputs.checkout_ref_for_setup }}
545579

546580
- name: Setup Node.js

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
- name: Clean state and following up dependencies installation with retry
7373
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 #v3.0.2
7474
with:
75-
timeout_minutes: 10
75+
timeout_minutes: 20
7676
max_attempts: 3
7777
retry_wait_seconds: 30
7878
command: yarn setup:github-ci

.github/workflows/create-build-branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
steps:
2828
- uses: actions/checkout@v4
2929
with:
30-
fetch-depth: 0
30+
fetch-depth: 1
3131
ref: ${{ inputs.source_branch }}
3232
token: ${{ secrets.PR_TOKEN || github.token }}
3333
- name: Create temporary build branch

.github/workflows/push-eas-update.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
- name: Checkout repository
8282
uses: actions/checkout@v4
8383
with:
84-
fetch-depth: 0
84+
fetch-depth: 1
8585

8686
- name: Resolve PR HEAD commit
8787
id: resolve-pr
@@ -118,7 +118,7 @@ jobs:
118118
uses: ./.github/workflows/setup-node-modules.yml
119119
with:
120120
ref: ${{ needs.validate-pr.outputs.commit_sha }}
121-
fetch-depth: 0
121+
fetch-depth: 1
122122
upload-artifact: true
123123
artifact-name: node-modules-eas-update-pr
124124
artifact-retention-days: 1
@@ -130,7 +130,7 @@ jobs:
130130
uses: ./.github/workflows/setup-node-modules.yml
131131
with:
132132
ref: ${{ inputs.base_branch }}
133-
fetch-depth: 0
133+
fetch-depth: 1
134134
upload-artifact: true
135135
artifact-name: node-modules-eas-update-base
136136
artifact-retention-days: 1
@@ -153,6 +153,7 @@ jobs:
153153
uses: actions/setup-node@v4
154154
with:
155155
node-version-file: '.nvmrc'
156+
cache: 'yarn'
156157

157158
- run: yarn install --immutable
158159

@@ -201,14 +202,14 @@ jobs:
201202
uses: actions/checkout@v4
202203
with:
203204
ref: ${{ needs.validate-pr.outputs.commit_sha }}
204-
fetch-depth: 0
205+
fetch-depth: 1
205206

206207
- name: Checkout base branch snapshot
207208
uses: actions/checkout@v4
208209
with:
209210
ref: ${{ env.BASE_BRANCH_REF }}
210211
path: main
211-
fetch-depth: 0
212+
fetch-depth: 1
212213

213214
- name: Setup Node.js
214215
uses: actions/setup-node@v4
@@ -358,7 +359,7 @@ jobs:
358359
uses: actions/checkout@v4
359360
with:
360361
ref: ${{ env.TARGET_COMMIT_HASH }}
361-
fetch-depth: 0
362+
fetch-depth: 1
362363

363364
- name: Setup Node.js
364365
uses: actions/setup-node@v4

.github/workflows/run-e2e-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ on:
6363
jobs:
6464
test-e2e-mobile:
6565
name: ${{ inputs.test-suite-name }}
66-
runs-on: ${{ inputs.runner_provider == 'namespace' && (inputs.platform == 'ios' && 'namespace-profile-metamask-ios-e2e' || 'namespace-profile-metamask-android-build') || (inputs.platform == 'ios' && 'ghcr.io/cirruslabs/macos-runner:tahoe' || 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg') }}
66+
runs-on: ${{ inputs.runner_provider == 'namespace' && (inputs.platform == 'ios' && 'namespace-profile-metamask-ios-e2e' || 'namespace-profile-metamask-android-build') || (startsWith(github.base_ref, 'release/') && fromJSON(format('["{0}"]', inputs.platform == 'ios' && 'ghcr.io/cirruslabs/macos-runner:tahoe' || 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg')) || fromJSON(format('["{0}", "low-priority"]', inputs.platform == 'ios' && 'ghcr.io/cirruslabs/macos-runner:tahoe' || 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg'))) }}
6767
outputs:
6868
apk-target-path: ${{ steps.determine-target-paths.outputs.apk-target-path }}
6969
test-apk-target-path: ${{ steps.determine-target-paths.outputs.test-apk-target-path }}

.github/workflows/update-e2e-fixtures.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ jobs:
180180
update-fixtures:
181181
name: Export & update fixtures
182182
needs: [prepare]
183-
runs-on: ghcr.io/cirruslabs/macos-runner:tahoe
183+
runs-on: ${{ startsWith(github.base_ref, 'release/') && fromJSON('["ghcr.io/cirruslabs/macos-runner:tahoe"]') || fromJSON('["ghcr.io/cirruslabs/macos-runner:tahoe", "low-priority"]') }}
184184
timeout-minutes: 30
185185

186186
env:

.github/workflows/upload-to-testflight.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
- name: Checkout repository
7575
uses: actions/checkout@v4
7676
with:
77-
fetch-depth: 0
77+
fetch-depth: 1
7878

7979
- name: Setup Ruby (iOS)
8080
uses: ruby/setup-ruby@44511735964dcb71245e7e55f72539531f7bc0eb #v1

.gitmodules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[submodule "ios/branch-ios-sdk"]
22
path = ios/branch-ios-sdk
33
url = https://github.com/metamask/ios-branch-deep-linking-attribution
4+
ignore = dirty

0 commit comments

Comments
 (0)