chore: add benchmark to github actions

Signed-off-by: azjezz <azjezz@protonmail.com>
This commit is contained in:
azjezz 2022-12-06 13:47:55 +01:00
parent 452592b8fe
commit c02b4db78d
2 changed files with 13 additions and 6 deletions

View File

@ -22,9 +22,6 @@ jobs:
- name: checkout - name: checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: install just
uses: extractions/setup-just@v1
- name: install rust - name: install rust
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
@ -35,9 +32,18 @@ jobs:
- name: cache - name: cache
uses: Swatinem/rust-cache@v2.0.0 uses: Swatinem/rust-cache@v2.0.0
- name: install just and hyperfine
run: |
cargo install just
cargo install hyperfine
- name: check - name: check
if: matrix.rust == 'stable' if: matrix.rust == 'stable'
run: just lint run: just lint
- name: test - name: test
run: just test run: just test
- name: bench
if: matrix.rust == 'stable'
run: hyperfine --prepare "cargo build -r" --runs 10 --warmup 2 -i "cargo test --all -r"

View File

@ -21,9 +21,6 @@ jobs:
- name: checkout - name: checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: install just
uses: extractions/setup-just@v1
- name: install rust - name: install rust
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
@ -34,6 +31,10 @@ jobs:
- name: cache - name: cache
uses: Swatinem/rust-cache@v2.0.0 uses: Swatinem/rust-cache@v2.0.0
- name: install just
run: |
cargo install just
- name: test third-party - name: test third-party
run: just test-third-party run: just test-third-party