Skip to content

Commit bb6eb1e

Browse files
chore(INFRA-3591): temp Bitrise iOS KV cache workflow + runners monitoring (POC)
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 29f05cf commit bb6eb1e

4 files changed

Lines changed: 416 additions & 1 deletion

File tree

.github/actionlint.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ self-hosted-runner:
1515
- "ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg"
1616
- "ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-xl"
1717
- "low-priority"
18+
# Bitrise GHA runner pool labels (self-hosted runner group temp-bitrise-runners)
19+
- "bitrise_pool_name:DemoFA"
20+
- "bitrise_pool_name:DemoFAL"
21+
- "bitrise_pool_name:DemoFAXL"
1822

1923
# Configuration variables in array of strings defined in your repository or
2024
# organization. `null` means disabling configuration variables check.

.github/workflows/run-e2e-smoke-tests-ios.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ on:
1313
required: false
1414
type: string
1515
default: ''
16+
use_bitrise_runner:
17+
description: "Route iOS E2E jobs to Bitrise self-hosted runner group."
18+
required: false
19+
type: boolean
20+
default: false
1621

1722
permissions:
1823
contents: read
@@ -35,6 +40,7 @@ jobs:
3540
changed_files: ${{ inputs.changed_files }}
3641
build_type: 'main'
3742
metamask_environment: 'qa'
43+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
3844
secrets: inherit
3945

4046
swap-ios-smoke:
@@ -53,6 +59,7 @@ jobs:
5359
changed_files: ${{ inputs.changed_files }}
5460
build_type: 'main'
5561
metamask_environment: 'qa'
62+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
5663
secrets: inherit
5764

5865
stake-ios-smoke:
@@ -89,6 +96,7 @@ jobs:
8996
changed_files: ${{ inputs.changed_files }}
9097
build_type: 'main'
9198
metamask_environment: 'qa'
99+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
92100
secrets: inherit
93101

94102
wallet-platform-ios-smoke:
@@ -125,6 +133,7 @@ jobs:
125133
changed_files: ${{ inputs.changed_files }}
126134
build_type: 'main'
127135
metamask_environment: 'qa'
136+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
128137
secrets: inherit
129138

130139
accounts-ios-smoke:
@@ -143,6 +152,7 @@ jobs:
143152
changed_files: ${{ inputs.changed_files }}
144153
build_type: 'main'
145154
metamask_environment: 'qa'
155+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
146156
secrets: inherit
147157

148158
network-abstraction-ios-smoke:
@@ -161,6 +171,7 @@ jobs:
161171
changed_files: ${{ inputs.changed_files }}
162172
build_type: 'main'
163173
metamask_environment: 'qa'
174+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
164175
secrets: inherit
165176

166177
network-expansion-ios-smoke:
@@ -179,6 +190,7 @@ jobs:
179190
changed_files: ${{ inputs.changed_files }}
180191
build_type: 'main'
181192
metamask_environment: 'qa'
193+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
182194
secrets: inherit
183195

184196
prediction-market-ios-smoke:
@@ -197,6 +209,7 @@ jobs:
197209
changed_files: ${{ inputs.changed_files }}
198210
build_type: 'main'
199211
metamask_environment: 'qa'
212+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
200213
secrets: inherit
201214

202215
money-ios-smoke:
@@ -233,6 +246,7 @@ jobs:
233246
changed_files: ${{ inputs.changed_files }}
234247
build_type: 'main'
235248
metamask_environment: 'qa'
249+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
236250
secrets: inherit
237251

238252
seedless-onboarding-ios-smoke:
@@ -251,6 +265,7 @@ jobs:
251265
changed_files: ${{ inputs.changed_files }}
252266
build_type: 'main'
253267
metamask_environment: 'qa'
268+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
254269
secrets: inherit
255270

256271
browser-ios-smoke:
@@ -269,6 +284,7 @@ jobs:
269284
changed_files: ${{ inputs.changed_files }}
270285
build_type: 'main'
271286
metamask_environment: 'qa'
287+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
272288
secrets: inherit
273289

274290
snaps-ios-smoke:
@@ -287,6 +303,7 @@ jobs:
287303
changed_files: ${{ inputs.changed_files }}
288304
build_type: 'main'
289305
metamask_environment: 'qa'
306+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
290307
secrets: inherit
291308

292309
report-ios-smoke-tests:

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

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,16 @@ on:
5353
required: false
5454
type: string
5555
default: 'main-'
56+
use_bitrise_runner:
57+
description: 'Route iOS E2E jobs to Bitrise self-hosted runner group.'
58+
required: false
59+
type: boolean
60+
default: false
5661

5762
jobs:
5863
test-e2e-mobile:
5964
name: ${{ inputs.test-suite-name }}
60-
runs-on: ${{ inputs.platform == 'ios' && 'ghcr.io/cirruslabs/macos-runner:tahoe' || 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg' }}
65+
runs-on: ${{ inputs.platform == 'ios' && (inputs.use_bitrise_runner && fromJSON('{"group":"temp-bitrise-runners","labels":["bitrise_pool_name:DemoFAL"]}') || 'ghcr.io/cirruslabs/macos-runner:tahoe') || 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg' }}
6166
outputs:
6267
apk-target-path: ${{ steps.determine-target-paths.outputs.apk-target-path }}
6368
test-apk-target-path: ${{ steps.determine-target-paths.outputs.test-apk-target-path }}
@@ -102,6 +107,34 @@ jobs:
102107
- name: Checkout
103108
uses: actions/checkout@v6
104109

110+
# TEMPORARY: Bitrise runners use Vagrant (user=vagrant, HOME=/Users/vagrant).
111+
# GitHub Actions tools hardcode /Users/runner paths, so create the symlink.
112+
- name: Fix Vagrant environment paths (Bitrise runners)
113+
if: ${{ inputs.use_bitrise_runner && inputs.platform == 'ios' }}
114+
run: |
115+
if [ -L /Users/runner ]; then
116+
current_target="$(readlink /Users/runner)"
117+
if [ "$current_target" = "/Users/vagrant" ]; then
118+
echo "Symlink already correct: /Users/runner -> /Users/vagrant"
119+
else
120+
echo "Replacing incorrect symlink /Users/runner -> $current_target"
121+
sudo rm /Users/runner
122+
sudo ln -s /Users/vagrant /Users/runner
123+
echo "Recreated symlink: /Users/runner -> /Users/vagrant"
124+
fi
125+
elif [ -e /Users/runner ]; then
126+
echo "Error: /Users/runner exists but is not a symlink"
127+
ls -ld /Users/runner
128+
exit 1
129+
else
130+
sudo ln -s /Users/vagrant /Users/runner
131+
echo "Created symlink /Users/runner -> /Users/vagrant"
132+
fi
133+
mkdir -p "$HOME/hostedtoolcache" "$HOME/tmp"
134+
echo "RUNNER_TOOL_CACHE=$HOME/hostedtoolcache" >> "$GITHUB_ENV"
135+
echo "RUNNER_TEMP=$HOME/tmp" >> "$GITHUB_ENV"
136+
shell: bash
137+
105138
- name: Restore .metamask folder
106139
uses: actions/cache@v4
107140
with:

0 commit comments

Comments
 (0)