nur-packages/.drone.yml
xeals 45682cdbab
Some checks failed
continuous-integration/drone/push Build is failing
Cache nix store between builds
2020-10-15 20:46:37 +11:00

209 lines
3.8 KiB
YAML

---
kind: pipeline
type: docker
name: nixpkgs-unstable
platform:
os: linux
arch: amd64
steps:
- name: restore-nix-store
pull: true
image: meltwater/drone-cache
settings:
archive_format: gzip
backend: filesystem
cache_key: "{{ .Repo.Name }}"
mount:
- /nix/store
restore: true
volumes:
- name: cache
path: /tmp/cache
- name: build
image: nixos/nix
commands:
- nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixos
- nix-channel --update
- nix-build ci.nix -A buildOutputs
- nix eval -f default.nix 'lib'
- nix eval -f default.nix 'modules'
- nix eval -f default.nix 'overlays'
environment:
NIXPKGS_ALLOW_UNFREE: 1
- name: deploy
image: nixpkgs/cachix
commands:
- nix-build ci.nix -A cacheOutputs | cachix push "${CACHIX_CACHE}"
environment:
CACHIX_CACHE: xeals
CACHIX_SIGNING_KEY:
from_secret: cachix_key
NIXPKGS_ALLOW_UNFREE: 1
NUR_REPO: xeals
- name: save-nix-store
pull: true
image: meltwater/drone-cache
settings:
archive_format: gzip
backend: filesystem
cache_key: "{{ .Repo.Name }}"
mount:
- /nix/store
rebuild: true
volumes:
- name: cache
path: /tmp/cache
when:
status:
- success
- failure
volumes:
- name: cache
temp: {}
---
kind: pipeline
type: docker
name: nixos-unstable
platform:
os: linux
arch: amd64
steps:
- name: restore-nix-store
pull: true
image: meltwater/drone-cache
settings:
archive_format: gzip
backend: filesystem
cache_key: "{{ .Repo.Name }}"
mount:
- /nix/store
restore: true
volumes:
- name: cache
path: /tmp/cache
- name: build
image: nixos/nix
commands:
- nix-channel --add https://nixos.org/channels/nixos-unstable nixos
- nix-channel --update
- nix-build ci.nix -A buildOutputs
- nix eval -f default.nix 'lib'
- nix eval -f default.nix 'modules'
- nix eval -f default.nix 'overlays'
environment:
NIXPKGS_ALLOW_UNFREE: 1
- name: deploy
image: nixpkgs/cachix
commands:
- nix-build ci.nix -A cacheOutputs | cachix push "${CACHIX_CACHE}"
environment:
CACHIX_CACHE: xeals
CACHIX_SIGNING_KEY:
from_secret: cachix_key
NIXPKGS_ALLOW_UNFREE: 1
NUR_REPO: xeals
- name: save-nix-store
pull: true
image: meltwater/drone-cache
settings:
archive_format: gzip
backend: filesystem
cache_key: "{{ .Repo.Name }}"
mount:
- /nix/store
rebuild: true
volumes:
- name: cache
path: /tmp/cache
when:
status:
- success
- failure
volumes:
- name: cache
temp: {}
---
kind: pipeline
type: docker
name: nixos-20.03
platform:
os: linux
arch: amd64
steps:
- name: restore-nix-store
pull: true
image: meltwater/drone-cache
settings:
archive_format: gzip
backend: filesystem
cache_key: "{{ .Repo.Name }}"
mount:
- /nix/store
restore: true
volumes:
- name: cache
path: /tmp/cache
- name: build
image: nixos/nix
commands:
- nix-channel --add https://nixos.org/channels/nixos-20.03 nixos
- nix-channel --update
- nix-build ci.nix -A buildOutputs
- nix eval -f default.nix 'lib'
- nix eval -f default.nix 'modules'
- nix eval -f default.nix 'overlays'
environment:
NIXPKGS_ALLOW_UNFREE: 1
- name: deploy
image: nixpkgs/cachix
commands:
- nix-build ci.nix -A cacheOutputs | cachix push "${CACHIX_CACHE}"
environment:
CACHIX_CACHE: xeals
CACHIX_SIGNING_KEY:
from_secret: cachix_key
NIXPKGS_ALLOW_UNFREE: 1
NUR_REPO: xeals
- name: save-nix-store
pull: true
image: meltwater/drone-cache
settings:
archive_format: gzip
backend: filesystem
cache_key: "{{ .Repo.Name }}"
mount:
- /nix/store
rebuild: true
volumes:
- name: cache
path: /tmp/cache
when:
status:
- success
- failure
volumes:
- name: cache
temp: {}
...