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

Fix fetch_bladebit_harvester.sh #375

Merged
merged 2 commits into from
Jul 19, 2023
Merged
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
29 changes: 21 additions & 8 deletions .github/actions/fetch_bladebit_harvester.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,36 @@ fi
## Change this before releasing 2.0.0
artifact_ver="v3.0.0-alpha4"
artifact_base_url="https://github.com/harold-b/bladebit-test/releases/download/v3-alpha4-fixes"
## End changes

linux_sha256=
macos_sha256=
windows_sha256=
linux_arm_sha256="d6f4fc6014a0faa4a5735980a4c12753e205e6429a9d92ea1d32831e475df357"
linux_x86_sha256="98c0efb464935455595d7a573027613c46a7921a95d3f9216b27814f84a1ac31"
macos_arm_sha256="713849aa5d01df9ccfcec259920d86a4ddec83cc3bbc30860852dcf9ac793978"
macos_x86_sha256="67885e4f95b11a115f37138309cc9fd92785229f76adefe6d23e15c45625c92f"
windows_sha256="2a951daa19c65574808537007b874a29d9001bc4387c162633646b0f546676ca"
## End changes

artifact_ext="tar.gz"
sha_bin="sha256sum"
expected_sha256=

if [[ "$OSTYPE" == "darwin"* ]]; then
sha_bin="shasum -a 256"
fi

case "${host_os}" in
linux)
expected_sha256=$linux_sha256
if [[ "${host_arch}" == "arm64" ]]; then
expected_sha256=$linux_arm_sha256
else
expected_sha256=$linux_x86_sha256
fi
;;
macos)
expected_sha256=$macos_sha256
sha_bin="shasum -a 256"
if [[ "${host_arch}" == "arm64" ]]; then
expected_sha256=$macos_arm_sha256
else
expected_sha256=$macos_x86_sha256
fi
;;
windows)
expected_sha256=$windows_sha256
Expand All @@ -58,7 +71,7 @@ curl -L "${artifact_base_url}/green_reaper-${artifact_ver}-${host_os}-${host_arc

# Validate sha256, if one was given
if [ -n "${expected_sha256}" ]; then
gr_sha256="$(${sha_bin} ${artifact_name})"
gr_sha256="$(${sha_bin} ${artifact_name} | cut -d' ' -f1)"

if [[ "${gr_sha256}" != "${expected_sha256}" ]]; then
echo >&2 "GreenReaper SHA256 mismatch!"
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ jobs:
run: |
set -eo pipefail
set -x
windows_sha256='febea2317b7e858e296a30344a5382161cebc1a66678975151b117f17cda5181'
.github/actions/fetch_bladebit_harvester.sh windows x86-64

- name: Build and test
Expand All @@ -155,10 +154,8 @@ jobs:
set -eo pipefail
ARCH=$(uname -m)
if [[ $ARCH == x86_64 ]]; then
linux_sha256='ef3f8f74b9c63166a735eb1f2cb855e88b36f50ad52c9d51cf32eb3e9e25428e'
.github/actions/fetch_bladebit_harvester.sh linux x86-64
else
linux_sha256='fcc8bf849733781c82c0b13b70bbba57aaf82abc9a0e2aee7b1ba3da6b0e58f2'
.github/actions/fetch_bladebit_harvester.sh linux arm64
fi

Expand All @@ -171,10 +168,8 @@ jobs:
set -eo pipefail
ARCH=$(uname -m)
if [[ $ARCH == x86_64 ]]; then
macos_sha256='199720c9dff72e883edbd027c31cc03ed9f901e6a00e2be5a7e8ac2633ecb69c'
.github/actions/fetch_bladebit_harvester.sh macos x86-64
else
macos_sha256='932d73c6a70df59bbe7baf3702cc74cc8eb483f5e6a94551b3089779b1e7b010'
.github/actions/fetch_bladebit_harvester.sh macos arm64
fi

Expand Down