compare_perf.yml

 1# Generated from xtask::workflows::compare_perf
 2# Rebuild with `cargo xtask workflows`.
 3name: compare_perf
 4on:
 5  workflow_dispatch:
 6    inputs:
 7      head:
 8        description: head
 9        required: true
10        type: string
11      base:
12        description: base
13        required: true
14        type: string
15jobs:
16  run_perf:
17    runs-on: namespace-profile-16x32-ubuntu-2204
18    steps:
19    - name: steps::checkout_repo
20      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
21      with:
22        clean: false
23    - name: steps::setup_cargo_config
24      run: |
25        mkdir -p ./../.cargo
26        cp ./.cargo/ci-config.toml ./../.cargo/config.toml
27      shell: bash -euxo pipefail {0}
28    - name: steps::setup_linux
29      run: ./script/linux
30      shell: bash -euxo pipefail {0}
31    - name: steps::install_mold
32      run: ./script/install-mold
33      shell: bash -euxo pipefail {0}
34    - name: compare_perf::run_perf::install_hyperfine
35      run: cargo install hyperfine
36      shell: bash -euxo pipefail {0}
37    - name: steps::git_checkout
38      run: git fetch origin ${{ inputs.base }} && git checkout ${{ inputs.base }}
39      shell: bash -euxo pipefail {0}
40    - name: compare_perf::run_perf::cargo_perf_test
41      run: cargo perf-test -p gpui -- --json=${{ inputs.base }}
42      shell: bash -euxo pipefail {0}
43    - name: steps::git_checkout
44      run: git fetch origin ${{ inputs.head }} && git checkout ${{ inputs.head }}
45      shell: bash -euxo pipefail {0}
46    - name: compare_perf::run_perf::cargo_perf_test
47      run: cargo perf-test -p gpui -- --json=${{ inputs.head }}
48      shell: bash -euxo pipefail {0}
49    - name: compare_perf::run_perf::compare_runs
50      run: cargo perf-compare --save=results.md ${{ inputs.base }} ${{ inputs.head }}
51      shell: bash -euxo pipefail {0}
52    - name: '@actions/upload-artifact results.md'
53      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
54      with:
55        name: results.md
56        path: results.md
57        if-no-files-found: error
58    - name: steps::cleanup_cargo_config
59      if: always()
60      run: |
61        rm -rf ./../.cargo
62      shell: bash -euxo pipefail {0}