Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

[DEVOPS-632] ci: Build benchmarks in hydra and buildkite #3008

Merged
merged 1 commit into from
Jun 11, 2018

Conversation

rvl
Copy link
Contributor

@rvl rvl commented May 29, 2018

Description

Benchmarks were not being built in CI and therefore were getting broken without anyone noticing.

This enables building (but not running) of benchmarks.

The CI for this PR should successfully fail because it doesn't include the merge of #3005.

I would like some feedback about the defaults in nix. Should the enableBenchmarks arg default to true or false? Should there be separate derivations with benchmarks enabled?

Linked issue

https://iohk.myjetbrains.com/youtrack/issue/DEVOPS-632

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • CI build scripts fix.

Developer checklist

  • I have read the style guide document, and my code follows the code style of this project.
  • If my code deals with exceptions, it follows the guidelines.
  • I have updated any documentation accordingly, if needed. Documentation changes can be reflected in opening a PR on cardanodocs.com, amending the inline Haddock comments, any relevant README file or one of the document listed in the docs directory.

QA Steps

nix-build -A cardano-sl-wallet-new --arg enableBenchmarks true

Screenshots

bench

@rvl rvl requested a review from iohk-devops as a code owner May 29, 2018 11:33
@rvl rvl force-pushed the rvl/build-benchmarks branch 4 times, most recently from 5114405 to cf0ba8f Compare May 30, 2018 10:43
Copy link
Contributor

@ruhatch ruhatch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@jmitchell jmitchell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a minor naming suggestion, but it's not so serious as to be a blocker.

@@ -10,6 +10,7 @@ in
, forceDontCheck ? false
, enableProfiling ? false
, enableDebugging ? false
, enableBenchmarks ? true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You asked whether this is a good default. Yes, it makes sense. Devs should get feedback about benchmarks that don't build correctly, but we shouldn't spend time running all the benchmarks every build by default.

default.nix Outdated
# enableBenchmarks argument is supplied.
withBenchmarks = drv: if enableBenchmarks
then doBenchmark (appendConfigureFlag drv "--enable-benchmarks")
else drv;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we call this buildWithBenchmarks to clarify it has to do with building the benchmarks rather than running them? When looking at the withBenchmarks call sites people may mistakenly think the latter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks.

@rvl rvl merged commit 15f27e3 into develop Jun 11, 2018
@rvl rvl deleted the rvl/build-benchmarks branch June 11, 2018 07:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants