@@ -17,10 +17,31 @@ jobs:
17
17
- uses : dtolnay/rust-toolchain@master
18
18
with :
19
19
toolchain : ${{ env.CARGO_TOOLCHAIN }}
20
- - name : Cache Cargo build files
21
- uses : Leafwing-Studios/cargo-cache@v1
20
+ - name : Cache Cargo registry
21
+ uses : actions/cache@v4
22
+ with :
23
+ path : ~/.cargo/registry
24
+ key : ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
25
+ restore-keys : |
26
+ ${{ runner.os }}-cargo-registry-
27
+ - name : Cache Cargo index
28
+ uses : actions/cache@v4
29
+ with :
30
+ path : ~/.cargo/git
31
+ key : ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
32
+ restore-keys : |
33
+ ${{ runner.os }}-cargo-index-
34
+ - name : Cache target directory
35
+ uses : actions/cache@v4
36
+ with :
37
+ path : target
38
+ key : ${{ runner.os }}-target-${{ hashFiles('**/Cargo.lock') }}
39
+ restore-keys : |
40
+ ${{ runner.os }}-target-
22
41
- name : Install Protoc
23
42
uses : arduino/setup-protoc@v3
43
+ with :
44
+ repo-token : ${{ secrets.GITHUB_TOKEN }}
24
45
- name : Run cargo test
25
46
run : cargo test --lib
26
47
@@ -33,10 +54,32 @@ jobs:
33
54
- uses : dtolnay/rust-toolchain@master
34
55
with :
35
56
toolchain : ${{ env.CARGO_TOOLCHAIN }}
36
- - name : Cache Cargo build files
37
- uses : Leafwing-Studios/cargo-cache@v1
57
+ - name : Cache Cargo registry
58
+ uses : actions/cache@v4
59
+ with :
60
+ path : ~/.cargo/registry
61
+ key : ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
62
+ restore-keys : |
63
+ ${{ runner.os }}-cargo-registry-
64
+ - name : Cache Cargo index
65
+ uses : actions/cache@v4
66
+ with :
67
+ path : ~/.cargo/git
68
+ key : ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
69
+ restore-keys : |
70
+ ${{ runner.os }}-cargo-index-
71
+ - name : Cache target directory
72
+ uses : actions/cache@v4
73
+ with :
74
+ path : target
75
+ key : ${{ runner.os }}-target-doc-${{ hashFiles('**/Cargo.lock') }}
76
+ restore-keys : |
77
+ ${{ runner.os }}-target-doc-
78
+ ${{ runner.os }}-target-
38
79
- name : Install Protoc
39
80
uses : arduino/setup-protoc@v3
81
+ with :
82
+ repo-token : ${{ secrets.GITHUB_TOKEN }}
40
83
- name : Run cargo doc
41
84
run : cargo doc --no-deps --document-private-items --lib
42
85
@@ -50,13 +93,35 @@ jobs:
50
93
with :
51
94
toolchain : ${{ env.CARGO_TOOLCHAIN }}
52
95
components : rustfmt, clippy
53
- - name : Cache Cargo build files
54
- uses : Leafwing-Studios/cargo-cache@v1
96
+ - name : Cache Cargo registry
97
+ uses : actions/cache@v4
98
+ with :
99
+ path : ~/.cargo/registry
100
+ key : ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
101
+ restore-keys : |
102
+ ${{ runner.os }}-cargo-registry-
103
+ - name : Cache Cargo index
104
+ uses : actions/cache@v4
105
+ with :
106
+ path : ~/.cargo/git
107
+ key : ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
108
+ restore-keys : |
109
+ ${{ runner.os }}-cargo-index-
110
+ - name : Cache target directory
111
+ uses : actions/cache@v4
112
+ with :
113
+ path : target
114
+ key : ${{ runner.os }}-target-lint-${{ hashFiles('**/Cargo.lock') }}
115
+ restore-keys : |
116
+ ${{ runner.os }}-target-lint-
117
+ ${{ runner.os }}-target-
55
118
- name : Install Protoc
56
119
uses : arduino/setup-protoc@v3
120
+ with :
121
+ repo-token : ${{ secrets.GITHUB_TOKEN }}
57
122
- name : Check format
58
123
run : cargo fmt --all -- --check
59
124
- name : Run clippy with dev features
60
- run : cargo clippy
125
+ run : cargo clippy --all-targets --all-features
61
126
- name : Run clippy without dev features
62
- run : cargo clippy --no-default-features
127
+ run : cargo clippy --all-targets -- no-default-features
0 commit comments