Skip to content
Snippets Groups Projects
Commit fb96cb32 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

CircleCI caching for the docs job

parent 5e976865
No related branches found
No related tags found
1 merge request!12Fix openssl build issues
......@@ -34,12 +34,6 @@ jobs:
docker:
- image: "nixorg/nix:circleci"
steps:
- run:
name: "Install Git"
command: |
# Required for the checkout step
nix-env -i git openssh
- "checkout"
- restore_cache:
......@@ -63,46 +57,43 @@ jobs:
- privatestorageio-nix-store-v1-{{ checksum "nixpkgs.rev" }}
- privatestorageio-nix-store-v1-
- save_cache:
name: "Cache Nix Store Paths"
key: privatestorageio-nix-store-v1-{{ checksum "nixpkgs.rev" }}
paths:
- "/nix"
- run:
name: "Run Tests"
command: |
export NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/$(cat nixpkgs.rev).tar.gz
nix-build --max-jobs 1 nixos/system-tests.nix -A driver
- save_cache:
name: "Cache Nix Store Paths"
key: privatestorageio-nix-store-v1-{{ checksum "nixpkgs.rev" }}
paths:
- "/nix"
build:
docker:
- image: "nixorg/nix:circleci"
steps:
- run:
name: "Install CA Certificates"
command: |
# Required for cache and artifact interactions. Though we use a
# nix image, it's actually an alpine base... The CircleCI cache
# management (which we stopped using) and artifact uploader don't
# know how to use the nix ca bundle we could install.
apk update
apk add ca-certificates
- run:
name: "Install Git"
command: |
# Required for the checkout step
nix-env -i git openssh
- "checkout"
- restore_cache:
# See comments for nix store caching in `build` job.
name: "Restore Nix Store Paths"
keys:
- privatestorageio-docs-nix-store-v1-{{ checksum "nixpkgs.rev" }}
- privatestorageio-docs-nix-store-v1-
- run:
name: "Nix Build"
command: |
export NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/$(cat nixpkgs.rev).tar.gz
nix-build docs.nix
- save_cache:
name: "Cache Nix Store Paths"
key: privatestorageio-docs-nix-store-v1-{{ checksum "nixpkgs.rev" }}
paths:
- "/nix"
- store_artifacts:
path: "result/docs"
destination: "docs"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment