added benchmark #41
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- name: Install just | |
uses: taiki-e/install-action@just | |
- name: Run tests | |
run: just test | |
- name: Run clippy | |
run: just clippy | |
- name: Check formatting | |
run: just fmt-check | |
benchmarks: | |
name: Benchmark | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
needs: test | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install Rust toolchain | |
uses: moonrepo/setup-rust@v1 | |
with: | |
channel: stable | |
cache-target: release | |
- name: "Install codspeed" | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-codspeed | |
- name: clone alacritty | |
run: | | |
git clone https://github.com/alacritty/alacritty | |
git -C ./alacritty checkout 5e78d20c709cb1ab8d44ca7a8702cc26d779227c | |
- name: Benchmark build | |
run: cargo codspeed build | |
- name: CodSpeed benchmark | |
uses: CodSpeedHQ/action@v3 | |
with: | |
run: cargo codspeed run | |
token: ${{ secrets.CODSPEED_TOKEN }} | |