From e5aa94964f73c7c023d7c3934d79338adc99d456 Mon Sep 17 00:00:00 2001 From: Dominic Steinitz Date: Tue, 10 Apr 2018 14:17:17 +0100 Subject: Use stack --nix --- .circleci/config.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to '.circleci') diff --git a/.circleci/config.yml b/.circleci/config.yml index acc84ec..1433417 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,27 +6,33 @@ jobs: steps: - checkout - restore_cache: - key: stack-deps-urk-{{ checksum "stack.yaml" }} + key: stack-deps-eek-{{ checksum "stack.yaml" }} - run: name: Update packages command: nix-channel --update - - run: - name: Setup build toolchain - command: nix-shell --run "stack setup" - run: name: Building dependencies - command: nix-shell --run "stack test --only-snapshot --prefetch" + shell: /bin/bash -eilo pipefail + command: | + nix-env -f nixpkgs.nix -iA stack + stack --nix --no-terminal --nix build --only-snapshot --prefetch --no-haddock --test --bench --jobs=1 - save_cache: paths: - "~/.stack" - key: stack-deps-urk-{{ checksum "stack.yaml" }} + key: stack-deps-eek-{{ checksum "stack.yaml" }} - run: name: Building - command: nix-shell --run "stack build --pedantic" + shell: /bin/bash -eilo pipefail + command: | + stack --nix --no-terminal --nix build --pedantic - run: name: Building tests - command: nix-shell --run "stack test --pedantic --no-run-tests" + shell: /bin/bash -eilo pipefail + command: | + stack --nix test --pedantic --no-run-tests - run: name: Running tests - command: nix-shell --run "stack test" + shell: /bin/bash -eilo pipefail + command: | + stack --nix test -- cgit v1.2.3