File: config.yml

package info (click to toggle)
python-eth-utils 5.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,140 kB
  • sloc: python: 5,984; makefile: 238
file content (313 lines) | stat: -rw-r--r-- 7,933 bytes parent folder | download | duplicates (2)
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
version: 2.1

# heavily inspired by https://raw.githubusercontent.com/pinax/pinax-wiki/6bd2a99ab6f702e300d708532a6d1d9aa638b9f8/.circleci/config.yml

common: &common
  working_directory: ~/repo
  steps:
    - checkout
    - run:
        name: merge pull request base
        command: ./.circleci/merge_pr.sh
    - run:
        name: merge pull request base (2nd try)
        command: ./.circleci/merge_pr.sh
        when: on_fail
    - run:
        name: merge pull request base (3rd try)
        command: ./.circleci/merge_pr.sh
        when: on_fail
    - restore_cache:
        keys:
          - cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
    - run:
        name: install dependencies
        command: |
          python -m pip install --upgrade pip
          python -m pip install tox
    - run:
        name: run tox
        command: python -m tox run -r
    - save_cache:
        paths:
          - .hypothesis
          - .tox
          - ~/.cache/pip
          - ~/.local
        key: cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}

orbs:
  win: circleci/windows@5.0.0

windows-wheel-steps:
  windows-wheel-setup: &windows-wheel-setup
    executor:
      name: win/default
      shell: bash.exe
    working_directory: C:\Users\circleci\project\eth-utils
    environment:
      TOXENV: windows-wheel
  restore-cache-step: &restore-cache-step
    restore_cache:
      keys:
        - cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
  install-pyenv-step: &install-pyenv-step
    run:
      name: install pyenv
      command: |
        pip install pyenv-win --target $HOME/.pyenv
        echo 'export PYENV="$HOME/.pyenv/pyenv-win/"' >> $BASH_ENV
        echo 'export PYENV_ROOT="$HOME/.pyenv/pyenv-win/"' >> $BASH_ENV
        echo 'export PYENV_USERPROFILE="$HOME/.pyenv/pyenv-win/"' >> $BASH_ENV
        echo 'export PATH="$PATH:$HOME/.pyenv/pyenv-win/bin"' >> $BASH_ENV
        echo 'export PATH="$PATH:$HOME/.pyenv/pyenv-win/shims"' >> $BASH_ENV
        source $BASH_ENV
        pyenv update
  install-latest-python-step: &install-latest-python-step
    run:
      name: install latest python version and tox
      command: |
        LATEST_VERSION=$(pyenv install --list | grep -E "${MINOR_VERSION}\.[0-9]+$" | tail -1)
        echo "installing python version $LATEST_VERSION"
        pyenv install $LATEST_VERSION
        pyenv global $LATEST_VERSION
        python3 -m pip install --upgrade pip
        python3 -m pip install tox
  run-tox-step: &run-tox-step
    run:
      name: run tox
      command: |
        echo 'running tox with' $(python3 --version)
        python3 -m tox run -r
  save-cache-step: &save-cache-step
    save_cache:
      paths:
        - .tox
      key: cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}

docs: &docs
  working_directory: ~/repo
  steps:
    - checkout
    - restore_cache:
        keys:
          - cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
    - run:
        name: install dependencies
        command: |
          python -m pip install --upgrade pip
          python -m pip install tox
    - run:
        name: install latexpdf dependencies
        command: |
          sudo apt-get update
          sudo apt-get install latexmk tex-gyre texlive-fonts-extra texlive-xetex xindy
    - run:
        name: run tox
        command: python -m tox run -r
    - store_artifacts:
          path: /home/circleci/repo/docs/_build
    - save_cache:
        paths:
          - .tox
          - ~/.cache/pip
          - ~/.local
        key: cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
  resource_class: xlarge

