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

Adds Linux ARM64 builds #232

Merged
merged 12 commits into from
Feb 2, 2022
50 changes: 48 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
- run:
name: Run deposit script on Windows"
command: python ./test_deposit_script.py
build-linux:
build-linux-amd64:
machine:
image: ubuntu-1604:202007-01
working_directory: ~/repo
Expand Down Expand Up @@ -147,6 +147,51 @@ jobs:
sha256sum ${BUILD_FILE_NAME}.tar.gz | head -c 64 > /tmp/artifacts/${BUILD_FILE_NAME}.sha256
- store_artifacts:
path: /tmp/artifacts
build-linux-arm64:
machine:
image: ubuntu-2004:202101-01
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 3.7.5;
pyenv global 3.7.5;
pip install -r ./build_configs/linux/requirements.txt;
- run:
name: Build with build.spec
command: |
export PYTHONHASHSEED=42
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.7.5;
pyinstaller --distpath ./${BUILD_FILE_NAME} ./build_configs/linux/build.spec;
- run:
name: Test executable binaries
command: |
export PYTHONHASHSEED=42
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-linux-arm64;
export TEST_FOLDER_NAME=TMP_TEST_FOLDER
mkdir ${TEST_FOLDER_NAME}
cp -r ${BUILD_FILE_NAME} ${TEST_FOLDER_NAME}
cp test_binary_script.py ${TEST_FOLDER_NAME}
cd ${TEST_FOLDER_NAME}
python test_binary_script.py ./${BUILD_FILE_NAME};
- run:
name: Compress the file
command: |
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-linux-arm64;
tar -zcvf ${BUILD_FILE_NAME}.tar.gz ./${BUILD_FILE_NAME};
mkdir /tmp/artifacts;
cp ${BUILD_FILE_NAME}.tar.gz /tmp/artifacts;
sha256sum ${BUILD_FILE_NAME}.tar.gz | head -c 64 > /tmp/artifacts/${BUILD_FILE_NAME}.sha256
- store_artifacts:
path: /tmp/artifacts
build-windows:
executor:
name: win/default
Expand Down Expand Up @@ -254,7 +299,8 @@ workflows:
- win-py37-script
build_linux:
jobs:
- build-linux
- build-linux-amd64
- build-linux-arm64
build_windows:
jobs:
- build-windows
Expand Down
2 changes: 1 addition & 1 deletion build_configs/linux/build.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ a = Analysis(['../../staking_deposit/deposit.py'],
binaries=[],
datas=[
('../../staking_deposit/key_handling/key_derivation/word_lists/*.txt', './staking_deposit/key_handling/key_derivation/word_lists/'),
('../../staking_deposit/intl', './staking_deposit/intl',)
('../../staking_deposit/intl', './staking_deposit/intl'),
],
hiddenimports=[],
hookspath=[],
Expand Down