ohos CI: Simplify getting the model name (#38219)

Same output, but much easier and faster than sifting through the whole
output of hdc bugreport.

Testing: CI change: `./mach try`
[run](https://github.com/servo/servo/actions/runs/16460283107)

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
Jonathan Schwender 2025-07-23 12:25:53 +08:00 committed by GitHub
parent b8a1df2bc2
commit 6417d3077b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -295,8 +295,9 @@ jobs:
run: touch speedometer.json
if: ${{ steps.BencherRun.outcome == 'failure' }}
- name: Getting model name
# awk is used to remove trailing spaces
run: |
echo "MODEL_NAME=$(hdc bugreport | head -n 20 | grep MarketName | awk '{for (i=2; i<NF; i++) printf $i " "; print $NF}' -)" >> $GITHUB_ENV
echo "MODEL_NAME=$(hdc shell param get const.product.name | awk '{$1=$1;print}' )" >> $GITHUB_ENV
- name: Combining bencher files
run: jq --compact-output --slurp add speedometer.json bench.json > combined-bencher.json
- uses: bencherdev/bencher@main