-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (73 loc) · 2.08 KB
/
rust.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
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
name: Rust
on:
push:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Cremark=all -Zremark-dir=/tmp/remarks -Cdebuginfo=1
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt -y install gnuplot valgrind
- name: Restore Rust cache
uses: actions/cache/restore@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/debug/*/
target/release/*/
Cargo.lock
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml', '.github/workflows/rust.yml') }}
- name: Install nightly Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Unit Tests
uses: actions-rs/cargo@v1
with:
command: test
toolchain: nightly
- name: Build Benchmarks
uses: actions-rs/cargo@v1
with:
command: bench
args: --no-run
toolchain: nightly
- name: Save Rust cache
uses: actions/cache/save@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/debug/*/
target/release/*/
Cargo.lock
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml', '.github/workflows/rust.yml') }}
- name: Upload optimization remarks
uses: actions/upload-artifact@v4
with:
name: Optimization remarks
path: /tmp/remarks/
if-no-files-found: error
- name: Run benchmarks
uses: actions-rs/cargo@v1
with:
command: bench
toolchain: nightly
- name: Upload benchmark reports
uses: actions/upload-artifact@v4
with:
name: Criterion report
path: target/criterion
if-no-files-found: error