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

Commit 15f27e3

Browse files
authored
Merge pull request #3008 from input-output-hk/rvl/build-benchmarks
[DEVOPS-632] ci: Build benchmarks in hydra and buildkite
2 parents 5d13d58 + 6796074 commit 15f27e3

File tree

2 files changed

+13
-21
lines changed

2 files changed

+13
-21
lines changed

default.nix

+8-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ in
1818
, forceDontCheck ? false
1919
, enableProfiling ? false
2020
, enableDebugging ? false
21+
, enableBenchmarks ? true
2122
, allowCustomConfig ? true
2223
}:
2324

@@ -46,6 +47,12 @@ let
4647
kill $TAILPID
4748
'';
4849
});
50+
# Enables building but not running of benchmarks when
51+
# enableBenchmarks argument is true.
52+
buildWithBenchmarks = drv: if enableBenchmarks
53+
then doBenchmark (appendConfigureFlag drv "--enable-benchmarks")
54+
else drv;
55+
4956
cardanoPkgs = ((import ./pkgs { inherit pkgs; }).override {
5057
ghc = overrideDerivation pkgs.haskell.compiler.ghc822 (drv: {
5158
patches = drv.patches ++ [ ./ghc-8.0.2-darwin-rec-link.patch ];
@@ -76,7 +83,7 @@ let
7683
# cardano-sl-auxx = addGitRev (justStaticExecutables super.cardano-sl-auxx);
7784
cardano-sl-auxx = addGitRev (justStaticExecutables super.cardano-sl-auxx);
7885
cardano-sl-node = addGitRev super.cardano-sl-node;
79-
cardano-sl-wallet-new = addGitRev (justStaticExecutables super.cardano-sl-wallet-new);
86+
cardano-sl-wallet-new = addGitRev (justStaticExecutables (buildWithBenchmarks super.cardano-sl-wallet-new));
8087
cardano-sl-tools = addGitRev (justStaticExecutables (overrideCabal super.cardano-sl-tools (drv: {
8188
# waiting on load-command size fix in dyld
8289
doCheck = ! pkgs.stdenv.isDarwin;

scripts/ci/ci.sh

+5-20
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,14 @@ fi
2222

2323
# TODO: CSL-1133: Add test coverage to CI. To be reenabled when build times
2424
# become smaller and allow coverage report to be built.
25-
#projects="core db lrc infra update ssc godtossing txp"
26-
#to_build=''
27-
28-
#for prj in $projects; do
29-
# to_build="$to_build cardano-sl-$prj"
30-
#done
3125

3226
for trgt in $targets; do
33-
# echo "Prebuilding dependencies for $trgt, quietly.."
34-
# nix-shell -A $trgt --run true --no-build-output --cores 0 --max-jobs 4 default.nix ||
35-
# echo "Prebuild failed!"
36-
3727
echo "Building $trgt verbosely.."
38-
nix-build -A "$trgt" -o "$trgt.root" --argstr gitrev "$BUILDKITE_COMMIT" --argstr buildId "$BUILDKITE_BUILD_NUMBER"
28+
nix-build -A "$trgt" -o "$trgt.root" \
29+
--argstr gitrev "$BUILDKITE_COMMIT" \
30+
--argstr buildId "$BUILDKITE_BUILD_NUMBER" \
31+
--arg enableBenchmarks true
32+
3933
# TODO: CSL-1133
4034
# if [[ "$trgt" == "cardano-sl" ]]; then
4135
# stack test --nix --fast --jobs=2 --coverage \
@@ -44,12 +38,3 @@ for trgt in $targets; do
4438
# fi
4539

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

0 commit comments

Comments
 (0)