mirror of
https://github.com/uutils/sed.git
synced 2026-06-10 16:14:15 -07:00
59 lines
1.6 KiB
YAML
59 lines
1.6 KiB
YAML
name: Benchmarks
|
|
|
|
# spell-checker:ignore codspeed dtolnay Swatinem sccache
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- '*'
|
|
|
|
permissions:
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
# End the current execution if there is a new changeset in the PR.
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
|
|
jobs:
|
|
benchmarks:
|
|
name: Run benchmarks (CodSpeed)
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
benchmark-target:
|
|
- { package: sed }
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Run sccache-cache
|
|
uses: mozilla-actions/sccache-action@v0.0.10
|
|
|
|
- name: Install tools
|
|
uses: taiki-e/install-action@v2
|
|
with:
|
|
tool: cargo-codspeed
|
|
|
|
- name: Build benchmarks for ${{ matrix.benchmark-target.package }}
|
|
shell: bash
|
|
run: |
|
|
echo "Building benchmarks for ${{ matrix.benchmark-target.package }}"
|
|
cargo codspeed build -p ${{ matrix.benchmark-target.package }}
|
|
|
|
- name: Run benchmarks for ${{ matrix.benchmark-target.package }}
|
|
uses: CodSpeedHQ/action@v4
|
|
env:
|
|
CODSPEED_LOG: debug
|
|
with:
|
|
mode: simulation
|
|
run: |
|
|
echo "Running benchmarks for ${{ matrix.benchmark-target.package }}"
|
|
cargo codspeed run -p ${{ matrix.benchmark-target.package }} > /dev/null
|
|
token: ${{ secrets.CODSPEED_TOKEN }}
|