OHOS CI: Robustness of speedometer (#37830)

OHOS CI: If speedometer does not finish we currently abort the whole
job.
This fixes this behaviour by adding an emtpy file and continuing the
job.

Runs with errors will now look like this. Notice annotation.
https://github.com/Narfinger/servo/actions/runs/16026933009

Successful run:
https://github.com/Narfinger/servo/actions/runs/16027530625

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>

Testing: Tested on CI.

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
This commit is contained in:
Narfinger 2025-07-02 23:48:47 +09:00 committed by GitHub
parent 5f0bbce9d2
commit afdd9778e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -31,7 +31,6 @@ on:
default: false default: false
type: boolean type: boolean
env: env:
RUST_BACKTRACE: 1 RUST_BACKTRACE: 1
SHELL: /bin/bash SHELL: /bin/bash
@ -44,7 +43,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
strategy: strategy:
matrix: matrix:
target: ['aarch64-unknown-linux-ohos', 'x86_64-unknown-linux-ohos'] target: ["aarch64-unknown-linux-ohos", "x86_64-unknown-linux-ohos"]
outputs: outputs:
signed: ${{ steps.signing_config.outputs.signed }} signed: ${{ steps.signing_config.outputs.signed }}
steps: steps:
@ -138,7 +137,7 @@ jobs:
needs: ["build"] needs: ["build"]
strategy: strategy:
matrix: matrix:
target: ['aarch64-unknown-linux-ohos', 'x86_64-unknown-linux-ohos'] target: ["aarch64-unknown-linux-ohos", "x86_64-unknown-linux-ohos"]
if: ${{ inputs.bencher && inputs.profile != 'debug' && github.event_name != 'workflow_dispatch' && github.event_name != 'merge_group' }} if: ${{ inputs.bencher && inputs.profile != 'debug' && github.event_name != 'workflow_dispatch' && github.event_name != 'merge_group' }}
uses: ./.github/workflows/bencher.yml uses: ./.github/workflows/bencher.yml
with: with:
@ -279,8 +278,14 @@ jobs:
uses: ./.github/actions/setup-python uses: ./.github/actions/setup-python
- name: "Run benchmark" - name: "Run benchmark"
run: hitrace-bench -r support/hitrace-bencher/runs.json run: hitrace-bench -r support/hitrace-bencher/runs.json
continue-on-error: true
- name: Run speedometer - name: Run speedometer
id: BencherRun
run: python3 ./mach test-speedometer-ohos --bmf-output speedometer.json run: python3 ./mach test-speedometer-ohos --bmf-output speedometer.json
continue-on-error: true
- name: Create empty speedometer.json if failed
run: touch speedometer.json
if: ${{ steps.BencherRun.outcome == 'failure' }}
- name: Getting model name - name: Getting model name
run: | 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 bugreport | head -n 20 | grep MarketName | awk '{for (i=2; i<NF; i++) printf $i " "; print $NF}' -)" >> $GITHUB_ENV
@ -296,4 +301,9 @@ jobs:
--token '${{ secrets.BENCHER_API_TOKEN }}' \ --token '${{ secrets.BENCHER_API_TOKEN }}' \
--github-actions '${{ secrets.GITHUB_TOKEN }}' \ --github-actions '${{ secrets.GITHUB_TOKEN }}' \
--testbed="$MODEL_NAME" --testbed="$MODEL_NAME"
- name: Success
if: ${{ !contains(steps.*.outcome, 'failure') && !contains(steps.*.outcome, 'cancelled') }}
run: exit 0
- name: Failure
if: contains(steps.*.outcome, 'failure') || contains(steps.*.outcome, 'cancelled')
run: exit 1