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
15      crate_name:
16        description: crate_name
17        type: string
18        default: ''
19jobs:
20  run_perf:
21    runs-on: namespace-profile-16x32-ubuntu-2204
22    steps:
23    - name: steps::checkout_repo
24      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
25      with:
26        clean: false
27    - name: steps::setup_cargo_config
28      run: |
29        mkdir -p ./../.cargo
30        cp ./.cargo/ci-config.toml ./../.cargo/config.toml
31      shell: bash -euxo pipefail {0}
32    - name: steps::setup_linux
33      run: ./script/linux
34      shell: bash -euxo pipefail {0}
35    - name: steps::install_mold
36      run: ./script/install-mold
37      shell: bash -euxo pipefail {0}
38    - name: steps::download_wasi_sdk
39      run: ./script/download-wasi-sdk
40      shell: bash -euxo pipefail {0}
41    - name: compare_perf::run_perf::install_hyperfine
42      uses: taiki-e/install-action@hyperfine
43    - name: steps::git_checkout
44      run: git fetch origin ${{ inputs.base }} && git checkout ${{ inputs.base }}
45      shell: bash -euxo pipefail {0}
46    - name: compare_perf::run_perf::cargo_perf_test
47      run: |2-
48
49                    if [ -n "${{ inputs.crate_name }}" ]; then
50                        cargo perf-test -p ${{ inputs.crate_name }} -- --json=${{ inputs.base }};
51                    else
52                        cargo perf-test -p vim -- --json=${{ inputs.base }};
53                    fi
54      shell: bash -euxo pipefail {0}
55    - name: steps::git_checkout
56      run: git fetch origin ${{ inputs.head }} && git checkout ${{ inputs.head }}
57      shell: bash -euxo pipefail {0}
58    - name: compare_perf::run_perf::cargo_perf_test
59      run: |2-
60
61                    if [ -n "${{ inputs.crate_name }}" ]; then
62                        cargo perf-test -p ${{ inputs.crate_name }} -- --json=${{ inputs.head }};
63                    else
64                        cargo perf-test -p vim -- --json=${{ inputs.head }};
65                    fi
66      shell: bash -euxo pipefail {0}
67    - name: compare_perf::run_perf::compare_runs
68      run: cargo perf-compare --save=results.md ${{ inputs.base }} ${{ inputs.head }}
69      shell: bash -euxo pipefail {0}
70    - name: '@actions/upload-artifact results.md'
71      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
72      with:
73        name: results.md
74        path: results.md
75        if-no-files-found: error
76    - name: steps::cleanup_cargo_config
77      if: always()
78      run: |
79        rm -rf ./../.cargo
80      shell: bash -euxo pipefail {0}