-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (60 loc) · 1.86 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
76
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
BENCHER_PROJECT: language
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
BENCHER_ADAPTER: rust_bench
jobs:
rust:
runs-on: buildjet-4vcpu-ubuntu-2204-arm
steps:
- uses: actions/checkout@v3
- name: Nightly
run: rustup default nightly
- name: Format
run: |
rustup component add rustfmt
cargo fmt --check
# # Install and cache `cargo-audit`
# - uses: taiki-e/cache-cargo-install-action@v1
# with:
# tool: cargo-audit
# locked: false # See https://github.com/taiki-e/cache-cargo-install-action/issues/2
# - name: Audit
# run: cargo audit
- name: Check
run: cargo check
- name: Clippy
run: |
rustup component add clippy
cargo clippy --tests -- --deny warnings
# # Install and cache `cargo-udeps`
# - uses: taiki-e/cache-cargo-install-action@v1
# with:
# tool: cargo-udeps
# - name: Dependencies
# run: cargo udeps
- name: Test
run: cargo test
# # Install and cache `cargo-llvm-cov`
# - uses: taiki-e/cache-cargo-install-action@v1
# with:
# tool: cargo-llvm-cov
# - name: Generate code coverage
# run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# files: lcov.info
# fail_ci_if_error: true
# - name: Install Bencher
# uses: bencherdev/bencher@main
# - name: Benchmark with Bencher
# run: |
# bencher run \
# --err \
# --github-actions ${{ secrets.GITHUB_TOKEN }} \
# --if-branch "$GITHUB_REF_NAME" \
# --else-if-branch "$GITHUB_BASE_REF" \
# --else-if-branch main \
# "cargo bench"