aboutsummaryrefslogtreecommitdiffhomepage
path: root/.circleci
diff options
context:
space:
mode:
authorGravatar Gaëtan Gilbert <gaetan.gilbert@skyskimmer.net>2017-12-13 13:42:59 +0100
committerGravatar Gaëtan Gilbert <gaetan.gilbert@skyskimmer.net>2017-12-13 13:55:44 +0100
commit4d11d6dc3bfcef3ecdf3f905dcf2fdbca259677e (patch)
tree2f0cf3640693d5fe30144407c430c85eae2e8878 /.circleci
parentc2b7b15526f0c8b87b9442567ddfa0e133cfebcf (diff)
Circle CI: use cache for opam
Diffstat (limited to '.circleci')
-rw-r--r--.circleci/config.yml55
1 files changed, 48 insertions, 7 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index fecabd7bc..7b68a0711 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -58,13 +58,15 @@ before_script: &before_script
<<: *params
steps:
- checkout
- # - restore_cache:
- # key: coq-opam-cache-{{ arch }}-v171208-
+ - restore_cache:
+ keys:
+ - coq-opam-cache-v1-{{ arch }}-{{ checksum ".circleci/config.yml" }}-
+ - coq-opam-cache-v1-{{ arch }}- # this grabs old cache if checksum doesn't match
- run: *before_script
- # - save_cache:
- # key: coq-opam-cache-{{ arch }}-v171208-static-deps
- # paths:
- # - ~/.opam
+ - save_cache:
+ key: coq-opam-cache-v1-{{ arch }}-{{ checksum ".circleci/config.yml" }}-
+ paths:
+ - ~/.opam
- run: &build-configure
name: Configure
command: |
@@ -85,7 +87,6 @@ before_script: &before_script
- persist_to_workspace:
root: &workspace ~/
paths:
- - .opam
- coq/
environment: &build-variables
@@ -100,7 +101,15 @@ before_script: &before_script
- checkout
- attach_workspace:
at: *workspace
+ - restore_cache:
+ keys:
+ - coq-opam-cache-v1-{{ arch }}-{{ checksum ".circleci/config.yml" }}-
+ - coq-opam-cache-v1-{{ arch }}- # this grabs old cache if checksum doesn't match
- run: *before_script
+ - save_cache:
+ key: coq-opam-cache-v1-{{ arch }}-{{ checksum ".circleci/config.yml" }}-
+ paths:
+ - ~/.opam
- run:
name: Validate
command: |
@@ -114,7 +123,15 @@ before_script: &before_script
- checkout
- attach_workspace:
at: *workspace
+ - restore_cache:
+ keys:
+ - coq-opam-cache-v1-{{ arch }}-{{ checksum ".circleci/config.yml" }}-
+ - coq-opam-cache-v1-{{ arch }}- # this grabs old cache if checksum doesn't match
- run: *before_script
+ - save_cache:
+ key: coq-opam-cache-v1-{{ arch }}-{{ checksum ".circleci/config.yml" }}-
+ paths:
+ - ~/.opam
- run:
name: Documentation
command: |
@@ -131,7 +148,15 @@ before_script: &before_script
- checkout
- attach_workspace:
at: *workspace
+ - restore_cache:
+ keys:
+ - coq-opam-cache-v1-{{ arch }}-{{ checksum ".circleci/config.yml" }}-
+ - coq-opam-cache-v1-{{ arch }}- # this grabs old cache if checksum doesn't match
- run: *before_script
+ - save_cache:
+ key: coq-opam-cache-v1-{{ arch }}-{{ checksum ".circleci/config.yml" }}-
+ paths:
+ - ~/.opam
- run:
name: Test
command: |
@@ -147,7 +172,15 @@ before_script: &before_script
<<: *params
steps:
- checkout
+ - restore_cache:
+ keys:
+ - coq-opam-cache-v1-{{ arch }}-{{ checksum ".circleci/config.yml" }}-
+ - coq-opam-cache-v1-{{ arch }}- # this grabs old cache if checksum doesn't match
- run: *before_script
+ - save_cache:
+ key: coq-opam-cache-v1-{{ arch }}-{{ checksum ".circleci/config.yml" }}-
+ paths:
+ - ~/.opam
- run:
name: Configure
command: |
@@ -171,7 +204,15 @@ before_script: &before_script
- checkout
- attach_workspace:
at: *workspace
+ - restore_cache:
+ keys:
+ - coq-opam-cache-v1-{{ arch }}-{{ checksum ".circleci/config.yml" }}-
+ - coq-opam-cache-v1-{{ arch }}- # this grabs old cache if checksum doesn't match
- run: *before_script
+ - save_cache:
+ key: coq-opam-cache-v1-{{ arch }}-{{ checksum ".circleci/config.yml" }}-
+ paths:
+ - ~/.opam
- run:
name: Test
command: |