Skip to content

Commit 0fc1185

Browse files
Qbandevclaude
andauthored
feat(ci): POC Bitrise GH Action runners for iOS E2E (#28791)
## **Description** Adds a temporary optional workflow to benchmark iOS E2E builds and tests on Bitrise-provided GitHub Actions self-hosted runners as an alternative to the current Cirrus CI macOS runners. **What changed:** - New `temp-bitrise-ios-e2e.yml` workflow (standalone benchmarking, not part of CI gate) - `run-e2e-workflow.yml` added `use_bitrise_runner` boolean input for optional Bitrise runner routing, plus Vagrant path fix - `run-e2e-smoke-tests-ios.yml` threaded `use_bitrise_runner` through all 13 smoke test jobs **Trigger strategy:** - PRs: opt-in via `bitrise-poc` label only (label-based + `synchronize`) - Main: hourly cron for baseline data collection - Concurrency group per branch (stale pushes auto-cancelled) - Fork PRs blocked from running on self-hosted runners **Existing CI pipeline is NOT modified.** All defaults preserved (Cirrus runners remain the default). **Security:** - Label-gated trigger (no automatic execution on all PRs) - Fork PR guard (`!github.event.pull_request.head.repo.fork`) - Boolean input with hardcoded runner group name (no string injection) - `configure-keystores: false` (no signing certificates on Bitrise runners) ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: INFRA-3527 ## **Manual testing steps** ```gherkin Feature: Bitrise iOS E2E Runner Benchmarking Scenario: Trigger benchmarking workflow via label Given a PR exists on the repo When user adds the bitrise-poc label Then the iOS build starts on Bitrise runner And all 13 smoke test suites run on Bitrise runners And artifacts are uploaded And no sensitive data appears in workflow logs Scenario: Fork PR does not trigger Given a fork PR exists with the bitrise-poc label Then the workflow is skipped ``` ## **Screenshots/Recordings** N/A (CI workflow changes only) ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3a70efc commit 0fc1185

4 files changed

Lines changed: 407 additions & 1 deletion

File tree

.github/actionlint.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ 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_pool_name:DemoFA"
19+
- "bitrise_pool_name:DemoFAXL"
1820

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

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

Lines changed: 18 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
trade-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
perps-ios-smoke:
@@ -71,6 +78,7 @@ jobs:
7178
changed_files: ${{ inputs.changed_files }}
7279
build_type: 'main'
7380
metamask_environment: 'qa'
81+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
7482
secrets: inherit
7583

7684
wallet-platform-ios-smoke:
@@ -89,6 +97,7 @@ jobs:
8997
changed_files: ${{ inputs.changed_files }}
9098
build_type: 'main'
9199
metamask_environment: 'qa'
100+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
92101
secrets: inherit
93102

94103
identity-ios-smoke:
@@ -107,6 +116,7 @@ jobs:
107116
changed_files: ${{ inputs.changed_files }}
108117
build_type: 'main'
109118
metamask_environment: 'qa'
119+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
110120
secrets: inherit
111121

112122
accounts-ios-smoke:
@@ -125,6 +135,7 @@ jobs:
125135
changed_files: ${{ inputs.changed_files }}
126136
build_type: 'main'
127137
metamask_environment: 'qa'
138+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
128139
secrets: inherit
129140

130141
network-abstraction-ios-smoke:
@@ -143,6 +154,7 @@ jobs:
143154
changed_files: ${{ inputs.changed_files }}
144155
build_type: 'main'
145156
metamask_environment: 'qa'
157+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
146158
secrets: inherit
147159

148160
network-expansion-ios-smoke:
@@ -161,6 +173,7 @@ jobs:
161173
changed_files: ${{ inputs.changed_files }}
162174
build_type: 'main'
163175
metamask_environment: 'qa'
176+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
164177
secrets: inherit
165178

166179
prediction-market-ios-smoke:
@@ -179,6 +192,7 @@ jobs:
179192
changed_files: ${{ inputs.changed_files }}
180193
build_type: 'main'
181194
metamask_environment: 'qa'
195+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
182196
secrets: inherit
183197

184198
card-ios-smoke:
@@ -197,6 +211,7 @@ jobs:
197211
changed_files: ${{ inputs.changed_files }}
198212
build_type: 'main'
199213
metamask_environment: 'qa'
214+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
200215
secrets: inherit
201216

202217
ramps-ios-smoke:
@@ -215,6 +230,7 @@ jobs:
215230
changed_files: ${{ inputs.changed_files }}
216231
build_type: 'main'
217232
metamask_environment: 'qa'
233+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
218234
secrets: inherit
219235

220236
multichain-api-ios-smoke:
@@ -233,6 +249,7 @@ jobs:
233249
changed_files: ${{ inputs.changed_files }}
234250
build_type: 'main'
235251
metamask_environment: 'qa'
252+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
236253
secrets: inherit
237254

238255
seedless-onboarding-ios-smoke:
@@ -251,6 +268,7 @@ jobs:
251268
changed_files: ${{ inputs.changed_files }}
252269
build_type: 'main'
253270
metamask_environment: 'qa'
271+
use_bitrise_runner: ${{ inputs.use_bitrise_runner }}
254272
secrets: inherit
255273

256274
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:DemoFA"]}') || '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@v4
104109

110+
# TEMPORARY: Bitrise runners use Vagrant (user=vagrant, HOME=/Users/vagrant).
111+
# GitHub Actions tools hardcode /Users/runner paths. Create symlink to fix.
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: Set up E2E environment
106139
timeout-minutes: 15
107140
uses: ./.github/actions/setup-e2e-env

0 commit comments

Comments
 (0)