1
# Python CircleCI 2.1 configuration file
3
# Check https://circleci.com/docs/2.1/language-python/ for more details
10
# CircleCI maintains a library of pre-built images
11
# documented at https://circleci.com/developer/images/image/cimg/python
12
- image: cimg/python:3.11.8
13
working_directory: ~/repo
25
export git_log=$(git log --max-count=1 --pretty=format:"%B" | tr "\n" " ")
26
echo "Got commit message:"
28
if [[ -v CIRCLE_PULL_REQUEST ]] && \
29
([[ "$git_log" == *"[skip circle]"* ]] || \
30
[[ "$git_log" == *"[circle skip]"* ]])
32
echo "Skip detected, exiting job ${CIRCLE_JOB} for PR ${CIRCLE_PULL_REQUEST}."
33
circleci-agent step halt;
36
name: pull changes from merge
38
if [[ -v CI_PULL_REQUEST ]] ; then git pull --ff-only origin "refs/pull/${CI_PULL_REQUEST//*pull\//}/merge" ; fi
41
name: update submodules
43
git submodule update --init
46
name: install system dependencies
49
sudo apt-get install -y graphviz texlive-fonts-recommended texlive-latex-recommended \
50
texlive-latex-extra latexmk texlive-xetex texlive-lang-chinese doxygen
55
python3.11 -m venv venv
57
pip install --progress-bar=off -r requirements/test_requirements.txt
58
# get newer, pre-release versions of critical packages
59
pip install --progress-bar=off --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple -r requirements/doc_requirements.txt
60
# then install numpy HEAD, which will override the version installed above
61
pip install . --config-settings=setup-args="-Dallow-noblas=true"
64
name: create release notes
67
VERSION=$(pip show numpy | grep Version: | cut -d ' ' -f 2 | cut -c 1-5)
68
towncrier build --version $VERSION --yes
69
./tools/ci/test_all_newsfragments_used.py
72
name: build devdocs w/ref warnings
76
# Don't use -q, show warning summary"
77
SPHINXOPTS="-W -n" make -e html
78
if [[ $(find build/html -type f | wc -l) -lt 1000 ]]; then
79
echo "doc build failed: build/html is empty"
88
SPHINXOPTS="-n" make -e html || echo "ignoring errors for now"
94
path: doc/neps/_build/html/
98
name: run refguide-check
101
python tools/refguide_check.py -v
103
- persist_to_workspace:
108
- tools/ci/push_docs_to_repo.py
120
- "45:d8:d1:d6:f7:53:47:c5:d0:9e:35:19:79:e7:ff:24"
125
touch doc/build/html/.nojekyll
127
./tools/ci/push_docs_to_repo.py doc/build/html \
128
--committer "numpy-circleci-bot" \
129
--email "numpy-circleci-bot@nomail" \
130
--message "Docs build of $CIRCLE_SHA1" \
133
git@github.com:numpy/devdocs.git
137
- "df:8b:fb:34:2d:38:7d:49:fc:1b:e8:44:4f:bd:2c:0e"
140
name: select SSH key for neps repo
142
cat \<<\EOF > ~/.ssh/config
145
IdentityFile /home/circleci/.ssh/id_rsa_df8bfb342d387d49fc1be8444fbd2c0e
151
touch doc/neps/_build/html/.nojekyll
153
./tools/ci/push_docs_to_repo.py doc/neps/_build/html \
154
--committer "numpy-circleci-bot" \
155
--email "numpy-circleci-bot@nomail" \
156
--message "Docs build of $CIRCLE_SHA1" \
159
git@github.com:numpy/neps.git \