forked from nats-io/nats.rs
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.24 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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 nats
- name: Archive benchmarks
uses: actions/upload-artifact@v3
with:
name: benchmarks-report
path: target/criterion