Use cachix in CI.

This commit is contained in:
Benjamin Summers 2019-04-25 17:05:16 -07:00
parent 8fe2835e90
commit 8af0f5fa77
3 changed files with 10 additions and 8 deletions

View File

@ -2,15 +2,15 @@ language: nix
nix: 2.1.3
install:
# nix-env -iA cachix -f https://cachix.org/api/v1/install
- nix-env -iA cachix -f https://cachix.org/api/v1/install
before_install:
- git lfs pull
script:
# cachix authtoken "$CACHIX_AUTH_TOKEN" >/dev/null
# cachix use urbit
- cachix authtoken "$CACHIX_AUTH_TOKEN" >/dev/null
- cachix use urbit2
- make
- make test
- sh/update-brass-pill # To verify that this works.
# ./sh/cachix
- ./sh/cachix

View File

@ -7,10 +7,8 @@ with (import ./deps {});
{
argon2-src = argon2.src;
ed25519-src = ed25519.src;
ent-src = ent.src;
h2o-src = h2o.src;
murmur3-src = murmur3.src;
nodehello-src = nodehello.src;
scrypt-src = scrypt.src;
secp256k1-src = secp256k1.src;
sni-src = sni.src;

View File

@ -5,6 +5,10 @@ fail () {
exit 1
}
if [ -z "$CACHIX_SIGNING_KEY" ]
then fail "The CACHIX_AUTH_TOKEN environment variable needs to be set."
fi
if [ -z "$CACHIX_AUTH_TOKEN" ]
then fail "The CACHIX_AUTH_TOKEN environment variable needs to be set."
fi
@ -16,7 +20,7 @@ cleanup () {
trap cleanup EXIT
cachix authtoken "$CACHIX_AUTH_TOKEN" >/dev/null
cachix use urbit
cachix use urbit2
nix-build nix/dep-repos.nix > .cache.list
nix-build default.nix >> .cache.list
cachix push urbit < .cache.list
cachix push urbit2 < .cache.list