OHOS: Run speedometer in CI (#37666)

OHOS: Run speedometer in CI for OHOS.
This also adds the forgotten flag to disable jit for HarmonyOs devices.

Need https://github.com/servo/servo/pull/37636 to be merged first and CI
updated which will be done when this PR is marked ready.

Testing: Custom run:
https://github.com/Narfinger/servo/actions/runs/15927927047/job/44929872906
Bencher output:
https://bencher.dev/perf/servo-ci/reports/4f778f61-699e-4e70-8994-bd526733eab1?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr%2Bcomments&utm_term=servo-ci
No other tests available because CI.

---------

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
Co-authored-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
This commit is contained in:
Narfinger 2025-06-28 13:00:53 +02:00 committed by GitHub
parent 12faf09331
commit 64ebde2277
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 49 additions and 16 deletions

View file

@ -169,19 +169,12 @@ jobs:
- name: Build for aarch64 HarmonyOS
run: |
./mach build --locked --target aarch64-unknown-linux-ohos --profile=${{ inputs.profile }} --flavor=harmonyos --no-default-features --features tracing,tracing-hitrace
- name: Upload supprt/hitrace-bencher/runs.json
uses: actions/upload-artifact@v4
with:
name: runs.json
path: support/hitrace-bencher/runs.json
overwrite: true
- uses: actions/upload-artifact@v4
with:
# Upload the **unsigned** artifact - We don't have the signing materials in pull request workflows
name: servoshell-hos-${{ inputs.profile }}.hap
path: target/openharmony/aarch64-unknown-linux-ohos/${{ inputs.profile }}/entry/build/harmonyos/outputs/default/servoshell-default-unsigned.hap
test-harmonyos-aarch64:
name: Test HarmonyOS aarch64
# Don't block servos Merge queue on this job failing.
@ -245,24 +238,62 @@ jobs:
[[ $servo_pid =~ ^[0-9]+$ ]] || { echo "It looks like servo crashed!" ; exit 1; }
# If the grep fails, then the trace output for the "page loaded" prompt is missing
grep 'org\.servo\.servo-.* tracing_mark_write.*PageLoadEndedPrompt' test_output/servo.ftrace
- name: Getting runs file
uses: actions/download-artifact@v4
bench-harmonyos-aarch64:
name: Benching HarmonyOS aarch64
continue-on-error: true
runs-on: hos-runner
needs: test-harmonyos-aarch64
if: github.repository == 'servo/servo'
steps:
- uses: actions/download-artifact@v4
with:
# Name of the artifact to download.
# If unspecified, all artifacts for the run are downloaded.
name: runs.json
name: servoshell-hos-${{ inputs.profile }}.hap
- name: Test hdc device
# First we ensure a device is actually connected and working.
run: hdc list targets && hdc shell echo hello world
- name: Sign the hap
run: |
ls -la
/usr/bin/sign-hos.sh servoshell-default-unsigned.hap servoshell-hos-signed.hap
- name: Install
run: |
# Uninstall first. hdc is not very reliable in terms of exiting with an error, so we uninstall first
# to make sure we don't use a previous version if installation failed for some reason.
hdc uninstall org.servo.servo
hdc install -r servoshell-hos-signed.hap
- uses: actions/checkout@v4
if: github.event_name != 'pull_request_target'
with:
fetch-depth: 2
# This is necessary to checkout the pull request if this run was triggered via a
# `pull_request_target` event.
- uses: actions/checkout@v4
if: github.event_name == 'pull_request_target'
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 2
- name: Setup Python
uses: ./.github/actions/setup-python
- name: "Run benchmark"
run: hitrace-bench -r runs.json
- name: Getting bencher
uses: bencherdev/bencher@main
run: hitrace-bench -r support/hitrace-bencher/runs.json
- name: Run speedometer
run: python3 ./mach test-speedometer-ohos --bmf-output speedometer.json
- name: Getting model name
run: |
echo "MODEL_NAME=$(hdc bugreport | head -n 20 | grep MarketName | awk '{for (i=2; i<NF; i++) printf $i " "; print $NF}' -)" >> $GITHUB_ENV
- name: Combining bencher files
run: jq --compact-output --slurp add speedometer.json bench.json > combined-bencher.json
- uses: bencherdev/bencher@main
- name: Uploading to bencher.dev
run: |
bencher run --adapter json --file bench.json \
--hash '${{ github.sha }}' \
bencher run --adapter json \
--file combined-bencher.json \
--project '${{ env.BENCHER_PROJECT }}' \
--hash '${{ github.sha }}' \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--github-actions '${{ secrets.GITHUB_TOKEN }}' \
--testbed="$MODEL_NAME"

View file

@ -703,6 +703,8 @@ class MachCommands(CommandBase):
"org.servo.servo",
"-U",
"https://servospeedometer.netlify.app?headless=1",
"--ps=--pref",
"js_disable_jit=true",
"--ps",
"--log-filter",
"script::dom::console",