Skip to content

Commit e2a7c94

Browse files
authored
Merge pull request #206 from ethereum/dev
Internationalisation release
2 parents 256ea21 + 8657a1b commit e2a7c94

File tree

144 files changed

+2892
-662
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+2892
-662
lines changed

.circleci/config.yml

Lines changed: 94 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
- run:
103103
name: Run deposit script on Windows"
104104
command: python ./test_deposit_script.py
105-
build-linux:
105+
build-linux-amd64:
106106
machine:
107107
image: ubuntu-1604:202007-01
108108
working_directory: ~/repo
@@ -119,15 +119,73 @@ jobs:
119119
command: |
120120
export PYTHONHASHSEED=42
121121
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
122-
export BUILD_FILE_NAME=eth2deposit-cli-${CIRCLE_SHORT_SHA1}-linux-amd64;
122+
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-linux-amd64;
123123
mkdir ${BUILD_FILE_NAME};
124124
pyenv global 3.7.5;
125125
pyinstaller --distpath ./${BUILD_FILE_NAME} ./build_configs/linux/build.spec;
126+
- run:
127+
name: Test executable binaries
128+
command: |
129+
export PYTHONHASHSEED=42
130+
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
131+
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-linux-amd64;
132+
export TEST_FOLDER_NAME=TMP_TEST_FOLDER
133+
mkdir ${TEST_FOLDER_NAME}
134+
cp -r ${BUILD_FILE_NAME} ${TEST_FOLDER_NAME}
135+
cp test_binary_script.py ${TEST_FOLDER_NAME}
136+
cd ${TEST_FOLDER_NAME}
137+
python test_binary_script.py ./${BUILD_FILE_NAME};
138+
- run:
139+
name: Compress the file
140+
command: |
141+
export PYTHONHASHSEED=42
142+
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
143+
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-linux-amd64;
144+
tar -zcvf ${BUILD_FILE_NAME}.tar.gz ./${BUILD_FILE_NAME};
145+
mkdir /tmp/artifacts;
146+
cp ${BUILD_FILE_NAME}.tar.gz /tmp/artifacts;
147+
sha256sum ${BUILD_FILE_NAME}.tar.gz | head -c 64 > /tmp/artifacts/${BUILD_FILE_NAME}.sha256
148+
- store_artifacts:
149+
path: /tmp/artifacts
150+
build-linux-arm64:
151+
machine:
152+
image: ubuntu-2004:202101-01
153+
resource_class: arm.medium
154+
working_directory: ~/repo
155+
steps:
156+
- checkout
157+
- run:
158+
name: Install building requirements on Linux ARM64
159+
command: |
160+
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.7.5;
161+
pyenv global 3.7.5;
162+
pip install -r ./build_configs/linux/requirements.txt;
163+
- run:
164+
name: Build with build.spec
165+
command: |
166+
export PYTHONHASHSEED=42
167+
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
168+
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-linux-arm64;
169+
mkdir ${BUILD_FILE_NAME};
170+
pyenv global 3.7.5;
171+
pyinstaller --distpath ./${BUILD_FILE_NAME} ./build_configs/linux/build.spec;
172+
- run:
173+
name: Test executable binaries
174+
command: |
175+
export PYTHONHASHSEED=42
176+
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
177+
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-linux-arm64;
178+
export TEST_FOLDER_NAME=TMP_TEST_FOLDER
179+
mkdir ${TEST_FOLDER_NAME}
180+
cp -r ${BUILD_FILE_NAME} ${TEST_FOLDER_NAME}
181+
cp test_binary_script.py ${TEST_FOLDER_NAME}
182+
cd ${TEST_FOLDER_NAME}
183+
python test_binary_script.py ./${BUILD_FILE_NAME};
126184
- run:
127185
name: Compress the file
128186
command: |
129187
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
130-
export BUILD_FILE_NAME=eth2deposit-cli-${CIRCLE_SHORT_SHA1}-linux-amd64;
188+
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-linux-arm64;
131189
tar -zcvf ${BUILD_FILE_NAME}.tar.gz ./${BUILD_FILE_NAME};
132190
mkdir /tmp/artifacts;
133191
cp ${BUILD_FILE_NAME}.tar.gz /tmp/artifacts;
@@ -148,15 +206,28 @@ jobs:
148206
command: |
149207
$PYTHONHASHSEED = 42
150208
$CIRCLE_SHORT_SHA1 = $env:CIRCLE_SHA1.substring(0,7)
151-
$BUILD_FILE_NAME = "eth2deposit-cli-" + $CIRCLE_SHORT_SHA1 + "-windows-amd64"
209+
$BUILD_FILE_NAME = "staking_deposit-cli-" + $CIRCLE_SHORT_SHA1 + "-windows-amd64"
152210
mkdir $BUILD_FILE_NAME
153211
$BUILD_FILE_NAME_PATH = ".\" + $BUILD_FILE_NAME
154212
pyinstaller --distpath $BUILD_FILE_NAME_PATH .\build_configs\windows\build.spec
213+
- run:
214+
name: Test executable binaries
215+
command: |
216+
$PYTHONHASHSEED = 42
217+
$CIRCLE_SHORT_SHA1 = $env:CIRCLE_SHA1.substring(0,7)
218+
$BUILD_FILE_NAME = "staking_deposit-cli-" + $CIRCLE_SHORT_SHA1 + "-windows-amd64"
219+
$TEST_FOLDER_NAME = "TMP_TEST_FOLDER"
220+
mkdir ${TEST_FOLDER_NAME}
221+
Copy-item ${BUILD_FILE_NAME} -destination ${TEST_FOLDER_NAME} -recurse
222+
copy test_binary_script.py ${TEST_FOLDER_NAME}
223+
cd ${TEST_FOLDER_NAME}
224+
python test_binary_script.py ${BUILD_FILE_NAME}
155225
- run:
156226
name: Compress the file
157227
command: |
228+
$PYTHONHASHSEED = 42
158229
$CIRCLE_SHORT_SHA1 = $env:CIRCLE_SHA1.substring(0,7)
159-
$BUILD_FILE_NAME = "eth2deposit-cli-" + $CIRCLE_SHORT_SHA1 + "-windows-amd64"
230+
$BUILD_FILE_NAME = "staking_deposit-cli-" + $CIRCLE_SHORT_SHA1 + "-windows-amd64"
160231
$BUILD_FILE_NAME_PATH = ".\" + $BUILD_FILE_NAME
161232
$ZIP_FILE_NAME = $BUILD_FILE_NAME + ".zip"
162233
Compress-Archive -Path $BUILD_FILE_NAME_PATH -DestinationPath $ZIP_FILE_NAME
@@ -168,7 +239,7 @@ jobs:
168239
path: /tmp/artifacts
169240
build-macos:
170241
macos:
171-
xcode: 11.3.0
242+
xcode: 12.4.0
172243
working_directory: ~/repo
173244
steps:
174245
- run: xcodebuild -version
@@ -182,14 +253,27 @@ jobs:
182253
command: |
183254
export PYTHONHASHSEED=42
184255
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
185-
export BUILD_FILE_NAME=eth2deposit-cli-${CIRCLE_SHORT_SHA1}-darwin-amd64;
256+
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-darwin-amd64;
186257
mkdir ${BUILD_FILE_NAME};
187258
pyinstaller --distpath ./${BUILD_FILE_NAME} ./build_configs/macos/build.spec;
259+
- run:
260+
name: Test executable binaries
261+
command: |
262+
export PYTHONHASHSEED=42
263+
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
264+
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-darwin-amd64;
265+
export TEST_FOLDER_NAME=TMP_TEST_FOLDER
266+
mkdir ${TEST_FOLDER_NAME}
267+
cp -r ${BUILD_FILE_NAME} ${TEST_FOLDER_NAME}
268+
cp test_binary_script.py ${TEST_FOLDER_NAME}
269+
cd ${TEST_FOLDER_NAME}
270+
python3 test_binary_script.py ./${BUILD_FILE_NAME};
188271
- run:
189272
name: Compress the file
190273
command: |
274+
export PYTHONHASHSEED=42
191275
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
192-
export BUILD_FILE_NAME=eth2deposit-cli-${CIRCLE_SHORT_SHA1}-darwin-amd64;
276+
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-darwin-amd64;
193277
tar -zcvf ${BUILD_FILE_NAME}.tar.gz ./${BUILD_FILE_NAME};
194278
mkdir /tmp/artifacts;
195279
cp ${BUILD_FILE_NAME}.tar.gz /tmp/artifacts;
@@ -215,7 +299,8 @@ workflows:
215299
- win-py37-script
216300
build_linux:
217301
jobs:
218-
- build-linux
302+
- build-linux-amd64
303+
- build-linux-arm64
219304
build_windows:
220305
jobs:
221306
- build-windows

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ WORKDIR /app
44

