Use drone host volume for /nix/store to speed up
build times
This commit is contained in:
parent
db2ffe63f5
commit
96dde2315d
32
.drone.yml
32
.drone.yml
|
@ -95,15 +95,23 @@ name: Check
|
||||||
steps:
|
steps:
|
||||||
- name: "Check"
|
- name: "Check"
|
||||||
image: docker.nix-community.org/nixpkgs/nix-flakes:latest
|
image: docker.nix-community.org/nixpkgs/nix-flakes:latest
|
||||||
|
volumes:
|
||||||
|
- name: nix-store-cache
|
||||||
|
path: /tmp/build-store
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- pull_request
|
- pull_request
|
||||||
- tag
|
- tag
|
||||||
commands:
|
commands:
|
||||||
- nix -Lv flake check
|
- nix -Lv --store /tmp/build-store flake check
|
||||||
- nix -Lv build ".#nixosConfigurations.PubSolarOS.config.system.build.toplevel"
|
- nix -Lv --store /tmp/build-store build ".#nixosConfigurations.PubSolarOS.config.system.build.toplevel"
|
||||||
- nix -Lv develop -c echo OK
|
- nix -Lv --store /tmp/build-store develop -c echo OK
|
||||||
- nix -Lv develop --command bud --help
|
- nix -Lv --store /tmp/build-store develop --command bud --help
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: nix-store-cache
|
||||||
|
host:
|
||||||
|
path: "/var/nix/build-store"
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
@ -114,16 +122,18 @@ steps:
|
||||||
- name: "Build ISO"
|
- name: "Build ISO"
|
||||||
image: docker.nix-community.org/nixpkgs/nix-flakes:latest
|
image: docker.nix-community.org/nixpkgs/nix-flakes:latest
|
||||||
volumes:
|
volumes:
|
||||||
- name: nix-store
|
- name: file-exchange
|
||||||
path: /var/nix/iso-cache
|
path: /var/nix/iso-cache
|
||||||
|
- name: nix-store-cache
|
||||||
|
path: /tmp/build-store
|
||||||
commands:
|
commands:
|
||||||
- nix -Lv develop --command bud build bootstrap bootstrapIso
|
- nix -Lv --store /tmp/build-store develop --command bud build bootstrap bootstrapIso
|
||||||
- cp $(readlink -f result)/iso/*.iso /var/nix/iso-cache/
|
- cp $(readlink -f result)/iso/*.iso /var/nix/iso-cache/
|
||||||
|
|
||||||
- name: "Publish ISO"
|
- name: "Publish ISO"
|
||||||
image: appleboy/drone-scp
|
image: appleboy/drone-scp
|
||||||
volumes:
|
volumes:
|
||||||
- name: nix-store
|
- name: file-exchange
|
||||||
path: /var/nix/iso-cache
|
path: /var/nix/iso-cache
|
||||||
settings:
|
settings:
|
||||||
host:
|
host:
|
||||||
|
@ -147,12 +157,14 @@ trigger:
|
||||||
- tag
|
- tag
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: nix-store
|
- name: file-exchange
|
||||||
|
temp: {}
|
||||||
|
- name: nix-store-cache
|
||||||
host:
|
host:
|
||||||
path: "/var/nix/iso-cache"
|
path: "/var/nix/build-store"
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: 07b8c6165ef4d12754e43839d87d6a68d98436d3c5f8fbb6fee91c628211c1e7
|
hmac: e7e602f8b3b21bbc0644dbd285c6d87b3dc5644437c8c693c92ced17de094bab
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
Loading…
Reference in a new issue