124 lines
3.8 KiB
YAML
124 lines
3.8 KiB
YAML
# Python CircleCI 2.0 configuration file
|
|
#
|
|
# Check https://circleci.com/docs/2.0/language-python/ for more details
|
|
#
|
|
version: 2
|
|
jobs:
|
|
build:
|
|
docker:
|
|
# CircleCI maintains a library of pre-built images
|
|
# documented at https://circleci.com/docs/2.0/circleci-images/
|
|
- image: circleci/python:3.6.6
|
|
|
|
working_directory: ~/repo
|
|
|
|
steps:
|
|
- checkout
|
|
|
|
- run:
|
|
name: install dependencies
|
|
command: |
|
|
python3 -m venv venv
|
|
ln -s $(which python3) venv/bin/python3.6
|
|
. venv/bin/activate
|
|
pip install cython sphinx==2.3.1 matplotlib ipython
|
|
sudo apt-get update
|
|
sudo apt-get install -y graphviz texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra texlive-generic-extra latexmk texlive-xetex
|
|
|
|
- run:
|
|
name: build numpy
|
|
command: |
|
|
. venv/bin/activate
|
|
pip install --upgrade pip 'setuptools<49.2.0'
|
|
pip install cython
|
|
pip install .
|
|
pip install scipy
|
|
pip install pandas
|
|
|
|
- run:
|
|
name: create release notes
|
|
command: |
|
|
. venv/bin/activate
|
|
pip install git+https://github.com/hawkowl/towncrier.git@master
|
|
VERSION=$(python -c "import setup; print(setup.VERSION)")
|
|
towncrier --version $VERSION --yes
|
|
./tools/ci/test_all_newsfragments_used.py
|
|
|
|
- run:
|
|
name: run doctests on documentation
|
|
command: |
|
|
. venv/bin/activate
|
|
(cd doc ; git submodule update --init)
|
|
python tools/refguide_check.py --rst
|
|
|
|
- run:
|
|
name: build devdocs
|
|
command: |
|
|
. venv/bin/activate
|
|
cd doc
|
|
SPHINXOPTS=-q make -e html
|
|
|
|
- run:
|
|
name: build neps
|
|
command: |
|
|
. venv/bin/activate
|
|
cd doc/neps
|
|
SPHINXOPTS=-q make -e html
|
|
|
|
- store_artifacts:
|
|
path: doc/build/html/
|
|
|
|
|
|
# - store_artifacts:
|
|
# path: doc/neps/_build/html/
|
|
# destination: neps
|
|
|
|
- add_ssh_keys:
|
|
fingerprints:
|
|
- "9f:8c:e5:3f:53:40:0b:ee:c9:c3:0f:fd:0f:3c:cc:55"
|
|
|
|
- run:
|
|
name: deploy devdocs
|
|
command: |
|
|
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
|
touch doc/build/html/.nojekyll
|
|
|
|
./tools/ci/push_docs_to_repo.py doc/build/html \
|
|
git@github.com:numpy/devdocs.git \
|
|
--committer "numpy-circleci-bot" \
|
|
--email "numpy-circleci-bot@nomail" \
|
|
--message "Docs build of $CIRCLE_SHA1" \
|
|
--force
|
|
else
|
|
echo "Not on the master branch; skipping deployment"
|
|
fi
|
|
|
|
- add_ssh_keys:
|
|
fingerprints:
|
|
- "11:fb:19:69:80:3a:6d:37:9c:d1:ac:20:17:cd:c8:17"
|
|
|
|
- run:
|
|
name: select SSH key for neps repo
|
|
command: |
|
|
cat <<\EOF > ~/.ssh/config
|
|
Host github.com
|
|
IdentitiesOnly yes
|
|
IdentityFile /home/circleci/.ssh/id_rsa_11fb1969803a6d379cd1ac2017cdc817
|
|
EOF
|
|
|
|
- run:
|
|
name: deploy neps
|
|
command: |
|
|
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
|
touch doc/neps/_build/html/.nojekyll
|
|
|
|
./tools/ci/push_docs_to_repo.py doc/neps/_build/html \
|
|
git@github.com:numpy/neps.git \
|
|
--committer "numpy-circleci-bot" \
|
|
--email "numpy-circleci-bot@nomail" \
|
|
--message "Docs build of $CIRCLE_SHA1" \
|
|
--force
|
|
else
|
|
echo "Not on the master branch; skipping deployment"
|
|
fi
|