diff --git a/default.nix b/default.nix index 030255c7d70..08c89370463 100644 --- a/default.nix +++ b/default.nix @@ -127,6 +127,11 @@ let # Backwards compat for iohk-ops. makeFaucetFrontend = self.cardano-sl-faucet-frontend; + #################################################################### + # Report Server + + cardano-report-server-static = self.justStaticExecutablesGitRev self.cardano-report-server; + #################################################################### # Daedalus wallet @@ -265,7 +270,6 @@ let cardano-sl-crypto cardano-sl-db cardano-sl-explorer - cardano-sl-explorer-frontend cardano-sl-explorer-static cardano-sl-generator cardano-sl-infra @@ -276,9 +280,10 @@ let cardano-sl-util cardano-sl-wallet cardano-sl-wallet-new - cardano-sl-x509 - cardano-report-server - cardano-report-server-static; } + cardano-sl-x509; + inherit (self.haskellPackages) + cardano-report-server; } + ); in diff --git a/scripts/ci/check-hydra.sh b/scripts/ci/check-hydra.sh index 96457c2335b..525070d84c9 100755 --- a/scripts/ci/check-hydra.sh +++ b/scripts/ci/check-hydra.sh @@ -1,5 +1,28 @@ -#!/bin/sh +#!/usr/bin/env nix-shell +#!nix-shell -p jq -i bash nix-build https://github.com/nixos/nixpkgs/archive/4fb198892d298452023ab176e7067da58d30772e.tar.gz -A hydra echo '~~~ Evaluating release.nix' -./result/bin/hydra-eval-jobs -I . release.nix +command time --format '%e' -o eval-time.txt ./result/bin/hydra-eval-jobs -I . release.nix > eval.json +EVAL_EXIT_CODE="$?" +if [ "$EVAL_EXIT_CODE" != 0 ] +then + rm eval.json eval-time.txt + echo -e "\\e[31;1mERROR: Failed to evaluate release.nix\\e[0m" + exit 1 +fi +EVAL_TIME=$(cat eval-time.txt) +jq . < eval.json +ERRORS=$(jq -r 'map_values(.error)|to_entries[]|select(.value)|@text "\(.key): \(.value)"' < eval.json) +NUM_ERRORS=$(jq -r '[ map_values(.error)|to_entries[]|select(.value) ] |length' < eval.json) +rm eval.json eval-time.txt + +if [ "$NUM_ERRORS" != 0 ] +then + echo -e "\\e[31;1mERROR: evaluation completed in $EVAL_TIME seconds with $NUM_ERRORS errors\\e[0m" + echo "$ERRORS" + exit 1 +else + echo -e "\\e[32;1mOK: evaluation completed in $EVAL_TIME seconds with no errors\\e[0m" + exit 0 +fi