forked from scikit-learn/scikit-learn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
125 lines (120 loc) · 3.46 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
version: 2.1
jobs:
lint:
docker:
- image: cimg/python:3.8.12
steps:
- checkout
- run:
name: dependencies
command: |
source build_tools/shared.sh
# Include pytest compatibility with mypy
pip install pytest flake8 $(get_dep mypy min) $(get_dep black min)
- run:
name: linting
command: ./build_tools/linting.sh
doc-min-dependencies:
docker:
- image: cimg/python:3.8.12
environment:
- MKL_NUM_THREADS: 2
- OPENBLAS_NUM_THREADS: 2
- CONDA_ENV_NAME: testenv
- LOCK_FILE: build_tools/circle/doc_min_dependencies_linux-64_conda.lock
# Sphinx race condition in doc-min-dependencies is causing job to stall
# Here we run the job serially
- SPHINX_NUMJOBS: 1
steps:
- checkout
- run: ./build_tools/circle/checkout_merge_commit.sh
- restore_cache:
key: v1-doc-min-deps-datasets-{{ .Branch }}
- restore_cache:
keys:
- doc-min-deps-ccache-{{ .Branch }}
- doc-min-deps-ccache
- run: ./build_tools/circle/build_doc.sh
- save_cache:
key: doc-min-deps-ccache-{{ .Branch }}-{{ .BuildNum }}
paths:
- ~/.ccache
- ~/.cache/pip
- save_cache:
key: v1-doc-min-deps-datasets-{{ .Branch }}
paths:
- ~/scikit_learn_data
- store_artifacts:
path: doc/_build/html/stable
destination: doc
- store_artifacts:
path: ~/log.txt
destination: log.txt
doc:
docker:
- image: cimg/python:3.8.12
environment:
- MKL_NUM_THREADS: 2
- OPENBLAS_NUM_THREADS: 2
- CONDA_ENV_NAME: testenv
- LOCK_FILE: build_tools/circle/doc_linux-64_conda.lock
steps:
- checkout
- run: ./build_tools/circle/checkout_merge_commit.sh
- restore_cache:
key: v1-doc-datasets-{{ .Branch }}
- restore_cache:
keys:
- doc-ccache-{{ .Branch }}
- doc-ccache
- run: ./build_tools/circle/build_doc.sh
- save_cache:
key: doc-ccache-{{ .Branch }}-{{ .BuildNum }}
paths:
- ~/.ccache
- ~/.cache/pip
- save_cache:
key: v1-doc-datasets-{{ .Branch }}
paths:
- ~/scikit_learn_data
- store_artifacts:
path: doc/_build/html/stable
destination: doc
- store_artifacts:
path: ~/log.txt
destination: log.txt
# Persists generated documentation so that it can be attached and deployed
# in the 'deploy' step.
- persist_to_workspace:
root: doc/_build/html
paths: .
deploy:
docker:
- image: cimg/python:3.8.12
steps:
- checkout
- run: ./build_tools/circle/checkout_merge_commit.sh
# Attach documentation generated in the 'doc' step so that it can be
# deployed.
- attach_workspace:
at: doc/_build/html
- run: ls -ltrh doc/_build/html/stable
- deploy:
command: |
if [[ "${CIRCLE_BRANCH}" =~ ^main$|^[0-9]+\.[0-9]+\.X$ ]]; then
bash build_tools/circle/push_doc.sh doc/_build/html/stable
fi
workflows:
version: 2
build-doc-and-deploy:
jobs:
- lint
- doc:
requires:
- lint
- doc-min-dependencies:
requires:
- lint
- deploy:
requires:
- doc