From f339433055b4c0f7a3fce5497f2b445d5e5e0d6f Mon Sep 17 00:00:00 2001 From: fselmo Date: Fri, 9 Aug 2024 11:37:49 -0600 Subject: [PATCH] Add pypy tests runs for eels backend with py310 --- .circleci/config.yml | 902 ++++++++++--------------------------------- 1 file changed, 198 insertions(+), 704 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3845e7811a..4900145106 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,11 +14,20 @@ parameters: go_version: default: "1.22.4" type: string + install_dev_tools: + type: boolean + default: false common: &common working_directory: ~/repo steps: - checkout + - run: + name: Install dev tools (conditional, default false) + command: | + if [ "<< pipeline.parameters.install_dev_tools >>" = "true" ]; then + sudo apt-get update && sudo apt-get install -y curl git + fi - run: name: merge pull request base command: ./.circleci/merge_pr.sh @@ -136,52 +145,6 @@ geth_custom_steps: &geth_custom_steps 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\web3.py - 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: @@ -212,694 +175,225 @@ docs: &docs resource_class: xlarge jobs: - docs: - <<: *docs - docker: - - image: cimg/python:3.9 - environment: - TOXENV: docs - - py38-lint: - <<: *common - docker: - - image: cimg/python:3.8 - environment: - TOXENV: py38-lint - - py38-core-pyevm: - <<: *common - docker: - - image: cimg/python:3.8 - environment: - TOXENV: py38-core-pyevm - - py38-core-pyevm_async: - <<: *common - docker: - - image: cimg/python:3.8 - environment: - TOXENV: py38-core-pyevm_async - - py38-ens-pyevm: - <<: *common - docker: - - image: cimg/python:3.8 - environment: - TOXENV: py38-ens-pyevm - - py38-ensip15: - <<: *common - docker: - - image: cimg/python:3.8 - environment: - TOXENV: py38-ensip15 - - py38-integration-goethereum-ipc: - <<: *geth_steps - docker: - - image: cimg/python:3.8 - environment: - TOXENV: py38-integration-goethereum-ipc - - py38-integration-goethereum-ipc_async: - <<: *geth_steps - docker: - - image: cimg/python:3.8 - environment: - TOXENV: py38-integration-goethereum-ipc_async - - py38-integration-goethereum-http: - <<: *geth_steps - docker: - - image: cimg/python:3.8 - environment: - TOXENV: py38-integration-goethereum-http - - py38-integration-goethereum-http_async: - <<: *geth_steps - docker: - - image: cimg/python:3.8 - environment: - TOXENV: py38-integration-goethereum-http_async - - py38-integration-goethereum-legacy_ws: - <<: *geth_steps - docker: - - image: cimg/python:3.8 - environment: - TOXENV: py38-integration-goethereum-legacy_ws - - py38-integration-goethereum-ws: - <<: *geth_steps - docker: - - image: cimg/python:3.8 - environment: - TOXENV: py38-integration-goethereum-ws - - py38-integration-ethtester-pyevm: - <<: *common - docker: - - image: cimg/python:3.8 - environment: - TOXENV: py38-integration-ethtester-pyevm - - py38-wheel: - <<: *common - docker: - - image: cimg/python:3.8 - environment: - TOXENV: py38-wheel - - # - # Python 3.9 - # - py39-lint: - <<: *common - docker: - - image: cimg/python:3.9 - environment: - TOXENV: py39-lint - - py39-core-pyevm: - <<: *common - docker: - - image: cimg/python:3.9 - environment: - TOXENV: py39-core-pyevm - - py39-core-pyevm_async: - <<: *common - docker: - - image: cimg/python:3.9 - environment: - TOXENV: py39-core-pyevm_async - - py39-ens-pyevm: - <<: *common - docker: - - image: cimg/python:3.9 - environment: - TOXENV: py39-ens-pyevm - - py39-ensip15: - <<: *common - docker: - - image: cimg/python:3.9 - environment: - TOXENV: py39-ensip15 - - py39-integration-goethereum-ipc: - <<: *geth_steps - docker: - - image: cimg/python:3.9 - environment: - TOXENV: py39-integration-goethereum-ipc - - py39-integration-goethereum-ipc_async: - <<: *geth_steps - docker: - - image: cimg/python:3.9 - environment: - TOXENV: py39-integration-goethereum-ipc_async - - py39-integration-goethereum-http: - <<: *geth_steps - docker: - - image: cimg/python:3.9 - environment: - TOXENV: py39-integration-goethereum-http - - py39-integration-goethereum-http_async: - <<: *geth_steps - docker: - - image: cimg/python:3.9 - environment: - TOXENV: py39-integration-goethereum-http_async - - py39-integration-goethereum-ws: - <<: *geth_steps - docker: - - image: cimg/python:3.9 - environment: - TOXENV: py39-integration-goethereum-ws - - py39-integration-goethereum-legacy_ws: - <<: *geth_steps - docker: - - image: cimg/python:3.9 - environment: - TOXENV: py39-integration-goethereum-ws - - py39-integration-ethtester-pyevm: - <<: *common - docker: - - image: cimg/python:3.9 - environment: - TOXENV: py39-integration-ethtester-pyevm - - py39-wheel: - <<: *common - docker: - - image: cimg/python:3.9 - environment: - TOXENV: py39-wheel - - # - # Python 3.10 - # - py310-lint: - <<: *common - docker: - - image: cimg/python:3.10 - environment: - TOXENV: py310-lint - - py310-core-pyevm: + common: + parameters: + python_version: + type: string + tox_env: + type: string <<: *common docker: - - image: cimg/python:3.10 + - image: cimg/python:<< parameters.python_version >> environment: - TOXENV: py310-core-pyevm + TOXENV: py\<< parameters.python_version.replace('.', '') \>>-<< parameters.tox_env >> - py310-core-pyevm_async: + common-pypy: + parameters: + python_version: + type: string + tox_env: + type: string <<: *common docker: - - image: cimg/python:3.10 - environment: - TOXENV: py310-core-pyevm_async - - py310-core-eels: - <<: *common - docker: - - image: cimg/python:3.10 - environment: - TOXENV: py310-core-eels - - py310-core-eels_async: - <<: *common - docker: - - image: cimg/python:3.10 - environment: - TOXENV: py310-core-eels_async - - py310-ens-pyevm: - <<: *common - docker: - - image: cimg/python:3.10 - environment: - TOXENV: py310-ens-pyevm - - py310-ens-eels: - <<: *common - docker: - - image: cimg/python:3.10 - environment: - TOXENV: py310-ens-eels - - py310-ensip15: - <<: *common - docker: - - image: cimg/python:3.10 - environment: - TOXENV: py310-ensip15 - - py310-integration-goethereum-ipc: - <<: *geth_steps - docker: - - image: cimg/python:3.10 - environment: - TOXENV: py310-integration-goethereum-ipc - - py310-integration-goethereum-ipc_async: - <<: *geth_steps - docker: - - image: cimg/python:3.10 - environment: - TOXENV: py310-integration-goethereum-ipc_async - - py310-integration-goethereum-http: - <<: *geth_steps - docker: - - image: cimg/python:3.10 - environment: - TOXENV: py310-integration-goethereum-http - - py310-integration-goethereum-http_async: - <<: *geth_steps - docker: - - image: cimg/python:3.10 - environment: - TOXENV: py310-integration-goethereum-http_async - - py310-integration-goethereum-legacy_ws: - <<: *geth_steps - docker: - - image: cimg/python:3.10 + - image: pypy:<< parameters.python_version >>-slim environment: - TOXENV: py310-integration-goethereum-legacy_ws + TOXENV: py\<< parameters.python_version.replace('.', '') \>>-<< parameters.tox_env >> - py310-integration-goethereum-ws: + geth: + parameters: + python_version: + type: string + tox_env: + type: string <<: *geth_steps docker: - - image: cimg/python:3.10 + - image: cimg/python:<< parameters.python_version >> environment: - TOXENV: py310-integration-goethereum-ws + TOXENV: py\<< parameters.python_version.replace('.', '') \>>-<< parameters.tox_env >> - py310-integration-ethtester-pyevm: - <<: *common - docker: - - image: cimg/python:3.10 - environment: - TOXENV: py310-integration-ethtester-pyevm - - py310-integration-ethtester-eels: - <<: *common - docker: - - image: cimg/python:3.10 - environment: - TOXENV: py310-integration-ethtester-eels - - py310-wheel: - <<: *common - docker: - - image: cimg/python:3.10 - environment: - TOXENV: py310-wheel - - # - # Python 3.11 - # - py311-lint: - <<: *common - docker: - - image: cimg/python:3.11 - environment: - TOXENV: py311-lint - - py311-core-pyevm: - <<: *common - docker: - - image: cimg/python:3.11 - environment: - TOXENV: py311-core-pyevm - - py311-core-pyevm_async: - <<: *common - docker: - - image: cimg/python:3.11 - environment: - TOXENV: py311-core-pyevm_async - - py311-core-eels: - <<: *common - docker: - - image: cimg/python:3.11 - environment: - TOXENV: py311-core-eels - - py311-core-eels_async: - <<: *common - docker: - - image: cimg/python:3.11 - environment: - TOXENV: py311-core-eels_async - - py311-ens-pyevm: - <<: *common - docker: - - image: cimg/python:3.11 - environment: - TOXENV: py311-ens-pyevm - - py311-ens-eels: - <<: *common - docker: - - image: cimg/python:3.11 - environment: - TOXENV: py311-ens-eels - - py311-ensip15: - <<: *common - docker: - - image: cimg/python:3.11 - environment: - TOXENV: py311-ensip15 - - py311-integration-goethereum-ipc: - <<: *geth_steps - docker: - - image: cimg/python:3.11 - environment: - TOXENV: py311-integration-goethereum-ipc - - py311-integration-goethereum-ipc_async: - <<: *geth_steps - docker: - - image: cimg/python:3.11 - environment: - TOXENV: py311-integration-goethereum-ipc_async - - py311-integration-goethereum-http: - <<: *geth_steps - docker: - - image: cimg/python:3.11 - environment: - TOXENV: py311-integration-goethereum-http - - py311-integration-goethereum-http_async: - <<: *geth_steps - docker: - - image: cimg/python:3.11 - environment: - TOXENV: py311-integration-goethereum-http_async - - py311-integration-goethereum-legacy_ws: - <<: *geth_steps - docker: - - image: cimg/python:3.11 - environment: - TOXENV: py311-integration-goethereum-legacy_ws - - py311-integration-goethereum-ws: - <<: *geth_steps - docker: - - image: cimg/python:3.11 - environment: - TOXENV: py311-integration-goethereum-ws - - py311-integration-ethtester-pyevm: - <<: *common + docs: + <<: *docs docker: - - image: cimg/python:3.11 + - image: cimg/python:<< parameters.python_version >> environment: - TOXENV: py311-integration-ethtester-pyevm + TOXENV: docs - py311-integration-ethtester-eels: - <<: *common - docker: - - image: cimg/python:3.11 + windows-wheel: + parameters: + python_version: + type: string + executor: + name: win/default + shell: bash.exe + working_directory: C:\Users\circleci\project\web3.py environment: - TOXENV: py311-integration-ethtester-eels - - py311-wheel: - <<: *common - docker: - - image: cimg/python:3.11 - environment: - TOXENV: py311-wheel - - py311-windows-wheel: - <<: *windows-wheel-setup + TOXENV: << parameters.tox_env >> steps: - checkout - - <<: *restore-cache-step - - <<: *install-pyenv-step + - restore_cache: + keys: + - cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }} - run: - name: set minor version - command: echo "export MINOR_VERSION='3.11'" >> $BASH_ENV - - <<: *install-latest-python-step - - <<: *run-tox-step - - <<: *save-cache-step - - # - # Python 3.12 - # - py312-lint: - <<: *common - docker: - - image: cimg/python:3.12 - environment: - TOXENV: py312-lint - - py312-core-pyevm: - <<: *common - docker: - - image: cimg/python:3.12 - environment: - TOXENV: py312-core-pyevm - - py312-core-pyevm_async: - <<: *common - docker: - - image: cimg/python:3.12 - environment: - TOXENV: py312-core-pyevm_async - - py312-core-eels: - <<: *common - docker: - - image: cimg/python:3.12 - environment: - TOXENV: py312-core-eels - - py312-core-eels_async: - <<: *common - docker: - - image: cimg/python:3.12 - environment: - TOXENV: py312-core-eels_async - - py312-ens-pyevm: - <<: *common - docker: - - image: cimg/python:3.12 - environment: - TOXENV: py312-ens-pyevm - - py312-ens-eels: - <<: *common - docker: - - image: cimg/python:3.12 - environment: - TOXENV: py312-ens-eels - - py312-ensip15: - <<: *common - docker: - - image: cimg/python:3.12 - environment: - TOXENV: py312-ensip15 - - py312-integration-goethereum-ipc: - <<: *geth_steps - docker: - - image: cimg/python:3.12 - environment: - TOXENV: py312-integration-goethereum-ipc - - py312-integration-goethereum-ipc_async: - <<: *geth_steps - docker: - - image: cimg/python:3.12 - environment: - TOXENV: py312-integration-goethereum-ipc_async - - py312-integration-goethereum-http: - <<: *geth_steps - docker: - - image: cimg/python:3.12 - environment: - TOXENV: py312-integration-goethereum-http - - py312-integration-goethereum-http_async: - <<: *geth_steps - docker: - - image: cimg/python:3.12 - environment: - TOXENV: py312-integration-goethereum-http_async - - py312-integration-goethereum-legacy_ws: - <<: *geth_steps - docker: - - image: cimg/python:3.12 - environment: - TOXENV: py312-integration-goethereum-legacy_ws - - py312-integration-goethereum-ws: - <<: *geth_steps - docker: - - image: cimg/python:3.12 - environment: - TOXENV: py312-integration-goethereum-ws - - py312-integration-ethtester-pyevm: - <<: *common - docker: - - image: cimg/python:3.12 - environment: - TOXENV: py312-integration-ethtester-pyevm - - py312-integration-ethtester-eels: - <<: *common - docker: - - image: cimg/python:3.12 - environment: - TOXENV: py312-integration-ethtester-eels - - py312-wheel: - <<: *common - docker: - - image: cimg/python:3.12 - environment: - TOXENV: py312-wheel - - py312-windows-wheel: - <<: *windows-wheel-setup - steps: - - checkout - - <<: *restore-cache-step - - <<: *install-pyenv-step + 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 - run: - name: set minor version - command: echo "export MINOR_VERSION='3.12'" >> $BASH_ENV - - <<: *install-latest-python-step - - <<: *run-tox-step - - <<: *save-cache-step - - benchmark: - <<: *geth_steps - docker: - - image: cimg/python:3.10 - environment: - TOXENV: benchmark - - -define: &all_jobs - # These are the longest running tests, start them first - - py310-core-eels - - py311-core-eels - - py312-core-eels - - py38-core-pyevm - - py39-core-pyevm - - py310-core-pyevm - - py311-core-pyevm - - py312-core-pyevm - - py310-core-eels_async - - py311-core-eels_async - - py312-core-eels_async - - py38-core-pyevm_async - - py39-core-pyevm_async - - py310-core-pyevm_async - - py311-core-pyevm_async - - py312-core-pyevm_async - - docs - - benchmark - - py38-lint - - py38-ens-pyevm - - py38-ensip15 - - py38-integration-goethereum-ipc - - py38-integration-goethereum-ipc_async - - py38-integration-goethereum-http - - py38-integration-goethereum-http_async - - py38-integration-goethereum-legacy_ws - - py38-integration-goethereum-ws - - py38-integration-ethtester-pyevm - - py38-wheel - - py39-lint - - py39-ens-pyevm - - py39-ensip15 - - py39-integration-goethereum-ipc - - py39-integration-goethereum-ipc_async - - py39-integration-goethereum-http - - py39-integration-goethereum-http_async - - py39-integration-goethereum-legacy_ws - - py39-integration-goethereum-ws - - py39-integration-ethtester-pyevm - - py39-wheel - - py310-lint - - py310-ens-pyevm - - py310-ens-eels - - py310-ensip15 - - py310-integration-goethereum-ipc - - py310-integration-goethereum-ipc_async - - py310-integration-goethereum-http - - py310-integration-goethereum-http_async - - py310-integration-goethereum-legacy_ws - - py310-integration-goethereum-ws - - py310-integration-ethtester-pyevm - - py310-integration-ethtester-eels - - py310-wheel - - py311-lint - - py311-ens-pyevm - - py311-ens-eels - - py311-ensip15 - - py311-integration-goethereum-ipc - - py311-integration-goethereum-ipc_async - - py311-integration-goethereum-http - - py311-integration-goethereum-http_async - - py311-integration-goethereum-legacy_ws - - py311-integration-goethereum-ws - - py311-integration-ethtester-pyevm - - py311-integration-ethtester-eels - - py311-wheel - - py311-windows-wheel - - py312-lint - - py312-ens-pyevm - - py312-ens-eels - - py312-ensip15 - - py312-integration-goethereum-ipc - - py312-integration-goethereum-ipc_async - - py312-integration-goethereum-http - - py312-integration-goethereum-http_async - - py312-integration-goethereum-legacy_ws - - py312-integration-goethereum-ws - - py312-integration-ethtester-pyevm - - py312-integration-ethtester-eels - - py312-wheel - - py312-windows-wheel + name: install latest python version and tox + command: | + LATEST_VERSION=$(pyenv install --list | grep -E "${{ parameters.python_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: + name: run tox + command: | + echo 'running tox with' $(python3 --version) + python3 -m tox run -r + - save_cache: + paths: + - .tox + key: cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }} workflows: version: 2 test: - jobs: *all_jobs + jobs: + - common: + matrix: + parameters: + python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + tox_env: [ + "lint", + "core-pyevm", + "core-pyevm_async", + "ens-pyevm", + "ensip15", + "integration-goethereum-ipc", + "integration-goethereum-ipc_async", + "integration-goethereum-http", + "integration-goethereum-http_async", + "integration-goethereum-legacy_ws", + "integration-goethereum-ws", + "integration-ethtester-pyevm", + "wheel" + ] + - common: + matrix: + parameters: + # eels only supports 3.10 and above + python_version: ["3.10", "3.11", "3.12"] + tox_env: [ + "core-eels", + "core-eels_async", + "ens-eels", + "integration-ethtester-eels" + ] + - common-pypy: + matrix: + parameters: + # CircleCI currently only supports 3.10 for pypy + python_version: ["3.10"] + tox_env: [ + "core-eels", + "core-eels_async", + "ens-eels", + "integration-ethtester-eels" + ] + - geth: + matrix: + parameters: + python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + tox_env: [ + "integration-goethereum-ipc", + "integration-goethereum-ipc_async", + "integration-goethereum-http", + "integration-goethereum-http_async", + "integration-goethereum-legacy_ws", + "integration-goethereum-ws", + "integration-ethtester-pyevm" + ] + - docs: + matrix: + parameters: + python_version: ["3.9"] + - windows-wheel: + matrix: + parameters: + python_version: ["3.10", "3.11", "3.12"] + + nightly: triggers: - schedule: - # Weekdays 12:00p UTC cron: "0 12 * * 1,2,3,4,5" filters: branches: only: - v6 - main - jobs: *all_jobs + jobs: + - common: + matrix: + parameters: + python_version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] + tox_env: [ + "lint", + "core-pyevm", + "core-pyevm_async", + "ens-pyevm", + "ensip15", + "integration-ethtester-pyevm", + "wheel" + ] + - common: + matrix: + parameters: + # eels only supports 3.10 and above + python_version: [ "3.10", "3.11", "3.12" ] + tox_env: [ + "core-eels", + "core-eels_async", + "ens-eels", + "integration-ethtester-eels" + ] + - common-pypy: + matrix: + parameters: + # CircleCI currently only supports 3.10 for pypy + python_version: [ "3.10" ] + tox_env: [ + "core-eels", + "core-eels_async", + "ens-eels", + "integration-ethtester-eels" + ] + - geth: + matrix: + parameters: + python_version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] + tox_env: [ + "integration-goethereum-ipc", + "integration-goethereum-ipc_async", + "integration-goethereum-http", + "integration-goethereum-http_async", + "integration-goethereum-legacy_ws", + "integration-goethereum-ws", + "integration-ethtester-pyevm" + ] + - docs: + matrix: + parameters: + python_version: [ "3.9" ] + - windows-wheel: + matrix: + parameters: + python_version: [ "3.10", "3.11", "3.12" ]