@@ -16,14 +16,29 @@ jobs:
16
16
17
17
steps :
18
18
- uses : actions/checkout@v4
19
+
20
+ - name : Cache
21
+ id : rust-cache
22
+ uses : actions/cache@v4
23
+ with :
24
+ path : |
25
+ ~/.cargo/bin/
26
+ ~/.cargo/registry/index/
27
+ ~/.cargo/registry/cache/
28
+ ~/.cargo/git/db/
29
+ target/
30
+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml', '.github/workflows/*.yml') }}
31
+
19
32
- name : Install packages
20
33
run : |
21
34
sudo apt update
22
35
sudo apt install -y ${{ matrix.libfuse }} build-essential
23
36
24
- - uses : actions-rust-lang/setup-rust-toolchain@v1
25
- with :
26
- target : x86_64-unknown-linux-musl
37
+ - name : Install Rust
38
+ # if: steps.rust-cache.outputs.cache-hit != 'true'
39
+ run : |
40
+ rustup default 1.81
41
+ rustup target add x86_64-unknown-linux-musl
27
42
28
43
- name : Run tests
29
44
run : |
@@ -36,18 +51,34 @@ jobs:
36
51
runs-on : ubuntu-22.04
37
52
steps :
38
53
- uses : actions/checkout@v4
54
+
55
+ - name : Cache
56
+ id : rust-cache
57
+ uses : actions/cache@v4
58
+ with :
59
+ path : |
60
+ ~/.cargo/bin/
61
+ ~/.cargo/registry/index/
62
+ ~/.cargo/registry/cache/
63
+ ~/.cargo/git/db/
64
+ target/
65
+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml', '.github/workflows/*.yml') }}
66
+
39
67
- name : Install packages
40
68
run : |
41
69
sudo apt update
42
70
sudo apt install -y libfuse-dev libfuse3-dev build-essential
43
71
44
- - uses : actions-rust-lang/setup-rust-toolchain@v1
45
- with :
46
- components : rustfmt, clippy
72
+ - name : Install Rust
73
+ # if: steps.rust-cache.outputs.cache-hit != 'true'
74
+ run : |
75
+ rustup default 1.81
76
+ rustup component add rustfmt
77
+ rustup component add clippy
47
78
48
- - uses : taiki-e/install-action@v2
49
- with :
50
-
79
+ - name : Install cargo-deny
80
+ # if: steps.rust-cache.outputs.cache-hit != 'true'
81
+ run : cargo +1.81 install --force --version 0.16.2 cargo-deny --locked
51
82
52
83
- name : Run tests
53
84
run : INTERACTIVE="" make pre
0 commit comments