Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Update python & OS versions" #405

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 43 additions & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ tox_common: &tox_common
key: tox-deps4-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_test.txt" }}-{{ checksum "setup.py" }}-{{ checksum "Makefile" }}

orbs:
win: circleci/windows@5.0 # The Windows orb give you everything you need to start using the Windows executor.
win: circleci/windows@2.2.0 # The Windows orb give you everything you need to start using the Windows executor.

jobs:
# Job(s) with Linux OS
venv_build:
docker:
- image: cimg/python:3.12
- image: cimg/python:3.10
working_directory: ~/repo
steps:
- checkout
Expand All @@ -40,7 +40,7 @@ jobs:
- ./venv
venv_pytest:
docker:
- image: cimg/python:3.12
- image: cimg/python:3.10
working_directory: ~/repo
steps:
- checkout
Expand All @@ -56,7 +56,7 @@ jobs:
path: test-reports/
venv_lint:
docker:
- image: cimg/python:3.12
- image: cimg/python:3.10
working_directory: ~/repo
steps:
- checkout
Expand All @@ -65,25 +65,40 @@ jobs:
- run:
name: Run linter with venv
command: make venv_lint
tox-py312-core:
tox-py310-core:
<<: *tox_common
docker:
- image: cimg/python:3.12
- image: cimg/python:3.10
environment:
TOXENV: py312-core
tox-py312-script:
TOXENV: py310-core
tox-py38-core:
<<: *tox_common
docker:
- image: cimg/python:3.12
- image: cimg/python:3.8
environment:
TOXENV: py312-script
TOXENV: py38-core
tox-py310-script:
<<: *tox_common
docker:
- image: cimg/python:3.10
environment:
TOXENV: py310-script
tox-py38-script:
<<: *tox_common
docker:
- image: cimg/python:3.8
environment:
TOXENV: py38-script
# Job(s) with Windows OS
win-py312-script:
win-py310-script:
executor:
name: win/default
shell: powershell.exe
steps:
- checkout
- run:
name: "Install Python"
command: choco install python --version=3.10.3
- run:
name: Install testing requirements on Windows
command: python -m pip install -r requirements_test.txt
Expand All @@ -95,15 +110,15 @@ jobs:
command: python ./test_btec_script.py
build-linux-amd64:
machine:
image: ubuntu-2204:2024.04.4
image: ubuntu-2004:202201-02
working_directory: ~/repo
steps:
- checkout
- run:
name: Install building requirements on Linux
command: |
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install -f 3.12.1;
pyenv global 3.12.1;
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install -f 3.10.2;
pyenv global 3.10.2;
pip install -r ./build_configs/linux/requirements.txt;
- run:
name: Build with build.spec
Expand All @@ -112,7 +127,7 @@ jobs:
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-linux-amd64;
mkdir ${BUILD_FILE_NAME};
pyenv global 3.12.1;
pyenv global 3.10.2;
pyinstaller --distpath ./${BUILD_FILE_NAME} ./build_configs/linux/build.spec;
- run:
name: Test executable binaries
Expand Down Expand Up @@ -142,16 +157,16 @@ jobs:
path: /tmp/artifacts
build-linux-arm64:
machine:
image: ubuntu-2204:2024.04.4
image: ubuntu-2004:202201-02
resource_class: arm.medium
working_directory: ~/repo
steps:
- checkout
- run:
name: Install building requirements on Linux ARM64
command: |
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install -f 3.12.1;
pyenv global 3.12.1;
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install -f 3.10.2;
pyenv global 3.10.2;
pip install -r ./build_configs/linux/requirements.txt;
- run:
name: Build with build.spec
Expand All @@ -160,7 +175,7 @@ jobs:
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-linux-arm64;
mkdir ${BUILD_FILE_NAME};
pyenv global 3.12.1;
pyenv global 3.10.2;
pyinstaller --distpath ./${BUILD_FILE_NAME} ./build_configs/linux/build.spec;
- run:
name: Test executable binaries
Expand Down Expand Up @@ -193,6 +208,9 @@ jobs:
shell: powershell.exe
steps:
- checkout
- run:
name: "Install Python"
command: choco install python --version=3.10.3
- run:
name: Install building requirements on Windows
command: pip install -r ./build_configs/windows/requirements.txt
Expand Down Expand Up @@ -236,7 +254,7 @@ jobs:
path: /tmp/artifacts
build-macos:
macos:
xcode: 15.3.0
xcode: 13.4.1
working_directory: ~/repo
steps:
- run: xcodebuild -version
Expand Down Expand Up @@ -291,9 +309,11 @@ workflows:
- venv_lint:
requires:
- venv_build
- tox-py312-core
- tox-py312-script
- win-py312-script
- tox-py310-core
- tox-py38-core
- tox-py310-script
- tox-py38-script
- win-py310-script
build_linux:
jobs:
- build-linux-amd64
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:alpine3.19
FROM python:alpine3.14

