@@ -1,21 +1,40 @@
1−sudo: false
1+sudo: required
2+
3+language: generic
24
35addons:
46 apt:
57 packages:
68 - libgmp-dev
79
8−# Caching so the next build will be fast too.
910cache:
1011 directories:
12+ - $HOME/.local/bin
1113 - $HOME/.stack
14+ - $HOME/.nix
15+
16+jobs:
17+ include:
18+ - stage: test
19+ script:
20+ - stack --no-terminal --install-ghc build --fast --only-dependencies
21+ - stack --no-terminal --install-ghc test --fast --pedantic
22+ - stack --no-terminal install
23+ - stage: bootstrap
24+ script:
25+ - nix-env -i nix-prefetch-git
26+ - nix-shell -p cabal-install --run 'cabal update'
27+ - ./stackage2nix-test --dry-run
1228
1329before_install:
1430# Download and unpack the stack executable
1531- mkdir -p ~/.local/bin
1632- export PATH=$HOME/.local/bin:$PATH
1733- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
18−
19−script:
20−- stack -j2 --no-terminal --install-ghc build --fast --only-dependencies
21−- stack -j2 --no-terminal --install-ghc test --fast --pedantic
34+# Install Nix
35+- mkdir -p ~/.nix
36+- sudo mkdir -p /nix
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