@@ -1,21 +1,40 @@
1−sudo: false
1+sudo: required
6 - libgmp-dev
8 - libgmp-dev
8−# Caching so the next build will be fast too.
10 directories:
11 directories:
11 - $HOME/.stack
13 - $HOME/.stack
20+ - stack --no-terminal --install-ghc build --fast --only-dependencies
21+ - stack --no-terminal --install-ghc test --fast --pedantic
22+ - stack --no-terminal install
25+ - nix-env -i nix-prefetch-git
26+ - nix-shell -p cabal-install --run 'cabal update'
27+ - ./stackage2nix-test --dry-run
13before_install:
29before_install:
14# Download and unpack the stack executable
30# Download and unpack the stack executable
15- mkdir -p ~/.local/bin
31- mkdir -p ~/.local/bin
16- export PATH=$HOME/.local/bin:$PATH
32- export PATH=$HOME/.local/bin:$PATH
17- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
33- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
19−script:
35+- mkdir -p ~/.nix
20−- stack -j2 --no-terminal --install-ghc build --fast --only-dependencies
36+- sudo mkdir -p /nix
21−- stack -j2 --no-terminal --install-ghc test --fast --pedantic
37+- sudo chmod a+w /nix
38+- sudo mount --bind ~/.nix /nix
39+- curl https://nixos.org/nix/install | sh
40+- source ~/.nix-profile/etc/profile.d/nix.sh