Terminate fetch on No Messages
#434
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: cd | |
on: | |
push: | |
branches: | |
- main | |
env: | |
CARGO_INCREMENTAL: 0 | |
CARGO_PROFILE_DEV_DEBUG: 0 | |
jobs: | |
benchmark: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v4 # v4 uses caching of Go out of the box | |
with: | |
go-version: '1.20' | |
- name: Install nats-server | |
run: go install github.com/nats-io/nats-server/v2@main | |
- name: Install gunplot | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y gnuplot | |
- name: Install stable Rust on ubuntu-latest | |
id: install-rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Cache the build artifacts | |
uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: ${{ runner.os }}-${{ steps.install-rust.outputs.cachekey }}-${{ hashFiles('**/Cargo.toml') }} | |
- name: Build the package # for caching | |
run: cargo build --all --all-targets | |
- name: Run benchmarks | |
env: | |
RUST_LOG: trace | |
run: cargo bench | |
- name: Archive benchmarks | |
uses: actions/upload-artifact@v3 | |
with: | |
name: benchmarks-report | |
path: target/criterion |