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

[DEVOPS-1032] nix: Add flag to build with optimization disabled #3544

Merged
merged 2 commits into from
Sep 13, 2018

Conversation

rvl
Copy link
Contributor

@rvl rvl commented Sep 5, 2018

Description

Adds a fasterBuild argument to the nix build. This will result in -O0 being passed to GHC. This can be enabled for PR builds (see input-output-hk/iohk-ops#418) to get quicker turnaround.

Linked issue

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

@rvl
Copy link
Contributor Author

rvl commented Sep 10, 2018

Rebased on latest develop with temp testing commits removed.

@rvl rvl requested a review from a team September 10, 2018 02:09
@rvl rvl changed the title DO NOT MERGE [DEVOPS-1032] nix: Add flag to build with optimization disabled [DEVOPS-1032] nix: Add flag to build with optimization disabled Sep 10, 2018
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.

Minor comment improvement request. Otherwise, LGTM!

default.nix Outdated
@@ -111,6 +112,14 @@ let
});
};

# Disabling optimization for cardano-sl packages will
# return a build x% faster (measured in DEVOPS-1032).
Copy link
Contributor

Choose a reason for hiding this comment

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

According to the issue both mine and Rodney's experiments outside Hydra with cache invalidation (echo >> util/cardano-sl-util.cabal) shows ~20% speedup for all-cardano-sl when optimization is disabled.

On that basis, let's s/x%/20%/ here. input-output-hk/iohk-ops#418 takes care of passing fasterBuild = true; in the Hydra jobset only for PRs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK yes I have amended the commit to add that figure.

Used like this:

    nix-build --arg fasterBuild true -A cardano-sl-wallet-new
@rvl
Copy link
Contributor Author

rvl commented Sep 11, 2018

@jmitchell I realised that I forgot to pass through the argument in release.nix (required for input-output-hk/iohk-ops#418).

I have pushed another commit and tested nix-build release.nix --arg fasterBuild true -A cardano-sl.x86_64-linux.

@rvl rvl merged commit d9ce2a9 into develop Sep 13, 2018
@rvl rvl deleted the devops-1032-disable-opt branch September 13, 2018 00:15
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.

3 participants