WORKDIR /app

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VENV_NAME?=venv
VENV_ACTIVATE=. $(VENV_NAME)/bin/activate
PYTHON=${VENV_NAME}/bin/python3.12
PYTHON=${VENV_NAME}/bin/python3.8
DOCKER_IMAGE="ethereum/staking-deposit-cli:latest"

help:
Expand All @@ -24,9 +24,9 @@ clean:

$(VENV_NAME)/bin/activate: requirements.txt
@test -d $(VENV_NAME) || python3 -m venv --clear $(VENV_NAME)
${VENV_NAME}/bin/python setup.py install
${VENV_NAME}/bin/python -m pip install -r requirements.txt
${VENV_NAME}/bin/python -m pip install -r requirements_test.txt
${VENV_NAME}/bin/python setup.py install
@touch $(VENV_NAME)/bin/activate

venv_build: $(VENV_NAME)/bin/activate
Expand Down
135 changes: 67 additions & 68 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,69 +5,68 @@
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [staking-deposit-cli](#staking-deposit-cli)
- [Introduction](#introduction)
- [Tutorial for users](#tutorial-for-users)
- [Build requirements](#build-requirements)
- [For Linux or MacOS users](#for-linux-or-macos-users)
- [File Permissions](#file-permissions)
- [Option 1. Download binary executable file](#option-1-download-binary-executable-file)
- [Step 1. Installation](#step-1-installation)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json)
- [`language` Argument](#language-argument)
- [`--non_interactive` flag](#--non_interactive-flag)
- [Commands](#commands)
- [`new-mnemonic` Arguments](#new-mnemonic-arguments)
- [`existing-mnemonic` Arguments](#existing-mnemonic-arguments)
- [Successful message](#successful-message)
- [`generate-bls-to-execution-change` Arguments](#generate-bls-to-execution-change-arguments)
- [Option 2. Build `deposit-cli` with native Python](#option-2-build-deposit-cli-with-native-python)
- [Step 0. Python version checking](#step-0-python-version-checking)
- [Step 1. Installation](#step-1-installation-1)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-1)
- [Language Argument](#language-argument-1)
- [Commands](#commands-1)
- [Arguments](#arguments)
- [Successful message](#successful-message-1)
- [Option 3. Build `deposit-cli` with `virtualenv`](#option-3-build-deposit-cli-with-virtualenv)
- [Step 0. Python version checking](#step-0-python-version-checking-1)
- [Step 1. Installation](#step-1-installation-2)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-2)
- [Language Argument](#language-argument-2)
- [Commands](#commands-2)
- [Arguments](#arguments-1)
- [Option 4. Use Docker image](#option-4-use-docker-image)
- [Step 1. Build the docker image](#step-1-build-the-docker-image)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-3)
- [Arguments](#arguments-2)
- [Successful message](#successful-message-2)
- [For Windows users](#for-windows-users)
- [Option 1. Download binary executable file](#option-1-download-binary-executable-file-1)
- [Step 1. Installation](#step-1-installation-3)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-4)
- [Language Argument](#language-argument-3)
- [Commands](#commands-3)
- [Arguments](#arguments-3)
- [Option 2. Build `deposit-cli` with native Python](#option-2-build-deposit-cli-with-native-python-1)
- [Step 0. Python version checking](#step-0-python-version-checking-2)
- [Step 1. Installation](#step-1-installation-4)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-5)
- [Language Argument](#language-argument-4)
- [Commands](#commands-4)
- [Arguments](#arguments-4)
- [Option 3. Build `deposit-cli` with `virtualenv`](#option-3-build-deposit-cli-with-virtualenv-1)
- [Step 0. Python version checking](#step-0-python-version-checking-3)
- [Step 1. Installation](#step-1-installation-5)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-6)
- [Language Argument](#language-argument-5)
- [Commands](#commands-5)
- [Arguments](#arguments-5)
- [Development](#development)
- [Install basic requirements](#install-basic-requirements)
- [Install testing requirements](#install-testing-requirements)
- [Run tests](#run-tests)
- [Building Binaries](#building-binaries)
- [Mac M1 Binaries](#mac-m1-binaries)
- [Introduction](#introduction)
- [Tutorial for users](#tutorial-for-users)
- [Build requirements](#build-requirements)
- [For Linux or MacOS users](#for-linux-or-macos-users)
- [File Permissions](#file-permissions)
- [Option 1. Download binary executable file](#option-1-download-binary-executable-file)
- [Step 1. Installation](#step-1-installation)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json)
- [`language` Argument](#language-argument)
- [`--non_interactive` flag](#--non_interactive-flag)
- [Commands](#commands)
- [`new-mnemonic` Arguments](#new-mnemonic-arguments)
- [`existing-mnemonic` Arguments](#existing-mnemonic-arguments)
- [Successful message](#successful-message)
- [`generate-bls-to-execution-change` Arguments](#generate-bls-to-execution-change-arguments)
- [Option 2. Build `deposit-cli` with native Python](#option-2-build-deposit-cli-with-native-python)
- [Step 0. Python version checking](#step-0-python-version-checking)
- [Step 1. Installation](#step-1-installation-1)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-1)
- [Language Argument](#language-argument)
- [Commands](#commands-1)
- [Arguments](#arguments)
- [Successful message](#successful-message-1)
- [Option 3. Build `deposit-cli` with `virtualenv`](#option-3-build-deposit-cli-with-virtualenv)
- [Step 0. Python version checking](#step-0-python-version-checking-1)
- [Step 1. Installation](#step-1-installation-2)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-2)
- [Language Argument](#language-argument-1)
- [Commands](#commands-2)
- [Arguments](#arguments-1)
- [Option 4. Use Docker image](#option-4-use-docker-image)
- [Step 1. Build the docker image](#step-1-build-the-docker-image)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-3)
- [Arguments](#arguments-2)
- [Successful message](#successful-message-2)
- [For Windows users](#for-windows-users)
- [Option 1. Download binary executable file](#option-1-download-binary-executable-file-1)
- [Step 1. Installation](#step-1-installation-3)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-4)
- [Language Argument](#language-argument-2)
- [Commands](#commands-3)
- [Arguments](#arguments-3)
- [Option 2. Build `deposit-cli` with native Python](#option-2-build-deposit-cli-with-native-python-1)
- [Step 0. Python version checking](#step-0-python-version-checking-2)
- [Step 1. Installation](#step-1-installation-4)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-5)
- [Language Argument](#language-argument-3)
- [Commands](#commands-4)
- [Arguments](#arguments-4)
- [Option 3. Build `deposit-cli` with `virtualenv`](#option-3-build-deposit-cli-with-virtualenv-1)
- [Step 0. Python version checking](#step-0-python-version-checking-3)
- [Step 1. Installation](#step-1-installation-5)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-6)
- [Language Argument](#language-argument-4)
- [Commands](#commands-5)
- [Arguments](#arguments-5)
- [Development](#development)
- [Install basic requirements](#install-basic-requirements)
- [Install testing requirements](#install-testing-requirements)
- [Run tests](#run-tests)
- [Building Binaries](#building-binaries)
- [Mac M1 Binaries](#mac-m1-binaries)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Expand All @@ -86,7 +85,7 @@ You can find the audit report by Trail of Bits [here](https://github.com/trailof

### Build requirements

- [Python **3.12+**](https://www.python.org/about/gettingstarted/)
- [Python **3.8+**](https://www.python.org/about/gettingstarted/)
- [pip3](https://pip.pypa.io/en/stable/installing/)

### For Linux or MacOS users
Expand Down Expand Up @@ -199,7 +198,7 @@ You can use `bls-to-execution-change --help` to see all arguments. Note that if

##### Step 0. Python version checking

Ensure you are using Python version >= Python3.12:
Ensure you are using Python version >= Python3.8:

```sh
python3 -V
Expand Down Expand Up @@ -264,7 +263,7 @@ See [here](#successful-message)

##### Step 0. Python version checking

Ensure you are using Python version >= Python3.12:
Ensure you are using Python version >= Python3.8:

```sh
python3 -V
Expand Down Expand Up @@ -413,7 +412,7 @@ See [here](#generate-bls-to-execution-change-arguments) for `generate-bls-to-exe

##### Step 0. Python version checking

Ensure you are using Python version >= Python12 (Assume that you've installed Python 3 as the main Python):
Ensure you are using Python version >= Python3.8 (Assume that you've installed Python 3 as the main Python):

```sh
python -V
Expand Down Expand Up @@ -476,7 +475,7 @@ See [here](#generate-bls-to-execution-change-arguments) for `generate-bls-to-exe

##### Step 0. Python version checking

Ensure you are using Python version >= Python3.12 (Assume that you've installed Python 3 as the main Python):
Ensure you are using Python version >= Python3.8 (Assume that you've installed Python 3 as the main Python):

```cmd
python -V
Expand Down
Loading