summaryrefslogtreecommitdiff
path: root/.circleci
diff options
context:
space:
mode:
authorDominic Steinitz <dominic@steinitz.org>2018-04-10 07:35:39 +0100
committerDominic Steinitz <dominic@steinitz.org>2018-04-10 07:35:39 +0100
commit3f28b18d880f055c445f19ab3a982112a51c09d9 (patch)
tree5000a6afe630a5e1e64612026f5e8d73a39db195 /.circleci
parent4be13503c7474a4b84e8fbb7ffdb2e6587c21370 (diff)
Try copying HaskellR CI
Diffstat (limited to '.circleci')
-rw-r--r--.circleci/config.yml74
1 files changed, 54 insertions, 20 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 30ea577..5e094ee 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -1,31 +1,65 @@
1version: 2 1version: 2
2jobs: 2jobs:
3 build: 3 build:
4 docker: 4 macos:
5 - image: terrorjack/vanilla:haskell 5 xcode: "9.0"
6 steps: 6 steps:
7 - checkout 7 - checkout
8 - restore_cache:
9 key: stack-deps-urk-{{ checksum "stack.yaml" }}
10 - run: 8 - run:
11 name: Update packages 9 name: Install Nix
12 command: nix-channel --update 10 command: |
11 curl https://nixos.org/nix/install | sh
13 - run: 12 - run:
14 name: Setup build toolchain 13 name: Compute cache key
15 command: nix-shell --run "stack setup" 14 command: |
15 find . -name "*.cabal" -o -name "stack.yaml" -o -name "*.nix" -type f | sort | xargs cat > /tmp/stack-deps
16 - restore_cache:
17 keys:
18 - hmatrix-stack-dependencies-{{ arch }}-{{ checksum "/tmp/stack-deps" }}
19 - hmatrix-stack-dependencies-{{ arch }}-
16 - run: 20 - run:
17 name: Building dependencies 21 name: Build dependencies
18 command: nix-shell --run "stack test --only-snapshot --prefetch" 22 shell: /bin/bash -eilo pipefail
23 command: |
24 nix-env -f nixpkgs.nix -iA stack
25 stack --no-terminal --nix build --only-snapshot --prefetch --no-haddock --jobs=1
26 # stack --no-terminal --nix build --only-snapshot --prefetch --no-haddock --test --bench --jobs=1
19 - save_cache: 27 - save_cache:
28 key: hmatrix-stack-dependencies-{{ arch }}-{{ checksum "/tmp/stack-deps" }}
20 paths: 29 paths:
21 - "~/.stack" 30 - ~/.stack
22 key: stack-deps-urk-{{ checksum "stack.yaml" }}
23 - run:
24 name: Building
25 command: nix-shell --run "stack build --pedantic"
26 - run:
27 name: Building tests
28 command: nix-shell --run "stack test --pedantic --no-run-tests"
29 - run: 31 - run:
30 name: Running tests 32 name: Build project
31 command: nix-shell --run "stack test" 33 shell: /bin/bash -eilo pipefail
34 command: |
35 stack --no-terminal --nix build --pedantic
36
37 # docker:
38 # - image: terrorjack/vanilla:haskell
39 # steps:
40 # - checkout
41 # - restore_cache:
42 # key: stack-deps-urk-{{ checksum "stack.yaml" }}
43 # - run:
44 # name: Update packages
45 # command: nix-channel --update
46 # - run:
47 # name: Setup build toolchain
48 # command: nix-shell --run "stack setup"
49 # - run:
50 # name: Building dependencies
51 # command: nix-shell --run "stack test --only-snapshot --prefetch"
52 # - save_cache:
53 # paths:
54 # - "~/.stack"
55 # key: stack-deps-urk-{{ checksum "stack.yaml" }}
56 # - run:
57 # name: Building
58 # command: nix-shell --run "stack build --pedantic"
59 # - run:
60 # name: Building tests
61 # command: nix-shell --run "stack test --pedantic --no-run-tests"
62 # - run:
63 # name: Running tests
64 # command: nix-shell --run "stack test"
65