@@ -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
0 commit comments