Created
February 8, 2020 14:15
-
-
Save thalesmg/dfaeedc9aec365cb3d0ad522f531f276 to your computer and use it in GitHub Desktop.
Exemplo de como configurar o cachix no travis em background
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/entropia/tip-toi-reveng/blob/2d35417e37788c629500b7c82cd82e2ff9c1e89b/.travis.yml | |
language: nix | |
nix: 2.2.1 | |
jobs: | |
include: | |
- stage: Build | |
env: TARGET=linux-exe | |
- env: TARGET=windows-exe | |
- env: TARGET=static-exe | |
- env: TARGET=book | |
- stage: Package | |
env: TARGET=release-zip | |
before_install: | |
- sudo mkdir -p /etc/nix | |
- echo "binary-caches = 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 "binary-cache-public-keys = 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 | |
script: | |
- nix-env -iA cachix -f https://cachix.org/api/v1/install | |
- cachix use tttool | |
- if [ -n "$CACHIX_SIGNING_KEY" ]; then cachix push tttool --watch-store; fi & | |
- nix-build nix -A $TARGET | |
- sleep 10 # to allow cachix finish uploading |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment