git.iko.soy/typeable/stackage2nix
on master help sign in
Add Travis bootstrap test (#20)
2600215Dmitry Bushev
.travis.yml+25−6
@@ -1,21 +1,40 @@
1−sudo: false
1+sudo: required
2+
3+language: generic
2
4
3addons:
5addons:
4 apt:
6 apt:
5 packages:
7 packages:
6 - libgmp-dev
8 - libgmp-dev
7
9
8−# Caching so the next build will be fast too.
9cache:
10cache:
10 directories:
11 directories:
12+ - $HOME/.local/bin
11 - $HOME/.stack
13 - $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
12
28
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'
18−
34+# Install Nix
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