63
63
path : target/build.json
64
64
if-no-files-found : error
65
65
66
- self_metrics :
66
+ other_metrics :
67
+ strategy :
68
+ matrix :
69
+ names : [self, ripgrep, webrender, diesel]
67
70
runs-on : ubuntu-latest
68
71
needs : [setup_cargo, build_metrics]
69
72
@@ -87,123 +90,19 @@ jobs:
87
90
path : target/
88
91
key : ${{ runner.os }}-target-${{ github.sha }}
89
92
90
- - name : Collect build metrics
91
- run : cargo xtask metrics self
92
-
93
- - name : Upload build metrics
94
- uses : actions/upload-artifact@v3
95
- with :
96
- name : self-${{ github.sha }}
97
- path : target/self.json
98
- if-no-files-found : error
99
-
100
- ripgrep_metrics :
101
- runs-on : ubuntu-latest
102
- needs : [setup_cargo, build_metrics]
103
-
104
- steps :
105
- - name : Checkout repository
106
- uses : actions/checkout@v3
107
-
108
- - name : Restore cargo cache
109
- uses : actions/cache@v3
110
- with :
111
- path : |
112
- ~/.cargo/bin/
113
- ~/.cargo/registry/index/
114
- ~/.cargo/registry/cache/
115
- ~/.cargo/git/db/
116
- key : ${{ runner.os }}-cargo-${{ github.sha }}
93
+ - name : Collect metrics
94
+ run : cargo xtask metrics ${{ matrix.names }}
117
95
118
- - name : Restore target cache
119
- uses : actions/cache@v3
120
- with :
121
- path : target/
122
- key : ${{ runner.os }}-target-${{ github.sha }}
123
-
124
- - name : Collect build metrics
125
- run : cargo xtask metrics ripgrep
126
-
127
- - name : Upload ripgrep metrics
96
+ - name : Upload metrics
128
97
uses : actions/upload-artifact@v3
129
98
with :
130
- name : ripgrep -${{ github.sha }}
131
- path : target/ripgrep .json
99
+ name : ${{ matrix.names }} -${{ github.sha }}
100
+ path : target/${{ matrix.names }} .json
132
101
if-no-files-found : error
133
102
134
- webrender_metrics :
135
- runs-on : ubuntu-latest
136
- needs : [setup_cargo, build_metrics]
137
-
138
- steps :
139
- - name : Checkout repository
140
- uses : actions/checkout@v3
141
-
142
- - name : Restore cargo cache
143
- uses : actions/cache@v3
144
- with :
145
- path : |
146
- ~/.cargo/bin/
147
- ~/.cargo/registry/index/
148
- ~/.cargo/registry/cache/
149
- ~/.cargo/git/db/
150
- key : ${{ runner.os }}-cargo-${{ github.sha }}
151
-
152
- - name : Restore target cache
153
- uses : actions/cache@v3
154
- with :
155
- path : target/
156
- key : ${{ runner.os }}-target-${{ github.sha }}
157
-
158
- - name : Collect webrender metrics
159
- run : cargo xtask metrics webrender
160
-
161
- - name : Upload webrender metrics
162
- uses : actions/upload-artifact@v3
163
- with :
164
- name : webrender-${{ github.sha }}
165
- path : target/webrender.json
166
- if-no-files-found : error
167
-
168
- diesel_metrics :
169
- runs-on : ubuntu-latest
170
- needs : [setup_cargo, build_metrics]
171
-
172
- steps :
173
- - name : Checkout repository
174
- uses : actions/checkout@v3
175
-
176
- - name : Restore cargo cache
177
- uses : actions/cache@v3
178
- with :
179
- path : |
180
- ~/.cargo/bin/
181
- ~/.cargo/registry/index/
182
- ~/.cargo/registry/cache/
183
- ~/.cargo/git/db/
184
- key : ${{ runner.os }}-cargo-${{ github.sha }}
185
-
186
- - name : Restore target cache
187
- uses : actions/cache@v3
188
- with :
189
- path : target/
190
- key : ${{ runner.os }}-target-${{ github.sha }}
191
-
192
- - name : Collect build metrics
193
- run : cargo xtask metrics diesel
194
-
195
- - name : Upload build metrics
196
- uses : actions/upload-artifact@v3
197
- with :
198
- name : diesel-${{ github.sha }}
199
- path : target/diesel.json
200
- if-no-files-found : error
201
-
202
-
203
-
204
103
generate_final_metrics :
205
104
runs-on : ubuntu-latest
206
- needs : [build_metrics, self_metrics, ripgrep_metrics, webrender_metrics, diesel_metrics ]
105
+ needs : [build_metrics, other_metrics ]
207
106
steps :
208
107
- name : Checkout repository
209
108
uses : actions/checkout@v3
0 commit comments