@@ -15,11 +15,14 @@ jobs:
15
15
- name : Checkout sources
16
16
uses : actions/checkout@v3
17
17
18
- - name : Build Mithril workspace & publish artifacts
19
- uses : ./.github/workflows/actions/build-upload-mithril-artifact
18
+ - name : Install stable toolchain and restore cache
19
+ uses : ./.github/workflows/actions/toolchain-and-cache
20
20
with :
21
21
cache-version : ${{ secrets.CACHE_VERSION }}
22
22
23
+ - name : Build Mithril workspace & publish artifacts
24
+ uses : ./.github/workflows/actions/build-upload-mithril-artifact
25
+
23
26
- name : Publish End-to-end runner (${{ runner.os }}-${{ runner.arch }})
24
27
uses : actions/upload-artifact@v3
25
28
with :
@@ -44,11 +47,15 @@ jobs:
44
47
steps :
45
48
- name : Checkout sources
46
49
uses : actions/checkout@v3
50
+
51
+ - name : Install stable toolchain and restore cache
52
+ uses : ./.github/workflows/actions/toolchain-and-cache
53
+ with :
54
+ cache-version : ${{ secrets.CACHE_VERSION }}
47
55
48
56
- name : Build Mithril workspace & publish artifacts
49
57
uses : ./.github/workflows/actions/build-upload-mithril-artifact
50
58
with :
51
- cache-version : ${{ secrets.CACHE_VERSION }}
52
59
build-args : ${{ matrix.build-args }}
53
60
54
61
test :
@@ -75,22 +82,11 @@ jobs:
75
82
- name : Checkout sources
76
83
uses : actions/checkout@v3
77
84
78
- - name : Install stable toolchain
79
- uses : actions-rs/toolchain@v1
80
- with :
81
- profile : minimal
82
- toolchain : stable
83
- override : true
84
-
85
- - name : Rust Cache
86
- uses : Swatinem/rust-cache@v2
85
+ - name : Install stable toolchain, tools, and restore cache
86
+ uses : ./.github/workflows/actions/toolchain-and-cache
87
87
with :
88
- key : ${{ runner.os }}-cache-v${{ secrets.CACHE_VERSION }}
89
-
90
- - name : Install cargo tools
91
- shell : bash
92
- run : |
93
- cargo install cargo2junit 2>/dev/null || true # Suppress the "binary `xyz` already exists in destination" error
88
+ cache-version : ${{ secrets.CACHE_VERSION }}
89
+ cargo-tools : cargo2junit
94
90
95
91
- name : Run tests
96
92
shell : bash
@@ -114,24 +110,11 @@ jobs:
114
110
- name : Checkout sources
115
111
uses : actions/checkout@v3
116
112
117
- - name : Install stable toolchain
118
- uses : actions-rs/toolchain@v1
119
- with :
120
- profile : minimal
121
- toolchain : stable
122
- components : clippy, rustfmt
123
- override : true
124
-
125
- - name : Rust Cache
126
- uses : Swatinem/rust-cache@v2
113
+ - name : Install stable toolchain, tools, and restore cache
114
+ uses : ./.github/workflows/actions/toolchain-and-cache
127
115
with :
128
- key : ${{ runner.os }}-cache-v${{ secrets.CACHE_VERSION }}
129
-
130
- - name : Install cargo tools
131
- if : steps.cargo-cache.outputs.cache-hit == false
132
- shell : bash
133
- run : |
134
- cargo install cargo-sort 2>/dev/null || true # Suppress the "binary `xyz` already exists in destination" error
116
+ cache-version : ${{ secrets.CACHE_VERSION }}
117
+ cargo-tools : cargo-sort
135
118
136
119
- name : Cargo check
137
120
uses : actions-rs/cargo@v1
0 commit comments