|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +name: CodSpeed |
| 19 | + |
| 20 | +concurrency: |
| 21 | + group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} |
| 22 | + cancel-in-progress: true |
| 23 | + |
| 24 | +on: |
| 25 | + push: |
| 26 | + branches-ignore: |
| 27 | + - 'gh-readonly-queue/**' |
| 28 | + paths-ignore: |
| 29 | + - "docs/**" |
| 30 | + - "**.md" |
| 31 | + - ".github/ISSUE_TEMPLATE/**" |
| 32 | + - ".github/pull_request_template.md" |
| 33 | + pull_request: |
| 34 | + paths-ignore: |
| 35 | + - "docs/**" |
| 36 | + - "**.md" |
| 37 | + - ".github/ISSUE_TEMPLATE/**" |
| 38 | + - ".github/pull_request_template.md" |
| 39 | + merge_group: |
| 40 | + # manual trigger |
| 41 | + # https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow |
| 42 | + workflow_dispatch: |
| 43 | + |
| 44 | +jobs: |
| 45 | + cargo_bench: |
| 46 | + name: cargo bench benchmarks |
| 47 | + runs-on: ubuntu-latest |
| 48 | + container: |
| 49 | + image: amd64/rust |
| 50 | + steps: |
| 51 | + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 |
| 52 | + - name: Setup Rust toolchain |
| 53 | + uses: ./.github/actions/setup-builder |
| 54 | + with: |
| 55 | + rust-version: stable |
| 56 | + - name: Rust Dependency Cache |
| 57 | + uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2 |
| 58 | + with: |
| 59 | + shared-key: "amd-ci-codpseed" |
| 60 | + save-if: ${{ github.ref_name == 'main' }} |
| 61 | + - name: Install codpseed-criterion-compat |
| 62 | + working-directory: datafusion/core |
| 63 | + run: cargo add --dev --rename criterion --features async_tokio,async_futures [email protected] |
| 64 | + - name: Build the benchmark targets |
| 65 | + working-directory: core |
| 66 | + run: cargo codspeed build |
| 67 | + - name: Run the benchmarks |
| 68 | + uses: CodSpeedHQ/action@972e3437949c89e1357ebd1a2dbc852fcbc57245 # v4.5.1 |
| 69 | + with: |
| 70 | + mode: simulation |
| 71 | + working-directory: datafusion/core |
| 72 | + run: cargo codspeed run |
0 commit comments