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 authored and disassembler committed Nov 4, 2019
1 parent a5fecf0 commit 3c5af93
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 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 -A ci-shell --run .buildkite/check-stylish.sh'
agents:
system: x86_64-linux

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

Expand Down
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
9 changes: 8 additions & 1 deletion shell.nix
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
(import ./default.nix {}).shell
let
self = import ./default.nix {};
# a shell that only has basic CI tools, and no dependencies
ci-shell = self.pkgs.stdenv.mkDerivation {
name = "ci-shell";
buildInputs = [ self.pkgs.haskellPackages.stylish-haskell self.iohkLib.hlint ];
};
in self.shell // { inherit ci-shell; }

0 comments on commit 3c5af93

Please sign in to comment.