forked from jappeace/cut-the-crap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
25 lines (23 loc) · 1.46 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
language: nix
script:
- cat /etc/nix/nix.conf # had some issues with this, kindoff important so always cat this is good
- nix-shell ./travis-shell.nix --run "hlint ."
- nix-shell ./travis-shell.nix --run "find . -type f -name '*.hs' -print | xargs brittany -c"
- nix-build
- echo "Wait 4 cachix"
- sleep 10
- echo "Done, eat pi"
# this allows us to read from cache
# feel free to add jappie.cachix.org as substiter
before_install:
- sudo mkdir -p /etc/nix
- echo "substituters = https://jappie.cachix.org https://cache.nixos.org https://nixcache.reflex-frp.org https://static-haskell-nix.cachix.org https://hydra.iohk.io" | sudo tee -a /etc/nix/nix.conf > /dev/null
- echo "trusted-public-keys = jappie.cachix.org-1:+5Liddfns0ytUSBtVQPUr/Wo6r855oNLgD4R8tm1AE4= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ryantrinkle.com-1:JJiAKaRv9mWgpVAz8dwewnZe0AzzEAzPkagE9SP5NWI= static-haskell-nix.cachix.org-1:Q17HawmAwaM1/BfIxaEDKAxwTOyRVhPG5Ji9K3+FvUU= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" | sudo tee -a /etc/nix/nix.conf > /dev/null
# w/ cachix signing key we can also write,
# reproducible nix builds makes this re-useable
before_script:
- sudo mkdir -p /etc/nix && echo 'sandbox = true' | sudo tee -a /etc/nix/nix.conf
- curl https://nixos.org/nix/install | sh
- nix-env -iA cachix -f https://cachix.org/api/v1/install
- if [ -n "$CACHIX_SIGNING_KEY" ]; then (cachix push jappie --watch-store &); else echo "no cachix key found"; fi