Commit 50778c6
authored
chore: set up nightly builds with github actions (#26682)
<!--
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**
This PR adds GitHub Actions as a parallel nightly build system alongside
Bitrise, enabling a gradual deprecation of Bitrise for nightly builds.
**Why**: The team wants to migrate nightly builds from Bitrise to GitHub
Actions. To do this safely, both systems need to run in parallel for a
testing/validation period before Bitrise is turned off.
**What changed**:
- **`build.yml`**: Added an optional `skip_version_bump` boolean input
(default: `false`). When `true`, the `update-build-version` job is
skipped and the build runs against the current HEAD of the branch. This
is needed because Bitrise already owns the version bump for
`chore/temp-nightly` (via its `bump_version_code` workflow, which
dispatches `update-latest-build-version.yml` via the GitHub API).
Without this flag, both systems would race to bump the version
concurrently on the same branch. The `prepare` and `build` jobs use
`always() && !failure() && !cancelled()` to correctly handle a skipped
(not failed) `update-build-version` dependency.
- **`nightly-build.yml`** (new): A dedicated workflow that triggers on
every push to `chore/temp-nightly` — the same event that triggers
Bitrise via its dashboard webhook. It runs `main-exp` and `main-rc`
builds for both platforms in parallel, mirroring Bitrise's
`nightly_exp_builds_pipeline` and `nightly_rc_builds_pipeline`. `[skip
ci]` commits (written back to the branch by Bitrise's version bump) are
automatically ignored by GitHub Actions, preventing any re-trigger loop.
A `workflow_dispatch` trigger is also included for manual testing from
any branch.
**Transition path**: When Bitrise is deprecated, remove
`skip_version_bump: true` from `nightly-build.yml` and GitHub Actions
will take over the version bump as well.
<!--
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?
-->
## **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:
## **Related issues**
Fixes:
## **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.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Medium risk because it changes CI control flow (skipped dependencies,
conditional checkouts) and adds a new automated nightly trigger, which
could impact build reproducibility and job execution if misconfigured.
>
> **Overview**
> Adds a `skip_version_bump` input to `.github/workflows/build.yml` to
optionally skip `update-build-version`, adjust downstream
`prepare`/`build` job gating to tolerate skipped dependencies, and
conditionally build from either the bumped commit or the branch HEAD.
>
> Introduces a new `.github/workflows/nightly-build.yml` that runs
nightly `main-exp` and `main-rc` builds for both platforms on pushes to
`chore/temp-nightly`, calling `build.yml` with `skip_version_bump: true`
for parallel operation alongside Bitrise.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e426099. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 48275cf commit 50778c6
2 files changed
Lines changed: 59 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
| |||
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
35 | 43 | | |
36 | 44 | | |
37 | 45 | | |
38 | 46 | | |
39 | 47 | | |
40 | 48 | | |
41 | | - | |
| 49 | + | |
| 50 | + | |
42 | 51 | | |
| 52 | + | |
43 | 53 | | |
44 | 54 | | |
45 | 55 | | |
| |||
52 | 62 | | |
53 | 63 | | |
54 | 64 | | |
| 65 | + | |
55 | 66 | | |
56 | 67 | | |
57 | 68 | | |
| |||
86 | 97 | | |
87 | 98 | | |
88 | 99 | | |
| 100 | + | |
89 | 101 | | |
90 | 102 | | |
91 | 103 | | |
| |||
94 | 106 | | |
95 | 107 | | |
96 | 108 | | |
| 109 | + | |
97 | 110 | | |
98 | 111 | | |
99 | 112 | | |
| |||
102 | 115 | | |
103 | 116 | | |
104 | 117 | | |
| 118 | + | |
105 | 119 | | |
106 | 120 | | |
| 121 | + | |
| 122 | + | |
107 | 123 | | |
108 | 124 | | |
109 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
0 commit comments