Skip to content

Commit c0ff402

Browse files
chore(ci): RC builds: parallelize iOS and Android (#28693)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> This change **bumps the build version once** in a dedicated job that calls **`update-latest-build-version.yml`**, then triggers **iOS and Android** through **`runway-ota-build-core`** in **parallel**. Both jobs use **`skip_version_bump: true`** and **`source_branch`** set to the **version-bump commit SHA** so both builds use the same tree. Downstream steps (PR comment + Slack) now require **both** platform jobs to succeed. ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: null ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/MCWP-521 ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] 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). - [ ] I've completed the PR template to the best of my ability - [ ] I've included tests if applicable - [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] 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.
1 parent 27de0c6 commit c0ff402

1 file changed

Lines changed: 25 additions & 10 deletions

File tree

.github/workflows/build-rc-auto.yml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
# in-progress run of this workflow for that branch is cancelled (same behavior as
99
# Bitrise “Rolling builds” / “Abort running builds” for one branch + one workflow).
1010
#
11-
# Builds are triggered via the Runway OTA/build pipeline (runway-ota-build-core.yml):
12-
# - iOS runs first and performs the version bump.
13-
# - Android runs after, skipping the version bump (already done by iOS).
11+
# Version bump runs once (update-latest-build-version.yml), then iOS and Android
12+
# builds are triggered in parallel via runway-ota-build-core.yml (skip_version_bump).
1413
#
1514
##############################################################################################
1615
name: Auto RC builds
@@ -95,27 +94,43 @@ jobs:
9594
env:
9695
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9796

97+
update_rc_build_version:
98+
name: Update RC build version
99+
uses: ./.github/workflows/update-latest-build-version.yml
100+
needs: validate-and-check-label
101+
if: needs.validate-and-check-label.outputs.has-label == 'true'
102+
permissions:
103+
contents: write
104+
id-token: write
105+
with:
106+
base-branch: ${{ needs.validate-and-check-label.outputs.branch-name }}
107+
secrets:
108+
PR_TOKEN: ${{ secrets.PR_TOKEN }}
109+
98110
trigger-ios-rc-build:
99111
name: Trigger iOS RC Build
100112
uses: ./.github/workflows/runway-ota-build-core.yml
101-
needs: validate-and-check-label
113+
needs:
114+
- validate-and-check-label
115+
- update_rc_build_version
102116
if: needs.validate-and-check-label.outputs.has-label == 'true'
103117
with:
104118
platform: ios
105-
source_branch: ${{ needs.validate-and-check-label.outputs.branch-name }}
119+
source_branch: ${{ needs.update_rc_build_version.outputs.commit-hash }}
120+
skip_version_bump: true
106121
secrets: inherit
107122

108123
trigger-android-rc-build:
109124
name: Trigger Android RC Build
110125
uses: ./.github/workflows/runway-ota-build-core.yml
111126
needs:
112127
- validate-and-check-label
113-
- trigger-ios-rc-build
128+
- update_rc_build_version
114129
if: needs.validate-and-check-label.outputs.has-label == 'true'
115130
with:
116131
platform: android
117-
source_branch: ${{ needs.validate-and-check-label.outputs.branch-name }}
118-
skip_version_bump: true # iOS step already bumped the version
132+
source_branch: ${{ needs.update_rc_build_version.outputs.commit-hash }}
133+
skip_version_bump: true
119134
secrets: inherit
120135

121136
post-rc-build-comment:
@@ -125,7 +140,7 @@ jobs:
125140
- validate-and-check-label
126141
- trigger-ios-rc-build
127142
- trigger-android-rc-build
128-
if: always() && needs.trigger-android-rc-build.result == 'success' && needs.validate-and-check-label.outputs.pr-number != ''
143+
if: always() && needs.trigger-ios-rc-build.result == 'success' && needs.trigger-android-rc-build.result == 'success' && needs.validate-and-check-label.outputs.pr-number != ''
129144
permissions:
130145
pull-requests: write
131146
steps:
@@ -156,7 +171,7 @@ jobs:
156171
- validate-and-check-label
157172
- trigger-ios-rc-build
158173
- trigger-android-rc-build
159-
if: always() && needs.trigger-android-rc-build.result == 'success'
174+
if: always() && needs.trigger-ios-rc-build.result == 'success' && needs.trigger-android-rc-build.result == 'success'
160175
uses: ./.github/workflows/slack-rc-notification.yml
161176
with:
162177
source_branch: ${{ needs.validate-and-check-label.outputs.branch-name }}

0 commit comments

Comments
 (0)