Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit af1bd3e

Browse files
committed
Fix caching of fonts in CircleCI builds.
The `save_cache and `restore_cache` entries need to be separate steps, not keys on the `run` step.
1 parent 7b14917 commit af1bd3e

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

.circleci/config.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,18 @@ apt-run: &apt-install
3030
fonts-humor-sans
3131
3232
fonts-run: &fonts-install
33-
name: Install custom fonts
34-
command: |
35-
mkdir -p ~/.local/share/fonts
36-
wget -nc https://github.com/google/fonts/blob/master/ofl/felipa/Felipa-Regular.ttf?raw=true -O ~/.local/share/fonts/Felipa-Regular.ttf || true
37-
fc-cache -f -v
38-
save_cache:
39-
key: fonts-2
40-
paths:
41-
- ~/.local/share/fonts/
42-
restore_cache:
43-
key: fonts-2
33+
- restore_cache:
34+
key: fonts-2
35+
- run:
36+
name: Install custom fonts
37+
command: |
38+
mkdir -p ~/.local/share/fonts
39+
wget -nc https://github.com/google/fonts/blob/master/ofl/felipa/Felipa-Regular.ttf?raw=true -O ~/.local/share/fonts/Felipa-Regular.ttf || true
40+
fc-cache -f -v
41+
- save_cache:
42+
key: fonts-2
43+
paths:
44+
- ~/.local/share/fonts/
4445

4546
pip-run: &pip-install
4647
# Upgrade pip and setuptools and wheel to get as clean an install as possible
@@ -87,7 +88,7 @@ jobs:
8788
- checkout
8889

8990
- run: *apt-install
90-
- run: *fonts-install
91+
- *fonts-install
9192
- run: *pip-install
9293
- run:
9394
<<: *deps-install
@@ -111,7 +112,7 @@ jobs:
111112
- checkout
112113

113114
- run: *apt-install
114-
- run: *fonts-install
115+
- *fonts-install
115116
- run: *pip-install
116117

117118
- run: *deps-install
@@ -133,7 +134,7 @@ jobs:
133134
- checkout
134135

135136
- run: *apt-install
136-
- run: *fonts-install
137+
- *fonts-install
137138
- run: *pip-install
138139

139140
- run: *deps-install

0 commit comments

Comments
 (0)