19
19
20
20
- uses : actions/checkout@v2.3.4
21
21
22
- - name : Cache CARGO_HOME
23
- uses : actions/cache@v2.1.6
24
- with :
25
- path : ~/.cargo
26
- key : cargo-home-${{ hashFiles('Cargo.toml') }}
27
-
28
- - name : Cache cargo build
29
- uses : actions/cache@v2.1.6
30
- with :
31
- path : target
32
- key : cargo-build-target-${{ hashFiles('Cargo.toml') }}
22
+ - uses : Swatinem/rust-cache@v1.3.0
33
23
34
24
- name : Run tests, with no feature
35
25
run : cargo test --workspace --no-default-features
@@ -72,25 +62,13 @@ jobs:
72
62
73
63
- name : Install a recent version of clang
74
64
run : |
75
- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
76
- echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" >> /etc/apt/sources.list
77
65
apt-get update
78
66
apt-get install -y clang-11
79
67
80
68
- name : Install CMake
81
69
run : apt-get install -y cmake
82
70
83
- - name : Cache CARGO_HOME
84
- uses : actions/cache@v2.1.6
85
- with :
86
- path : ~/.cargo
87
- key : cargo-home-${{ hashFiles('Cargo.toml') }}
88
-
89
- - name : Cache cargo build
90
- uses : actions/cache@v2.1.6
91
- with :
92
- path : target
93
- key : wasm-cargo-build-target-${{ hashFiles('Cargo.toml') }}
71
+ - uses : Swatinem/rust-cache@v1.3.0
94
72
95
73
- name : Build on wasm32-unknown-emscripten
96
74
# TODO: also run `cargo test`
@@ -137,17 +115,7 @@ jobs:
137
115
override : true
138
116
components : clippy
139
117
140
- - name : Cache CARGO_HOME
141
- uses : actions/cache@v2.1.6
142
- with :
143
- path : ~/.cargo
144
- key : cargo-home-${{ hashFiles('Cargo.toml') }}
145
-
146
- - name : Cache cargo build
147
- uses : actions/cache@v2.1.6
148
- with :
149
- path : target
150
- key : cargo-build-target-${{ hashFiles('Cargo.toml') }}
118
+ - uses : Swatinem/rust-cache@v1.3.0
151
119
152
120
- name : Run cargo clippy
153
121
uses : actions-rs/cargo@v1.0.3
@@ -168,17 +136,7 @@ jobs:
168
136
169
137
- uses : actions/checkout@v2.3.4
170
138
171
- - name : Cache CARGO_HOME
172
- uses : actions/cache@v2.1.6
173
- with :
174
- path : ~/.cargo
175
- key : cargo-home-${{ hashFiles('Cargo.toml') }}
176
-
177
- - name : Cache cargo build
178
- uses : actions/cache@v2.1.6
179
- with :
180
- path : target
181
- key : cargo-build-target-${{ hashFiles('Cargo.toml') }}
139
+ - uses : Swatinem/rust-cache@v1.3.0
182
140
183
141
- name : Run ipfs-kad example
184
142
run : RUST_LOG=libp2p_swarm=debug,libp2p_kad=trace,libp2p_tcp=debug cargo run --example ipfs-kad
0 commit comments