From 02917f97acb8d63de486a5c2ae243abf8eb96027 Mon Sep 17 00:00:00 2001 From: Dominic Steinitz Date: Tue, 10 Apr 2018 13:26:17 +0100 Subject: Back to an earlier version --- .circleci/config.yml | 73 ++++++++++++++-------------------------------------- 1 file changed, 20 insertions(+), 53 deletions(-) (limited to '.circleci') diff --git a/.circleci/config.yml b/.circleci/config.yml index 5e094ee..acc84ec 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,65 +1,32 @@ version: 2 jobs: build: - macos: - xcode: "9.0" + docker: + - image: terrorjack/vanilla:haskell steps: - checkout + - restore_cache: + key: stack-deps-urk-{{ checksum "stack.yaml" }} - run: - name: Install Nix - command: | - curl https://nixos.org/nix/install | sh + name: Update packages + command: nix-channel --update - run: - name: Compute cache key - command: | - find . -name "*.cabal" -o -name "stack.yaml" -o -name "*.nix" -type f | sort | xargs cat > /tmp/stack-deps - - restore_cache: - keys: - - hmatrix-stack-dependencies-{{ arch }}-{{ checksum "/tmp/stack-deps" }} - - hmatrix-stack-dependencies-{{ arch }}- + name: Setup build toolchain + command: nix-shell --run "stack setup" - run: - name: Build dependencies - shell: /bin/bash -eilo pipefail - command: | - nix-env -f nixpkgs.nix -iA stack - stack --no-terminal --nix build --only-snapshot --prefetch --no-haddock --jobs=1 - # stack --no-terminal --nix build --only-snapshot --prefetch --no-haddock --test --bench --jobs=1 + name: Building dependencies + command: nix-shell --run "stack test --only-snapshot --prefetch" - save_cache: - key: hmatrix-stack-dependencies-{{ arch }}-{{ checksum "/tmp/stack-deps" }} paths: - - ~/.stack + - "~/.stack" + key: stack-deps-urk-{{ checksum "stack.yaml" }} - run: - name: Build project - shell: /bin/bash -eilo pipefail - command: | - stack --no-terminal --nix build --pedantic - - # docker: - # - image: terrorjack/vanilla:haskell - # steps: - # - checkout - # - restore_cache: - # key: stack-deps-urk-{{ 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" - # - save_cache: - # paths: - # - "~/.stack" - # key: stack-deps-urk-{{ checksum "stack.yaml" }} - # - run: - # name: Building - # command: nix-shell --run "stack build --pedantic" - # - run: - # name: Building tests - # command: nix-shell --run "stack test --pedantic --no-run-tests" - # - run: - # name: Running tests - # command: nix-shell --run "stack test" + name: Building + command: nix-shell --run "stack build --pedantic" + - run: + name: Building tests + command: nix-shell --run "stack test --pedantic --no-run-tests" + - run: + name: Running tests + command: nix-shell --run "stack test" -- cgit v1.2.3