Skip to content

Commit

Permalink
improve CI times by pre-building stylish-haskell on hydra
Browse files Browse the repository at this point in the history
  • Loading branch information
cleverca22 committed Nov 4, 2019
1 parent a5fecf0 commit 4534ec2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ steps:
system: x86_64-linux

- label: 'Check Stylish Haskell'
command: 'nix-shell --run .buildkite/check-stylish.sh'
command: 'nix-shell default.nix -A simple-ci-shell --run .buildkite/check-stylish.sh'
agents:
system: x86_64-linux

- label: 'HLint'
command: 'nix-shell --run "hlint lib"'
command: 'nix-shell default.nix -A simple-ci-shell --run "hlint lib"'
agents:
system: x86_64-linux

Expand Down
5 changes: 5 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,9 @@ in {
++ [ jormungandr jormungandr-cli
pkgs.pkgconfig pkgs.sqlite-interactive ];
};
# a shell that only has basic CI tools, and no dependencies
simple-ci-shell = pkgs.stdenv.mkDerivation {
name = "simple-ci-shell";
buildInputs = [ pkgs.haskellPackages.stylish-haskell iohkLib.hlint ];
};
}
6 changes: 6 additions & 0 deletions release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ let
"${mingwW64.config}" = mapTestOnCross mingwW64 (packagePlatformsCross project);
}
// {
ci-tools = {
inherit (import ./nix/iohk-common.nix {}) hlint;
inherit ((import ./nix/nixpkgs-haskell.nix {}).haskellPackages) stylish-haskell;
};
inherit ((import ./. {}).pkgs.haskell-nix) haskellNixRoots;

# This aggregate job is what IOHK Hydra uses to update
# the CI status in GitHub.
required = mkRequiredJob (
Expand Down

0 comments on commit 4534ec2

Please sign in to comment.