on master help sign in
Nix-based CI
commit15e15c63bd1e4b56a2e57f8d0410583ed7ee7476 authorVladislav Zavialov <vlad.z.4096@gmail.com> dateMon 12 Nov 2018, 10:16 (8 years ago) parenta15b2b1
6 files changed+64−30
.gitignore+17−2 .travis.yml+11−23 ether.cabal+3−3 nix-cabal+12 shell.nix+21 stack.yaml−2
.gitignore+17−2
@@ -1,6 +1,21 @@
1−tags
1+# Cabal
22dist
33dist-newstyle
4−.stack-work
54.cabal-sandbox/
65cabal.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
2−
3−cache:
4− directories:
5− - $HOME/.stack/
1+language: nix
62
73env:
8− - FLAGS=""
9− - FLAGS="--flag ether:disable-tup-instances"
10−
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
4+ - HC=ghc822
5+ - HC=ghc844
6+ - HC=ghc861
207
218script:
22− - stack test ether:regression --no-terminal --ghc-options -Werror $FLAGS
23− - stack bench ether:bench --no-terminal --ghc-options -Werror $FLAGS
9+ - travis_retry ./nix-cabal new-update
10+ - ./nix-cabal new-test ether:regression
11+ - ./nix-cabal new-bench ether:bench
2412
25−addons:
26− apt:
27− packages:
28− - libgmp-dev
13+cache:
14+ directories:
15+ - ~/.cabal
16+ - ~/.ghc
ether.cabal+3−3
@@ -58,7 +58,7 @@ library
5858 Ether.Internal.TupleInstances
5959
6060 build-depends:
61− base >=4.9 && <4.11,
61+ base >=4.9 && <4.13,
6262 transformers >=0.5.2.0,
6363 transformers-lift >=0.2.0.1,
6464 mtl >=2.2.1,
@@ -111,7 +111,7 @@ library
111111test-suite regression
112112
113113 build-depends:
114− base >=4.9 && <4.11,
114+ base >=4.9 && <4.13,
115115 transformers >=0.4.2,
116116 mtl >=2.2.1,
117117 tasty >=0.10,
@@ -183,7 +183,7 @@ test-suite regression
183183benchmark bench
184184
185185 build-depends:
186− base >=4.9 && <4.11,
186+ base >=4.9 && <4.13,
187187 mtl >=2.2.1,
188188 transformers >=0.4.2,
189189 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: ['.']