4
4
version : 2.1
5
5
6
6
7
- # ##########################################
8
- # Define some common steps as YAML anchors .
7
+ # ######################################
8
+ # Define some common steps as commands .
9
9
#
10
10
11
- apt-run : &apt-install
12
- name : Install apt packages
13
- command : |
14
- sudo apt -qq update
15
- sudo apt install -y \
16
- inkscape \
17
- ffmpeg \
18
- dvipng \
19
- lmodern \
20
- cm-super \
21
- texlive-latex-base \
22
- texlive-latex-extra \
23
- texlive-fonts-recommended \
24
- texlive-latex-recommended \
25
- texlive-pictures \
26
- texlive-xetex \
27
- graphviz \
28
- fonts-crosextra-carlito \
29
- fonts-freefont-otf \
30
- fonts-humor-sans
31
-
32
- 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
44
-
45
- pip-run : &pip-install
46
- # Upgrade pip and setuptools and wheel to get as clean an install as possible
47
- name : Upgrade pip, setuptools, wheel
48
- command : |
49
- python -mpip install --upgrade --user pip
50
- python -mpip install --upgrade --user wheel
51
- python -mpip install --upgrade --user setuptools
52
-
53
- deps-run : &deps-install
54
- name : Install Python dependencies
55
- command : |
56
- python -mpip install --user numpy${NUMPY_VERSION} codecov coverage
57
- python -mpip install --user -r requirements/doc/doc-requirements.txt
58
-
59
- mpl-run : &mpl-install
60
- name : Install Matplotlib
61
- command : python -mpip install --user -ve .
62
-
63
- doc-run : &doc-build
64
- name : Build documentation
65
- command : |
66
- # Set epoch to date of latest tag.
67
- export SOURCE_DATE_EPOCH="$(git log -1 --format=%at $(git describe --abbrev=0))"
68
- make html O=-T
69
- rm -r build/html/_sources
70
- working_directory : doc
71
-
72
- doc-bundle-run : &doc-bundle
73
- name : Bundle sphinx-gallery documentation artifacts
74
- command : tar cf doc/build/sphinx-gallery-files.tar.gz doc/api/_as_gen doc/gallery doc/tutorials
75
- when : always
11
+ commands :
12
+ apt-install :
13
+ steps :
14
+ - run :
15
+ name : Install apt packages
16
+ command : |
17
+ sudo apt -qq update
18
+ sudo apt install -y \
19
+ inkscape \
20
+ ffmpeg \
21
+ dvipng \
22
+ lmodern \
23
+ cm-super \
24
+ texlive-latex-base \
25
+ texlive-latex-extra \
26
+ texlive-fonts-recommended \
27
+ texlive-latex-recommended \
28
+ texlive-pictures \
29
+ texlive-xetex \
30
+ graphviz \
31
+ fonts-crosextra-carlito \
32
+ fonts-freefont-otf \
33
+ fonts-humor-sans
34
+
35
+ fonts-install :
36
+ steps :
37
+ - run :
38
+ name : Install custom fonts
39
+ command : |
40
+ mkdir -p ~/.local/share/fonts
41
+ wget -nc https://github.com/google/fonts/blob/master/ofl/felipa/Felipa-Regular.ttf?raw=true -O ~/.local/share/fonts/Felipa-Regular.ttf || true
42
+ fc-cache -f -v
43
+ save_cache :
44
+ key : fonts-2
45
+ paths :
46
+ - ~/.local/share/fonts/
47
+ restore_cache :
48
+ key : fonts-2
49
+
50
+ pip-install :
51
+ description : Upgrade pip and setuptools and wheel to get as clean an install as possible
52
+ steps :
53
+ - run :
54
+ name : Upgrade pip, setuptools, wheel
55
+ command : |
56
+ python -mpip install --upgrade --user pip
57
+ python -mpip install --upgrade --user wheel
58
+ python -mpip install --upgrade --user setuptools
59
+
60
+ deps-install :
61
+ parameters :
62
+ numpy_version :
63
+ type : string
64
+ default : " "
65
+ steps :
66
+ - run :
67
+ name : Install Python dependencies
68
+ command : |
69
+ python -mpip install --user numpy<< parameters.numpy_version >> codecov coverage
70
+ python -mpip install --user -r requirements/doc/doc-requirements.txt
71
+
72
+ mpl-install :
73
+ steps :
74
+ - run :
75
+ name : Install Matplotlib
76
+ command : python -mpip install --user -ve .
77
+
78
+ doc-build :
79
+ steps :
80
+ - run :
81
+ name : Build documentation
82
+ command : |
83
+ # Set epoch to date of latest tag.
84
+ export SOURCE_DATE_EPOCH="$(git log -1 --format=%at $(git describe --abbrev=0))"
85
+ make html O=-T
86
+ rm -r build/html/_sources
87
+ working_directory : doc
88
+
89
+ doc-bundle :
90
+ steps :
91
+ - run :
92
+ name : Bundle sphinx-gallery documentation artifacts
93
+ command : tar cf doc/build/sphinx-gallery-files.tar.gz doc/api/_as_gen doc/gallery doc/tutorials
94
+ when : always
76
95
77
96
78
97
# #########################################
@@ -86,18 +105,16 @@ jobs:
86
105
steps :
87
106
- checkout
88
107
89
- - run : *apt-install
90
- - run : *fonts-install
91
- - run : *pip-install
92
- - run :
93
- << : *deps-install
94
- environment :
95
- NUMPY_VERSION : " ==1.13.0"
96
- - run : *mpl-install
108
+ - apt-install
109
+ - fonts-install
110
+ - pip-install
111
+ - deps-install :
112
+ numpy_version : " ==1.13.0"
113
+ - mpl-install
97
114
98
- - run : * doc-build
115
+ - doc-build
99
116
100
- - run : * doc-bundle
117
+ - doc-bundle
101
118
- store_artifacts :
102
119
path : doc/build/sphinx-gallery-files.tar.gz
103
120
@@ -110,16 +127,16 @@ jobs:
110
127
steps :
111
128
- checkout
112
129
113
- - run : * apt-install
114
- - run : * fonts-install
115
- - run : * pip-install
130
+ - apt-install
131
+ - fonts-install
132
+ - pip-install
116
133
117
- - run : * deps-install
118
- - run : * mpl-install
134
+ - deps-install
135
+ - mpl-install
119
136
120
- - run : * doc-build
137
+ - doc-build
121
138
122
- - run : * doc-bundle
139
+ - doc-bundle
123
140
- store_artifacts :
124
141
path : doc/build/sphinx-gallery-files.tar.gz
125
142
@@ -132,16 +149,16 @@ jobs:
132
149
steps :
133
150
- checkout
134
151
135
- - run : * apt-install
136
- - run : * fonts-install
137
- - run : * pip-install
152
+ - apt-install
153
+ - fonts-install
154
+ - pip-install
138
155
139
- - run : * deps-install
140
- - run : * mpl-install
156
+ - deps-install
157
+ - mpl-install
141
158
142
- - run : * doc-build
159
+ - doc-build
143
160
144
- - run : * doc-bundle
161
+ - doc-bundle
145
162
- store_artifacts :
146
163
path : doc/build/sphinx-gallery-files.tar.gz
147
164
0 commit comments