@@ -15,10 +15,28 @@ jobs:
15
15
- name : Checkout sources
16
16
uses : actions/checkout@v3
17
17
18
+ - name : Install stable toolchain, tools, and restore cache
19
+ uses : ./.github/workflows/actions/toolchain-and-cache
20
+ with :
21
+ cache-version : ${{ secrets.CACHE_VERSION }}
22
+ cargo-tools : cargo-deb
23
+
18
24
- name : Build Mithril workspace & publish artifacts
19
25
uses : ./.github/workflows/actions/build-upload-mithril-artifact
26
+
27
+ - name : Build Debian packages
28
+ shell : bash
29
+ run : |
30
+ cargo deb -p mithril-aggregator
31
+ cargo deb -p mithril-signer
32
+ cargo deb -p mithril-client
33
+
34
+ - name : Publish Debian packages
35
+ uses : actions/upload-artifact@v3
20
36
with :
21
- cache-version : ${{ secrets.CACHE_VERSION }}
37
+ name : mithril-deb-packages-${{ runner.os }}-${{ runner.arch }}
38
+ path : target/debian/*.deb
39
+ if-no-files-found : error
22
40
23
41
- name : Publish End-to-end runner (${{ runner.os }}-${{ runner.arch }})
24
42
uses : actions/upload-artifact@v3
27
45
path : target/release/mithril-end-to-end
28
46
if-no-files-found : error
29
47
48
+
30
49
build :
31
50
strategy :
32
51
fail-fast : false
@@ -44,11 +63,15 @@ jobs:
44
63
steps :
45
64
- name : Checkout sources
46
65
uses : actions/checkout@v3
66
+
67
+ - name : Install stable toolchain and restore cache
68
+ uses : ./.github/workflows/actions/toolchain-and-cache
69
+ with :
70
+ cache-version : ${{ secrets.CACHE_VERSION }}
47
71
48
72
- name : Build Mithril workspace & publish artifacts
49
73
uses : ./.github/workflows/actions/build-upload-mithril-artifact
50
74
with :
51
- cache-version : ${{ secrets.CACHE_VERSION }}
52
75
build-args : ${{ matrix.build-args }}
53
76
54
77
test :
@@ -75,22 +98,11 @@ jobs:
75
98
- name : Checkout sources
76
99
uses : actions/checkout@v3
77
100
78
- - name : Install stable toolchain
79
- uses : actions-rs /toolchain@v1
101
+ - name : Install stable toolchain, tools, and restore cache
102
+ uses : ./.github/workflows/ actions/toolchain-and-cache
80
103
with :
81
- profile : minimal
82
- toolchain : stable
83
- override : true
84
-
85
- - name : Rust Cache
86
- uses : Swatinem/rust-cache@v2
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
104
+ cache-version : ${{ secrets.CACHE_VERSION }}
105
+ cargo-tools : cargo2junit
94
106
95
107
- name : Run tests
96
108
shell : bash
@@ -114,24 +126,11 @@ jobs:
114
126
- name : Checkout sources
115
127
uses : actions/checkout@v3
116
128
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
129
+ - name : Install stable toolchain, tools, and restore cache
130
+ uses : ./.github/workflows/actions/toolchain-and-cache
127
131
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
132
+ cache-version : ${{ secrets.CACHE_VERSION }}
133
+ cargo-tools : cargo-sort
135
134
136
135
- name : Cargo check
137
136
uses : actions-rs/cargo@v1
@@ -312,6 +311,12 @@ jobs:
312
311
name : mithril-distribution-Linux-X64
313
312
path : ./package-Linux-X64
314
313
314
+ - name : Download Debian packages (Linux-X64)
315
+ uses : actions/download-artifact@v3
316
+ with :
317
+ name : mithril-deb-packages-Linux-x64
318
+ path : ./package
319
+
315
320
- name : Download built artifacts (macOS-X64)
316
321
uses : actions/download-artifact@v3
317
322
with :
0 commit comments