Skip to content

Commit

Permalink
Disable running integration tests on Hydra CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rvl committed Mar 10, 2020
1 parent 7482427 commit fbc7844
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
4 changes: 3 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
, gitrev ? pkgs.commonLib.commitIdFromGitRepoOrZero ./.git
# Use this to reference local sources rather than the niv pinned versions (see nix/default.nix)
, sourcesOverride ? {}
# GitHub PR number (as a string), set when building a Hydra PR jobset.
, pr ? null
}:

# commonLib includes iohk-nix utilities, our util.nix and nixpkgs lib.
Expand All @@ -60,7 +62,7 @@ let
haskellPackages = import ./nix/haskell.nix {
inherit config lib stdenv pkgs buildPackages;
inherit (pkgs) haskell-nix;
inherit src;
inherit src pr;
};

filterCardanoPackages = lib.filterAttrs (_: package: isCardanoWallet package);
Expand Down
9 changes: 9 additions & 0 deletions nix/haskell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
, profiling ? config.haskellNix.profiling or false
# Project top-level source tree
, src
# GitHub PR number (when building on Hydra)
, pr ? null
}:

let
Expand Down Expand Up @@ -55,6 +57,10 @@ let
# Add dependencies
{
packages.cardano-wallet-jormungandr.components.tests = {
# Only run integration tests on non-PR jobsets. Note that
# the master branch jobset will just re-use the cached Bors
# staging build and test results.
integration.doCheck = !isHydraPRJobset;
# Some tests want to write ~/.local/share/cardano-wallet
integration.preCheck = "export HOME=`pwd`";
# provide jormungandr command to test suites
Expand Down Expand Up @@ -127,5 +133,8 @@ let
];
};

# Hydra will pass the GitHub PR number as a string argument to release.nix.
isHydraPRJobset = toString pr != "";

in
pkgSet.config.hsPkgs // { _config = pkgSet.config; }
14 changes: 10 additions & 4 deletions release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
, projectArgs ? {
config = { allowUnfree = false; inHydra = true; };
gitrev = cardano-wallet.rev;
inherit pr;
}

# The systems that the jobset will be built for.
Expand All @@ -51,6 +52,8 @@
# Import pkgs, including IOHK common nix lib
, pkgs ? import ./nix { inherit sourcesOverride; }

# GitHub PR number (as a string), provided as a Hydra input
, pr ? null
}:

with (import pkgs.iohkNix.release-lib) {
Expand All @@ -73,15 +76,18 @@ let
map (drv: drv // { inherit packageName; }) (collectTests' package)
) ds);

# Remove build jobs for which cross compiling does not make sense.
filterJobsCross = filterAttrs (n: _: n != "dockerImage" && n != "shell" && n != "stackShell");

inherit (systems.examples) mingwW64 musl64;

jobs = {
native = mapTestOn (packagePlatformsOrig project);
# Cross compilation, excluding the dockerImage and shells that we cannnot cross compile
"${mingwW64.config}" = mapTestOnCross mingwW64 (packagePlatformsCross
(filterAttrs (n: _: n != "dockerImage" && n != "shell" && n != "stackShell") project));
musl64 = mapTestOnCross musl64 (packagePlatformsCross
(filterAttrs (n: _: n != "dockerImage" && n != "shell") project));
"${mingwW64.config}" = mapTestOnCross mingwW64
(packagePlatformsCross (filterJobsCross project));
musl64 = mapTestOnCross musl64
(packagePlatformsCross (filterJobsCross project));
}
// {
# This aggregate job is what IOHK Hydra uses to update
Expand Down

0 comments on commit fbc7844

Please sign in to comment.