From 9a575ee4f2f90d286dc3c3f86f149976d3e0c441 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Wed, 28 Aug 2019 02:07:31 +0000 Subject: [PATCH] Travis-CI: use cache and sandbox --- .travis.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6405945..ca2f009 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,21 @@ language: nix +cache: + directories: + - $HOME/nix.store + +before_cache: + - mkdir -p $HOME/nix.store + - nix copy --to file://$HOME/nix.store -f default.nix buildInputs + before_install: + - sudo mkdir -p /etc/nix + - echo "substituters = https://cache.nixos.org/ file://$HOME/nix.store" | sudo tee -a /etc/nix/nix.conf > /dev/null + - echo 'require-sigs = false' | sudo tee -a /etc/nix/nix.conf > /dev/null + +before_script: # Make sure that version is up-to-date - sed -i "s/version = .*/version = \"$(git describe --abbrev=0 --tags | sed 's/v//')\";/" default.nix script: - - nix-build + - nix-build --option sandbox true