numpy

Форк
0
/
config.yml 
171 строка · 5.1 Кб
1
# Python CircleCI 2.1 configuration file
2
#
3
# Check https://circleci.com/docs/2.1/language-python/ for more details
4
#
5
version: 2.1
6

7
# Aliases to reuse
8
_defaults: &defaults
9
  docker:
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
14

15

16
jobs:
17
  build:
18
    <<: *defaults
19
    steps:
20
      - checkout
21

22
      - run:
23
          name: check skip
24
          command: |
25
            export git_log=$(git log --max-count=1 --pretty=format:"%B" | tr "\n" " ")
26
            echo "Got commit message:"
27
            echo "${git_log}"
28
            if [[ -v CIRCLE_PULL_REQUEST ]] && \
29
               ([[ "$git_log" == *"[skip circle]"* ]] || \
30
                [[ "$git_log" == *"[circle skip]"* ]])
31
            then
32
              echo "Skip detected, exiting job ${CIRCLE_JOB} for PR ${CIRCLE_PULL_REQUEST}."
33
              circleci-agent step halt;
34
            fi
35
      - run:
36
          name: pull changes from merge
37
          command: |
38
            if [[ -v CI_PULL_REQUEST ]] ; then git pull --ff-only origin "refs/pull/${CI_PULL_REQUEST//*pull\//}/merge" ; fi
39

40
      - run:
41
          name: update submodules
42
          command: |
43
            git submodule update --init
44

45
      - run:
46
          name: install system dependencies
47
          command: |
48
            sudo apt-get update
49
            sudo apt-get install -y graphviz texlive-fonts-recommended texlive-latex-recommended \
50
              texlive-latex-extra latexmk texlive-xetex texlive-lang-chinese doxygen
51

52
      - run:
53
          name: build NumPy
54
          command: |
55
            python3.11 -m venv venv
56
            . venv/bin/activate
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"
62

63
      - run:
64
          name: create release notes
65
          command: |
66
            . venv/bin/activate
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
70

71
      - run:
72
          name: build devdocs w/ref warnings
73
          command: |
74
            . venv/bin/activate
75
            cd doc
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"
80
                exit -1
81
            fi
82

83
      - run:
84
          name: build neps
85
          command: |
86
            . venv/bin/activate
87
            cd doc/neps
88
            SPHINXOPTS="-n" make -e html || echo "ignoring errors for now"
89

90
      - store_artifacts:
91
          path: doc/build/html/
92

93
      - store_artifacts:
94
          path: doc/neps/_build/html/
95
     #      destination: neps
96

97
      - run:
98
          name: run refguide-check
99
          command: |
100
            . venv/bin/activate
101
            python tools/refguide_check.py -v
102

103
      - persist_to_workspace:
104
          root: ~/repo
105
          paths:
106
            - doc/build/html
107
            - doc/neps/_build
108
            - tools/ci/push_docs_to_repo.py
109

110
  deploy:
111
    <<: *defaults
112
    steps:
113
      - checkout
114

115
      - attach_workspace:
116
          at: ~/repo
117

118
      - add_ssh_keys:
119
          fingerprints:
120
            - "45:d8:d1:d6:f7:53:47:c5:d0:9e:35:19:79:e7:ff:24"
121

122
      -  run:
123
          name: deploy devdocs
124
          command: |
125
            touch doc/build/html/.nojekyll
126

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" \
131
                --count 5 \
132
                --force \
133
                git@github.com:numpy/devdocs.git
134

135
      - add_ssh_keys:
136
          fingerprints:
137
            - "df:8b:fb:34:2d:38:7d:49:fc:1b:e8:44:4f:bd:2c:0e"
138

139
      - run:
140
          name: select SSH key for neps repo
141
          command: |
142
            cat \<<\EOF > ~/.ssh/config
143
            Host github.com
144
              IdentitiesOnly yes
145
              IdentityFile /home/circleci/.ssh/id_rsa_df8bfb342d387d49fc1be8444fbd2c0e
146
            EOF
147

148
      -  run:
149
          name: deploy neps
150
          command: |
151
            touch doc/neps/_build/html/.nojekyll
152

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" \
157
                --count 5 \
158
                --force \
159
                git@github.com:numpy/neps.git \
160

161
workflows:
162
  version: 2
163
  default:
164
    jobs:
165
      - build
166
      - deploy:
167
          requires:
168
            - build
169
          filters:
170
            branches:
171
              only: main
172

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.