Travis-CI: use cache and sandbox
This commit is contained in:
parent
0f711c20f7
commit
9a575ee4f2
15
.travis.yml
15
.travis.yml
@ -1,8 +1,21 @@
|
|||||||
language: nix
|
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:
|
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
|
# Make sure that version is up-to-date
|
||||||
- sed -i "s/version = .*/version = \"$(git describe --abbrev=0 --tags | sed 's/v//')\";/" default.nix
|
- sed -i "s/version = .*/version = \"$(git describe --abbrev=0 --tags | sed 's/v//')\";/" default.nix
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- nix-build
|
- nix-build --option sandbox true
|
||||||
|
Loading…
Reference in New Issue
Block a user