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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.

, allowCustomConfig ? true
}:

Expand All @@ -31,6 +32,12 @@ let
kill $TAILPID
'';
});
# Enables building but not running of benchmarks when
# enableBenchmarks argument is true.
buildWithBenchmarks = drv: if enableBenchmarks
then doBenchmark (appendConfigureFlag drv "--enable-benchmarks")
else drv;

cardanoPkgs = ((import ./pkgs { inherit pkgs; }).override {
ghc = overrideDerivation pkgs.haskell.compiler.ghc802 (drv: {
patches = drv.patches ++ [ ./ghc-8.0.2-darwin-rec-link.patch ];
Expand Down Expand Up @@ -64,7 +71,7 @@ let
executableHaskellDepends = drv.executableHaskellDepends ++ [self.cabal-install];
})));
cardano-sl-node = addGitRev super.cardano-sl-node;
cardano-sl-wallet-new = addGitRev (justStaticExecutables super.cardano-sl-wallet-new);
cardano-sl-wallet-new = addGitRev (justStaticExecutables (buildWithBenchmarks super.cardano-sl-wallet-new));
cardano-sl-tools = addGitRev (justStaticExecutables (overrideCabal super.cardano-sl-tools (drv: {
# waiting on load-command size fix in dyld
doCheck = ! pkgs.stdenv.isDarwin;
Expand Down
25 changes: 5 additions & 20 deletions scripts/ci/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,14 @@ fi

# TODO: CSL-1133: Add test coverage to CI. To be reenabled when build times
# become smaller and allow coverage report to be built.
#projects="core db lrc infra update ssc godtossing txp"
#to_build=''

#for prj in $projects; do
# to_build="$to_build cardano-sl-$prj"
#done

for trgt in $targets; do
# echo "Prebuilding dependencies for $trgt, quietly.."
# nix-shell -A $trgt --run true --no-build-output --cores 0 --max-jobs 4 default.nix ||
# echo "Prebuild failed!"

echo "Building $trgt verbosely.."
nix-build -A "$trgt" -o "$trgt.root" --argstr gitrev "$BUILDKITE_COMMIT" --argstr buildId "$BUILDKITE_BUILD_NUMBER"
nix-build -A "$trgt" -o "$trgt.root" \
--argstr gitrev "$BUILDKITE_COMMIT" \
--argstr buildId "$BUILDKITE_BUILD_NUMBER" \
--arg enableBenchmarks true

# TODO: CSL-1133
# if [[ "$trgt" == "cardano-sl" ]]; then
# stack test --nix --fast --jobs=2 --coverage \
Expand All @@ -44,12 +38,3 @@ for trgt in $targets; do
# fi

done

#if [[ "$OS_NAME" == "linux" && "$BUILDKITE_BRANCH" == "master" && "$BUILDKITE_PULL_REQUEST" == "false" ]]; then
# XXX: DEVOPS-728 this won't work, unless `GITHUB_CARDANO_DOCS_ACCESS_2` and `GITHUB_CARDANO_DOCS_ACCESS` vars are supplied
#
#./update-wallet-web-api-docs.sh
#./update-explorer-web-api-docs.sh
#./update-cli-docs.sh
#./update-haddock.sh
#fi