55
COPY requirements.txt setup.py ./
66

7-
COPY eth2deposit ./eth2deposit
7+
COPY staking_deposit ./staking_deposit
88

99
RUN apk add --update gcc libc-dev linux-headers
1010

@@ -14,6 +14,6 @@ RUN python3 setup.py install
1414

1515
ARG cli_command
1616

17-
ENTRYPOINT [ "python3", "./eth2deposit/deposit.py" ]
17+
ENTRYPOINT [ "python3", "./staking_deposit/deposit.py" ]
1818

1919
CMD [ $cli_command ]

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
VENV_NAME?=venv
22
VENV_ACTIVATE=. $(VENV_NAME)/bin/activate
33
PYTHON=${VENV_NAME}/bin/python3.8
4-
DOCKER_IMAGE="ethereum/eth2.0-deposit-cli:latest"
4+
DOCKER_IMAGE="ethereum/staking-deposit-cli:latest"
55

66
help:
77
@echo "clean - remove build and Python file artifacts"
@@ -35,13 +35,13 @@ venv_build_test: venv_build
3535
${VENV_NAME}/bin/python -m pip install -r requirements_test.txt
3636

3737
venv_test: venv_build_test
38-
$(VENV_ACTIVATE) && python -m pytest .
38+
$(VENV_ACTIVATE) && python -m pytest ./tests
3939

4040
venv_lint: venv_build_test
41-
$(VENV_ACTIVATE) && flake8 --config=flake8.ini ./eth2deposit ./tests && mypy --config-file mypy.ini -p eth2deposit
41+
$(VENV_ACTIVATE) && flake8 --config=flake8.ini ./staking_deposit ./tests && mypy --config-file mypy.ini -p staking_deposit
4242

4343
venv_deposit: venv_build
44-
$(VENV_ACTIVATE) && python ./eth2deposit/deposit.py $(filter-out $@,$(MAKECMDGOALS))
44+
$(VENV_ACTIVATE) && python ./staking_deposit/deposit.py $(filter-out $@,$(MAKECMDGOALS))
4545

4646
build_macos: venv_build
4747
${VENV_NAME}/bin/python -m pip install -r ./build_configs/macos/requirements.txt

0 commit comments

Comments
 (0)