diff options
author | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2020-08-09 16:14:36 +0200 |
---|---|---|
committer | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2020-08-09 16:14:36 +0200 |
commit | 7b8b24292f84c982bd7b67ce2d7980561662fcc0 (patch) | |
tree | 1ec64c5b1a14cd7fafebfc2a9612952f969d14a3 /.travis.yml | |
download | pnpkgs-7b8b24292f84c982bd7b67ce2d7980561662fcc0.tar.gz pnpkgs-7b8b24292f84c982bd7b67ce2d7980561662fcc0.zip |
Initial commit
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..8d01732 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,51 @@ +language: nix +nix: 2.3.4 + +sudo: false + +env: + global: + # Set this to cache your build results in cachix for faster builds + # in travis and for everyone who uses your cache. + # + # Format: Your cachix cache host name without the ".cachix.org" suffix. + # Example: mycache (for mycache.cachix.org) + # + # For this to work, you also need to set the CACHIX_SIGNING_KEY + # in your repository settings in Travis. + - CACHIX_CACHE= + # Set this to notify the global nur package registry that changes are + # available. + # + # The repo name as used in + # https://github.com/nix-community/NUR/blob/master/repos.json + - NUR_REPO=<YOUR_NUR_REPO_NAME_HERE> + +matrix: + include: + - env: NIX_CHANNEL=https://nixos.org/channels/nixpkgs-unstable + - env: NIX_CHANNEL=https://nixos.org/channels/nixos-unstable + - env: NIX_CHANNEL=https://nixos.org/channels/nixos-20.03 + +install: + - nix --version + # for cachix we need travis to be a trusted nix user + - echo "trusted-users = $USER" | sudo tee -a /etc/nix/nix.conf + - sudo systemctl restart nix-daemon + - if [ -n "${CACHIX_CACHE}" ]; then travis_retry nix-channel --update; fi + - if [ -n "${CACHIX_CACHE}" ]; then nix-env -iA cachix -f https://cachix.org/api/v1/install; fi + - if [ -n "${CACHIX_CACHE}" ]; then cachix use "${CACHIX_CACHE}"; fi + - nix-channel --add "${NIX_CHANNEL}" nixpkgs + - travis_retry nix-channel --update + +script: + - nix-build ci.nix -A buildOutputs + - nix eval -f default.nix 'lib' + - nix eval -f default.nix 'modules' + - nix eval -f default.nix 'overlays' + +after_success: + - if [ -n "${CACHIX_CACHE}" ]; then nix-build ci.nix -A cacheOutputs | cachix push "${CACHIX_CACHE}"; fi + - if [ "cron" != "${TRAVIS_EVENT_TYPE}" -a "false" = "${TRAVIS_PULL_REQUEST}" -a "master" = "${TRAVIS_BRANCH}" ]; then + curl -XPOST "https://nur-update.herokuapp.com/update?repo=${NUR_REPO}"; fi + |