-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: GitHub-hosted runners for benchmarks (#29955)
## **Description** ### Major changes - **benchmarks.yml** - Does some important and new-to-us things like: - ~~Self-hosted runner `runs-on: gha-mm-scale-set-ubuntu-22.04-amd64-med`~~ - ~~Running in the same kind of Docker container we use in CircleCI `container: image: cimg/node:22.13-browsers`~~ - ~~Unlike on CircleCI, does not work without installing `Xvfb`~~ - **codespaces.yml** - I originally added this workflow, and it was important to caching in the past, but with the new workflows in GHA, it's no longer needed, so I deleted it - **test-circular-deps.yml** - We were hitting the workflow limit of 20, so I inlined this simple workflow, that did not need to be reusable ### Prerequisites to merging this PR - ✔️ Merge this `benchmarks` branch of `github-tools`: https://github.com/MetaMask/github-tools/blob/benchmarks/.github/actions/setup-environment/action.yml - ✔️ Change `setup-environment@benchmarks` to `setup-environment@1d657e262aea7e3f216754febb624831527d2565` - ~~Vastly increase the number of allocated self-hosted runners~~ (no longer needed because not using self-hosted anymore) ### This is just Part 1 of a larger 4-part task to make the startup time quality gate, but I think it's the hardest part 1. Run on GitHub-hosted runners so that hopefully the numbers will be more stable (this PR) 2. Get this to measure the same measurements in the same way as we do for Sentry 3. Make metamaskbot post with the results of this instead of the current CircleCI source 4. Set up the quality gate [](https://codespaces.new/MetaMask/metamask-extension/pull/29955?quickstart=1) ## **Related issues** Progresses: MetaMask/MetaMask-planning#3679 <!-- ## **Manual testing steps** ## **Screenshots/Recordings** ### **Before** ### **After** ## **Pre-merge author checklist** ## **Pre-merge reviewer checklist** --> --------- Co-authored-by: Norbert Elter <[email protected]>
- Loading branch information
1 parent
e758c07
commit 2b39e3b
Showing
29 changed files
with
133 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
on: | ||
workflow_call: | ||
|
||
env: | ||
COMMANDS: | | ||
{ | ||
pageload: 'yarn benchmark:chrome --out test-artifacts/chrome/benchmark/pageload.json --retries 2', | ||
userActions: 'yarn user-actions-benchmark:chrome --out test-artifacts/chrome/benchmark/user_actions.json --retries 2', | ||
} | ||
jobs: | ||
benchmarks: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
buildType: [browserify, webpack] | ||
testType: [pageload, userActions] | ||
name: ${{ matrix.buildType }}-${{ matrix.testType }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup environment | ||
uses: metamask/github-tools/.github/actions/setup-environment@1d657e262aea7e3f216754febb624831527d2565 | ||
|
||
- name: Download artifact prep-build-test-${{ matrix.buildType }} | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: ./dist/ | ||
pattern: prep-build-test-${{ matrix.buildType }} | ||
merge-multiple: true | ||
|
||
- name: Run the benchmark | ||
# Choose a benchmark command from env.COMMANDS | ||
run: ${{ fromJson(env.COMMANDS)[matrix.testType] }} | ||
|
||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: benchmark-${{ matrix.buildType }}-${{ matrix.testType }} | ||
path: test-artifacts/chrome/benchmark/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.