@@ -146,10 +146,67 @@ jobs:
146
146
if : matrix.test-set == 'no-thunks-safe'
147
147
run : cabal test ouroboros-consensus:consensus-test ouroboros-consensus:doctest ouroboros-consensus:infra-test ouroboros-consensus:storage-test ouroboros-consensus-cardano:byron-test ouroboros-consensus-cardano:shelley-test ouroboros-consensus-diffusion:infra-test ouroboros-consensus-protocol:protocol-test -j --test-show-details=streaming
148
148
149
+ - name : Identify benchmark executables
150
+ run : |
151
+ cp $(cabal list-bin mempool-bench) mempool-bench
152
+
153
+ - name : Upload benchmark executables
154
+ uses : actions/upload-artifact@v4
155
+ with :
156
+ name : benchmark-exes-${{ runner.os }}-${{ matrix.ghc }}
157
+ path : mempool-bench
158
+ retention-days : 1
159
+
160
+ # NB: build the haddocks at the end to avoid unecessary recompilations.
161
+ # We build the haddocks only for one GHC version.
162
+ - name : Build Haddock documentation
163
+ if : |
164
+ github.event_name == 'push'
165
+ && github.ref == 'refs/heads/main'
166
+ && matrix.ghc=='9.6.6'
167
+ run : |
168
+ # need for latex, dvisvgm and standalone
169
+ sudo apt install texlive-latex-extra texlive-latex-base
170
+ # cabal-docspec doesn't work with XDG https://github.com/phadej/cabal-extras/issues/136
171
+ sed -i 's_-- store-dir:_store-dir: /home/runner/.local/state/cabal/store_g' ~/.config/cabal/config
172
+ export CABAL_CONFIG=~/.config/cabal/config
173
+
174
+ ./scripts/docs/haddocks.sh
175
+ tar vzcf haddocks.tgz ./docs/website/static/haddocks
176
+
177
+ - name : Upload haddocks as an artifact
178
+ if : |
179
+ github.event_name == 'push'
180
+ && github.ref == 'refs/heads/main'
181
+ && matrix.ghc=='9.6.6'
182
+ uses : actions/upload-artifact@v4
183
+ with :
184
+ name : haddocks
185
+ path : haddocks.tgz
186
+ retention-days : 1
187
+
188
+ benchmarks :
189
+ name : Run benchmarks
190
+ needs : build-test-bench-haddocks
191
+
192
+ runs-on : ubuntu-latest
193
+ strategy :
194
+ fail-fast : false
195
+ matrix :
196
+ ghc : ["8.10.7", "9.6.6", "9.10.1"]
197
+
198
+ steps :
199
+ - uses : actions/checkout@v4
200
+
201
+ - name : Download benchmark executables
202
+ uses : actions/download-artifact@v4
203
+ with :
204
+ name : benchmark-exes-${{ runner.os }}-${{ matrix.ghc }}
205
+
149
206
- name : Create baseline-benchmark
150
207
if : github.event_name == 'push' && github.ref == 'refs/heads/main'
151
208
run : |
152
- cabal new-run ouroboros-consensus: mempool-bench -- \
209
+ ./ mempool-bench \
153
210
--timeout=60 --csv mempool-benchmarks.csv \
154
211
+RTS -T
155
212
@@ -163,7 +220,6 @@ jobs:
163
220
# then we will save the same results we just restored.
164
221
- name : Cache benchmark baseline results
165
222
uses : actions/cache@v4
166
- if : matrix.variant == 'default'
167
223
with :
168
224
path : baseline-mempool-benchmarks.csv
169
225
key : baseline-mempool-benchmarks-${{ runner.os }}-${{ matrix.ghc }}-${{ github.run_id }}
@@ -188,7 +244,7 @@ jobs:
188
244
if : ${{ github.event_name == 'pull_request' }}
189
245
run : |
190
246
if [ -f baseline-mempool-benchmarks.csv ]; then
191
- cabal new-run ouroboros-consensus: mempool-bench -- \
247
+ ./ mempool-bench \
192
248
--timeout=60 --baseline baseline-mempool-benchmarks.csv \
193
249
--fail-if-slower 100 \
194
250
+RTS -T
@@ -197,34 +253,6 @@ jobs:
197
253
echo "Benchmarks comparison skipped."
198
254
fi
199
255
200
- # NB: build the haddocks at the end to avoid unecessary recompilations.
201
- # We build the haddocks only for one GHC version.
202
- - name : Build Haddock documentation
203
- if : |
204
- github.event_name == 'push'
205
- && github.ref == 'refs/heads/main'
206
- && matrix.ghc=='9.6.6'
207
- run : |
208
- # need for latex, dvisvgm and standalone
209
- sudo apt install texlive-latex-extra texlive-latex-base
210
- # cabal-docspec doesn't work with XDG https://github.com/phadej/cabal-extras/issues/136
211
- sed -i 's_-- store-dir:_store-dir: /home/runner/.local/state/cabal/store_g' ~/.config/cabal/config
212
- export CABAL_CONFIG=~/.config/cabal/config
213
-
214
- ./scripts/docs/haddocks.sh
215
- tar vzcf haddocks.tgz ./docs/website/static/haddocks
216
-
217
- - name : Upload haddocks as an artifact
218
- if : |
219
- github.event_name == 'push'
220
- && github.ref == 'refs/heads/main'
221
- && matrix.ghc=='9.6.6'
222
- uses : actions/upload-artifact@v4
223
- with :
224
- name : haddocks
225
- path : haddocks.tgz
226
- retention-days : 1
227
-
228
256
deploy-documentation :
229
257
name : Deploy documentation to GitHub Pages
230
258
if : github.event_name == 'push' && github.ref == 'refs/heads/main'
0 commit comments