on master help sign in
Nix-based CI
15e15c6Vladislav Zavialov
.gitignore+17−2
@@ -1,6 +1,21 @@
1−tags
1+# Cabal
2dist
2dist
3dist-newstyle
3dist-newstyle
4−.stack-work
5.cabal-sandbox/
4.cabal-sandbox/
6cabal.sandbox.config
5cabal.sandbox.config
6+cabal.project.local
7+.ghc.environment*
8+
9+# Profiling
10+*.prof
11+
12+# Stack
13+.stack-work
14+
15+# Emacs
16+TAGS
17+.dir-locals.el
18+
19+# Vim
20+tags
21+*.swp
.travis.yml+11−23
@@ -1,28 +1,16 @@
1−sudo: false
1+language: nix
2−
3−cache:
4− directories:
5− - $HOME/.stack/
6
2
7env:
3env:
8− - FLAGS=""
4+ - HC=ghc822
9− - FLAGS="--flag ether:disable-tup-instances"
5+ - HC=ghc844
10−
6+ - HC=ghc861
11−before_install:
12− - mkdir -p ~/.local/bin
13− - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
14− - export PATH=~/.local/bin:$PATH
15− - stack --version
16− - stack setup
17−
18−install:
19− - stack install --only-dependencies --no-terminal
20
7
21script:
8script:
9+ - travis_retry ./nix-cabal new-update
22− - stack test ether:regression --no-terminal --ghc-options -Werror $FLAGS
10+ - ./nix-cabal new-test ether:regression
23− - stack bench ether:bench --no-terminal --ghc-options -Werror $FLAGS
11+ - ./nix-cabal new-bench ether:bench
24
12
25−addons:
13+cache:
26− apt:
14+ directories:
27− packages:
15+ - ~/.cabal
28− - libgmp-dev
16+ - ~/.ghc
ether.cabal+3−3
@@ -58,7 +58,7 @@ library
58 Ether.Internal.TupleInstances
58 Ether.Internal.TupleInstances
59
59
60 build-depends:
60 build-depends:
61− base >=4.9 && <4.11,
61+ base >=4.9 && <4.13,
62 transformers >=0.5.2.0,
62 transformers >=0.5.2.0,
63 transformers-lift >=0.2.0.1,
63 transformers-lift >=0.2.0.1,
64 mtl >=2.2.1,
64 mtl >=2.2.1,
@@ -111,7 +111,7 @@ library
111test-suite regression
111test-suite regression
112
112
113 build-depends:
113 build-depends:
114− base >=4.9 && <4.11,
114+ base >=4.9 && <4.13,
115 transformers >=0.4.2,
115 transformers >=0.4.2,
116 mtl >=2.2.1,
116 mtl >=2.2.1,
117 tasty >=0.10,
117 tasty >=0.10,
@@ -183,7 +183,7 @@ test-suite regression
183benchmark bench
183benchmark bench
184
184
185 build-depends:
185 build-depends:
186− base >=4.9 && <4.11,
186+ base >=4.9 && <4.13,
187 mtl >=2.2.1,
187 mtl >=2.2.1,
188 transformers >=0.4.2,
188 transformers >=0.4.2,
189 criterion >=1.1,
189 criterion >=1.1,
nix-cabalnew file+12
@@ -0,0 +1,12 @@
1+#!/usr/bin/env bash
2+
3+set -e
4+
5+if [ -z "$HC" ]; then
6+ ARG_HC=""
7+else
8+ ARG_HC="--argstr hc $HC"
9+fi
10+
11+CMD="cabal $@"
12+nix-shell --pure $ARG_HC --command "$CMD"
shell.nixnew file+21
@@ -0,0 +1,21 @@
1+{ pkgs ? import <nixpkgs> {},
2+ hc ? "ghc844"
3+}:
4+
5+pkgs.stdenv.mkDerivation rec {
6+ name = "ether";
7+ buildInputs = [
8+ pkgs.haskell.compiler.${hc}
9+ pkgs.git
10+ pkgs.zlib
11+ pkgs.cabal-install
12+ pkgs.pkgconfig
13+ ];
14+ shellHook = ''
15+ export LD_LIBRARY_PATH=${pkgs.lib.makeLibraryPath buildInputs}:$LD_LIBRARY_PATH
16+ '';
17+ LOCALE_ARCHIVES =
18+ if pkgs.stdenv.isLinux
19+ then "${pkgs.glibcLocales}/lib/locale/locale-archive"
20+ else "";
21+}
stack.yamldeleted−2
@@ -1,2 +0,0 @@
1−resolver: lts-9.11
2−packages: ['.']