jobs:
  docs:
    <<: *docs
    docker:
      - image: cimg/python:3.10
        environment:
          TOXENV: docs

  py38-core:
    <<: *common
    docker:
      - image: cimg/python:3.8
        environment:
          TOXENV: py38-core
  py39-core:
    <<: *common
    docker:
      - image: cimg/python:3.9
        environment:
          TOXENV: py39-core
  py310-core:
    <<: *common
    docker:
      - image: cimg/python:3.10
        environment:
          TOXENV: py310-core
  py311-core:
    <<: *common
    docker:
      - image: cimg/python:3.11
        environment:
          TOXENV: py311-core
  py312-core:
    <<: *common
    docker:
      - image: cimg/python:3.12
        environment:
          TOXENV: py312-core
  py313-core:
    <<: *common
    docker:
      - image: cimg/python:3.13
        environment:
          TOXENV: py313-core

  py38-lint:
    <<: *common
    docker:
      - image: cimg/python:3.8
        environment:
          TOXENV: py38-lint
  py39-lint:
    <<: *common
    docker:
      - image: cimg/python:3.9
        environment:
          TOXENV: py39-lint
  py310-lint:
    <<: *common
    docker:
      - image: cimg/python:3.10
        environment:
          TOXENV: py310-lint
  py311-lint:
    <<: *common
    docker:
      - image: cimg/python:3.11
        environment:
          TOXENV: py311-lint
  py312-lint:
    <<: *common
    docker:
      - image: cimg/python:3.12
        environment:
          TOXENV: py312-lint
  py313-lint:
    <<: *common
    docker:
      - image: cimg/python:3.13
        environment:
          TOXENV: py313-lint

  py38-wheel:
    <<: *common
    docker:
      - image: cimg/python:3.8
        environment:
          TOXENV: py38-wheel
  py39-wheel:
    <<: *common
    docker:
      - image: cimg/python:3.9
        environment:
          TOXENV: py39-wheel
  py310-wheel:
    <<: *common
    docker:
      - image: cimg/python:3.10
        environment:
          TOXENV: py310-wheel
  py311-wheel:
    <<: *common
    docker:
      - image: cimg/python:3.11
        environment:
          TOXENV: py311-wheel
  py312-wheel:
    <<: *common
    docker:
      - image: cimg/python:3.12
        environment:
          TOXENV: py312-wheel
  py313-wheel:
    <<: *common
    docker:
      - image: cimg/python:3.13
        environment:
          TOXENV: py313-wheel

  py311-windows-wheel:
    <<: *windows-wheel-setup
    steps:
      - checkout
      - <<: *restore-cache-step
      - <<: *install-pyenv-step
      - run:
          name: set minor version
          command: echo "export MINOR_VERSION='3.11'" >> $BASH_ENV
      - <<: *install-latest-python-step
      - <<: *run-tox-step
      - <<: *save-cache-step

  py312-windows-wheel:
    <<: *windows-wheel-setup
    steps:
      - checkout
      - <<: *restore-cache-step
      - <<: *install-pyenv-step
      - run:
          name: set minor version
          command: echo "export MINOR_VERSION='3.12'" >> $BASH_ENV
      - <<: *install-latest-python-step
      - <<: *run-tox-step
      - <<: *save-cache-step

  py313-windows-wheel:
    <<: *windows-wheel-setup
    steps:
      - checkout
      - <<: *restore-cache-step
      - <<: *install-pyenv-step
      - run:
          name: set minor version
          command: echo "export MINOR_VERSION='3.13'" >> $BASH_ENV
      - <<: *install-latest-python-step
      - <<: *run-tox-step
      - <<: *save-cache-step

define: &all_jobs
  - docs
  - py38-core
  - py39-core
  - py310-core
  - py311-core
  - py312-core
  - py313-core
  - py38-lint
  - py39-lint
  - py310-lint
  - py311-lint
  - py312-lint
  - py313-lint
  - py38-wheel
  - py39-wheel
  - py310-wheel
  - py311-wheel
  - py312-wheel
  - py313-wheel
  - py311-windows-wheel
  - py312-windows-wheel
  - py313-windows-wheel

workflows:
  version: 2
  test:
    jobs: *all_jobs
  nightly:
    triggers:
      - schedule:
          # Weekdays 12:00p UTC
          cron: "0 12 * * 1,2,3,4,5"
          filters:
            branches:
              only:
                - main
    jobs: *all_jobs