-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (64 loc) · 1.85 KB
/
test.yaml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Test
on: push
jobs:
test:
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-22.04
- target: x86_64-apple-darwin
os: macos-11
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Prepare Environment
run: rustup update stable && rustup default stable
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
./target/
key: Test/${{ runner.os }}
- name: Run Tests
run: cargo test
bench:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
ref: dev
path: baseline-branch
- name: Prepare Environment
run: |
rustup update stable
rustup default stable
cargo install cargo-export --version 0.2.0
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
./target/
./baseline-branch/target/
key: Bench/${{ runner.os }}
- name: Building Benchmarks
run: |
cargo export target/benchmarks -- bench --bench=tango
cd baseline-branch
cargo export target/benchmarks -- bench --bench=tango
- name: Run Benchmarks
run: |
set -eo pipefail
target/benchmarks/tango --color=never compare baseline-branch/target/benchmarks/tango \
-v -t 1 --fail-threshold 10 | tee target/benchmark.txt
- uses: actions/upload-artifact@v3
with:
name: benchmark.txt
path: target/benchmark.txt