-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
73 lines (67 loc) · 2.64 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
language: nix
sudo: false
# env:
# global:
# - CACHIX_CACHE=
# - NUR_REPO=
matrix:
fast_finish: true
allow_failures:
- env: NIX_CHANNEL=https://nixos.org/channels/nixpkgs-unstable
os: osx
sudo: true
- env: NIX_CHANNEL=https://nixos.org/channels/nixos-unstable
# Test against different versions of nixpkgs.
# The version names used here came from the name of branches
# in https://github.com/NixOS/nixpkgs-channels.
include:
# unstable
- env: NIX_CHANNEL=https://nixos.org/channels/nixpkgs-unstable
os: osx
sudo: true
- env: NIX_CHANNEL=https://nixos.org/channels/nixos-unstable
# 20.03
# Not yet?
# - env: NIX_CHANNEL=https://nixos.org/channels/nixpkgs-20.03-darwin
# os: osx
# sudo: true
- env: NIX_CHANNEL=https://nixos.org/channels/nixos-20.03
# 19.09
- env: NIX_CHANNEL=https://nixos.org/channels/nixpkgs-19.09-darwin
os: osx
sudo: true
- env: NIX_CHANNEL=https://nixos.org/channels/nixos-19.09
# 18.09
- env: NIX_CHANNEL=https://nixos.org/channels/nixos-18.09
# Nixpkgs version < 19.03 dosen't support "appendOverlays", so
# "manuallyAppendOverlaysToPkgs" is used to import the whole package.
# They're actually different, so here we test to USE_AS_OVERLAY as normal.
- env:
- NIX_CHANNEL=https://nixos.org/channels/nixos-18.09
- USE_AS_OVERLAY=true
install:
- mkdir -p ~/.nixpkgs &&
echo "{ allowBroken = true; allowUnfree = true; allowUnsupportedSystem = true; }" > ~/.nixpkgs/config.nix
- nix-channel --add "${NIX_CHANNEL}" nixpkgs
- travis_retry nix-channel --update
- nix --version
- nix-instantiate --eval -E 'with import <nixpkgs> {}; lib.version or lib.nixpkgsVersion'
- if [ -n "${CACHIX_CACHE}" -a "Darwin" = "$(uname)" ]; then
echo "trusted-users = root $USER" | sudo tee -a /etc/nix/nix.conf;
sudo pkill nix-daemon;
sudo nix-daemon & :;
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
script:
- nix --version
- nix-instantiate --eval -E 'with import <nixpkgs> {}; lib.version or lib.nixpkgsVersion'
- 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 [ -n "${NUR_REPO}" -a "false" = "${TRAVIS_PULL_REQUEST}" -a "master" = "${TRAVIS_BRANCH}" ]; then
curl -XPOST "https://nur-update.herokuapp.com/update?repo=${NUR_REPO}";
fi