mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-27 17:52:56 +01:00
cf3577550c
* Try to use `cargo-cache` * Tweak issue template
48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
name: Benchmark (Linux)
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
check_benchmark:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: nightly
|
|
profile: minimal
|
|
override: true
|
|
|
|
- name: Generate Cargo.lock
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: generate-lockfile
|
|
- name: Cache cargo registry
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.cargo/registry
|
|
key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-registry-trimmed-${{ hashFiles('**/Cargo.lock') }}
|
|
- name: Cache cargo index
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.cargo/git
|
|
key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }}
|
|
- name: Cache cargo build
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: target
|
|
key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-build-trimmed-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: Check benchmark
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: bench
|
|
|
|
- name: Clear the cargo caches
|
|
run: |
|
|
cargo install cargo-cache --no-default-features --features ci-autoclean
|
|
cargo-cache
|