@@ -52,16 +52,22 @@ jobs:
52
52
strategy :
53
53
fail-fast : false
54
54
matrix :
55
- project :
55
+ project :
56
+ # TODO: remove the cargo_project_name and only use the name after renaming mithril-core name in its Cargo.toml
56
57
- name : mithril-core
58
+ cargo_project_name : mithril
57
59
artefacts_pattern : libmithril
58
60
- name : mithril-common
61
+ cargo_project_name : mithril-common
59
62
artefacts_pattern : libmithril_common
60
63
- name : mithril-aggregator
64
+ cargo_project_name : mithril-aggregator
61
65
artefacts_pattern : mithril-aggregator
62
66
- name : mithril-client
67
+ cargo_project_name : mithril-client
63
68
artefacts_pattern : mithril-client
64
69
- name : mithril-signer
70
+ cargo_project_name : mithril-signer
65
71
artefacts_pattern : mithril-signer
66
72
steps :
67
73
- name : Checkout sources
@@ -92,32 +98,31 @@ jobs:
92
98
uses : actions-rs/cargo@v1
93
99
with :
94
100
command : build
95
- args : --release --bins --lib --tests --manifest-path ./ ${{ matrix.project.name }}/Cargo.toml
101
+ args : --release --bins --lib --tests --locked -p ${{ matrix.project.cargo_project_name }}
96
102
97
103
- name : Cargo check
98
104
uses : actions-rs/cargo@v1
99
105
with :
100
106
command : check
101
- args : --release --all-targets --manifest-path ./ ${{ matrix.project.name }}/Cargo.toml
107
+ args : --release --all-targets --locked -p ${{ matrix.project.cargo_project_name }}
102
108
103
109
- name : Cargo fmt
104
110
uses : actions-rs/cargo@v1
105
111
with :
106
112
command : fmt
107
- args : --all --manifest-path ./ ${{ matrix.project.name }}/Cargo.toml -- --check
113
+ args : --all -p ${{ matrix.project.cargo_project_name }}
108
114
109
115
- name : Clippy Check
110
116
uses : actions-rs/clippy-check@v1
111
117
with :
112
118
name : clippy-${{ matrix.project.name }}
113
119
token : ${{ secrets.GITHUB_TOKEN }}
114
- args : --release --manifest-path ./ ${{ matrix.project.name }}/Cargo.toml --all-features
120
+ args : --release --all-features -p ${{ matrix.project.cargo_project_name }}
115
121
116
122
- name : Run cargo test
117
123
shell : bash
118
- working-directory : ${{ matrix.project.name }}
119
124
run : |
120
- set -o pipefail && cargo test --release -- -Z unstable-options --format json --report-time | tee >(cargo2junit > test-results-${{ matrix.project.name }}.xml)
125
+ set -o pipefail && cargo test --release --locked -p ${{ matrix.project.cargo_project_name }} -- -Z unstable-options --format json --report-time | tee >(cargo2junit > test-results-${{ matrix.project.name }}.xml)
121
126
122
127
- name : Upload Unit Test Results
123
128
if : always()
@@ -131,7 +136,7 @@ jobs:
131
136
uses : actions-rs/cargo@v1
132
137
with :
133
138
command : doc
134
- args : --no-deps --release --manifest-path ./ ${{ matrix.project.name }}/Cargo.toml
139
+ args : --no-deps --release -p ${{ matrix.project.cargo_project_name }}
135
140
136
141
- name : Publish ${{ matrix.project.name }}
137
142
uses : actions/upload-artifact@v3
0 commit comments