Skip to content

Commit a75fa21

Browse files
committed
Add a Nix CI job
1 parent 3b534a5 commit a75fa21

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.circleci/config.yml

+27
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,32 @@ jobs:
156156
key: cabal-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}
157157
paths:
158158
- ~/.cabal
159+
nix:
160+
working_directory: ~/build
161+
environment:
162+
- NIXPKGS_ALLOW_BROKEN: 1
163+
docker:
164+
- image: nixorg/nix:circleci
165+
steps:
166+
- checkout
167+
- run:
168+
name: Sync submodules
169+
command: git submodule sync --recursive
170+
- run:
171+
name: Update submodules
172+
command: git submodule update --recursive --init
173+
- restore-cache:
174+
keys:
175+
- cabal-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}
176+
- run:
177+
name: Build
178+
command: nix-shell -j4 --run "cabal new-update && cabal new-build -j1 --enable-tests"
179+
no_output_timeout: 30m
180+
- save_cache:
181+
key: cabal-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}
182+
paths:
183+
- ~/.cabal
184+
159185

160186

161187
workflows:
@@ -170,3 +196,4 @@ workflows:
170196
- ghc-8.10.1
171197
# - ghc-nightly
172198
- cabal
199+
- nix

0 commit comments

Comments
 (0)