summaryrefslogtreecommitdiff
path: root/.circleci
diff options
context:
space:
mode:
authorDominic Steinitz <dominic@steinitz.org>2018-04-03 12:16:41 +0100
committerDominic Steinitz <dominic@steinitz.org>2018-04-03 12:16:41 +0100
commit1622bf09e12b8df74f1303cfa2e0c4bc461c3350 (patch)
tree04dbe63c059057d250ee10bfcfe922051fdf8243 /.circleci
parenta0f9a95d11bb59376d8facdb8ab14117f754088d (diff)
Use nix rather than ubuntu for CI
Diffstat (limited to '.circleci')
-rw-r--r--.circleci/config.yml18
1 files changed, 6 insertions, 12 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 61d0c5a..abdfa0f 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -2,33 +2,27 @@ version: 2
2jobs: 2jobs:
3 build: 3 build:
4 docker: 4 docker:
5 - image: fpco/stack-build 5 - image: nixorg/nix:circleci
6 steps: 6 steps:
7 - checkout 7 - checkout
8 - restore_cache: 8 - restore_cache:
9 key: stack-deps-{{ checksum "stack.yaml" }} 9 key: stack-deps-{{ checksum "stack.yaml" }}
10 - run: 10 - run:
11 name: Setup build toolchain 11 name: Setup build toolchain
12 command: stack setup 12 command: stack --nix setup
13 - run: 13 - run:
14 name: Building dependencies 14 name: Building dependencies
15 command: stack test --only-snapshot --prefetch 15 command: stack --nix test --only-snapshot --prefetch
16 - save_cache: 16 - save_cache:
17 paths: 17 paths:
18 - "~/.stack" 18 - "~/.stack"
19 key: stack-deps-{{ checksum "stack.yaml" }} 19 key: stack-deps-{{ checksum "stack.yaml" }}
20 - run: 20 - run:
21 name: Set up apt
22 command: apt update
23 - run:
24 name: Installing C packages
25 command: apt -y install libglpk-dev
26 - run:
27 name: Building 21 name: Building
28 command: stack build --pedantic 22 command: stack --nix build --pedantic
29 - run: 23 - run:
30 name: Building tests 24 name: Building tests
31 command: stack test --pedantic --no-run-tests 25 command: stack --nix test --pedantic --no-run-tests
32 - run: 26 - run:
33 name: Running tests 27 name: Running tests
34 command: stack test 28 command: stack --nix test