-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wallentx/bb harvest integration (#368)
* Cleanup commits/rebase * Testing CI * CI * CI * CI * CI * CI * CI * CI * CI * CI * CI * CI * CI * CI * CI * CI * CI * CI * CI * CI * CI * CI * CI * CI * CI * CI * CI * CI * CI * Changing to manylinux2014 * Update bladebit harvester sha256 * Remove bladebit building ref * Fixing more windows stuff * Change trigger CI branch * Some more build fixes for Windows * More cmake fixes * Updating CI for windows * CI * Fix packaging location of bladebit_harcester on linux * Reabling macos * Re-disabling macos * Remove this branch CI trigger * Re-enabling pre-release logic CI (#361) * Re-enabling pre-release logic CI * Lint fixes * Lint fixes2 --------- Co-authored-by: Harold Brenes <h.brenes@chia.net> * Fix missing decompressor queue when no compression * Update Catch2 to v3.3.2. (#346) * correct wheel matrix arch -> arm (#365) * Updating the ways bladebit harvester gets included * Remove packaging of bladebit harvester dlls into wheel. Opting for static lib instead. * Remove shutil * More logging on GRResult_OK not ok. (#366) * Copy .a instead of .so GreenReaper artifact * Fix no decompressor deallocation when it failues to pre-allocate decompression buffers. * Fix linking and building of bladebit harvester * Add action to fetch bladebit harvester * Fixing fetch_bladebit_harvester.sh on linux * Enabling all builds * Fixing macos multiline * Correct build opts for GR in win build extension * Re-add bladebit_harvester.dll copy into wheel code --------- Co-authored-by: Harold Brenes <h.brenes@chia.net> Co-authored-by: Amine Khaldi <amine.khaldi@reactos.org> Co-authored-by: Kyle Altendorf <sda@fstab.net> Co-authored-by: Chris Marslender <chrismarslender@gmail.com> Co-authored-by: Florin Chirica <fchirica96@gmail.com>
- Loading branch information
1 parent
51d6a32
commit 742d5fa
Showing
6 changed files
with
548 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#!/usr/bin/env bash | ||
set -eo pipefail | ||
_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) | ||
cd "$_dir/../.." | ||
|
||
## | ||
# Usage: fetch_bladebit_harvester.sh <linux|macos|windows> <arm64|x86-64> | ||
# | ||
# Use gitbash or similar under Windows. | ||
## | ||
host_os=$1 | ||
host_arch=$2 | ||
|
||
if [[ "${host_os}" != "linux" ]] && [[ "${host_os}" != "macos" ]] && [[ "${host_os}" != "windows" ]]; then | ||
echo >&2 "Unkonwn OS '${host_os}'" | ||
exit 1 | ||
fi | ||
|
||
if [[ "${host_arch}" != "arm64" ]] && [[ "${host_arch}" != "x86-64" ]]; then | ||
echo >&2 "Unkonwn Architecture '${host_arch}'" | ||
exit 1 | ||
fi | ||
|
||
# Update these when pointing to different releases | ||
artifact_ver="v3.0.0-alpha4" | ||
artifact_base_url="https://github.com/harold-b/bladebit-test/releases/download/v3-alpha4-fixes" | ||
|
||
linux_sha256= | ||
macos_sha256= | ||
windows_sha256= | ||
|
||
artifact_ext="tar.gz" | ||
sha_bin="sha256sum" | ||
expected_sha256= | ||
|
||
case "${host_os}" in | ||
linux) | ||
expected_sha256=$linux_sha256 | ||
;; | ||
macos) | ||
expected_sha256=$macos_sha256 | ||
sha_bin="shasum -a 256" | ||
;; | ||
windows) | ||
expected_sha256=$windows_sha256 | ||
artifact_ext="zip" | ||
;; | ||
*) | ||
echo >&2 "Unexpected OS '${host_os}'" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
# Download artifact | ||
artifact_name="green_reaper.${artifact_ext}" | ||
curl -L "${artifact_base_url}/green_reaper-${artifact_ver}-${host_os}-${host_arch}.${artifact_ext}" >"${artifact_name}" | ||
|
||
# Validate sha256, if one was given | ||
if [ -n "${expected_sha256}" ]; then | ||
gr_sha256="$(${sha_bin} ${artifact_name})" | ||
|
||
if [[ "${gr_sha256}" != "${expected_sha256}" ]]; then | ||
echo >&2 "GreenReaper SHA256 mismatch!" | ||
echo >&2 " Got : '${gr_sha256}'" | ||
echo >&2 " Expected: '${expected_sha256}'" | ||
exit 1 | ||
fi | ||
fi | ||
|
||
# Unpack artifact | ||
dst_dir="libs/green_reaper" | ||
mkdir -p "${dst_dir}" | ||
if [[ "${artifact_ext}" == "zip" ]]; then | ||
unzip -d "${dst_dir}" "${artifact_name}" | ||
else | ||
pushd "${dst_dir}" | ||
tar -xzvf "../../${artifact_name}" | ||
popd | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,7 @@ build | |
venv | ||
build-tsan | ||
build-* | ||
cmake-build* | ||
cmake-build* | ||
*.zip | ||
*.tar.gz | ||
libs/ |
Oops, something went wrong.