-
Notifications
You must be signed in to change notification settings - Fork 47
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
feat(rln-relay): fetch release from zerokit ci, or build #1603
Conversation
build_rln.sh
Outdated
@@ -0,0 +1,31 @@ | |||
#!/usr/bin/env bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jm-clius, thoughts on where this script should go?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmm. Good question. Since there are no obvious alternatives, I think the root folder is the best option for now, since this is where other build and environment scripts are.
build_rln.sh
Outdated
host_triplet=$(rustup show | grep "Default host: " | cut -d' ' -f3) | ||
|
||
# Download the prebuilt rln library if it is available | ||
if wget https://github.com/vacp2p/zerokit/releases/download/nightly/$host_triplet-rln.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if wget https://github.com/vacp2p/zerokit/releases/download/nightly/$host_triplet-rln.tar.gz | |
if wget https://github.com/vacp2p/zerokit/releases/download/v0.2/$host_triplet-rln.tar.gz |
note: we will use a static version some time in the future, keeping nightly in for now will allow us to detect breaking changes faster
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I'm still not sure how we should prevent cluttering in build resources and scripts, but I agree that this is better than building everytime.
One worry about using nightly
is that it may cause CI builds to become indeterminate?
Yes you're right about experimental ci becoming indeterminate, however, using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ✅
@jakubgs, should I add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should have a scripts
folder for build_rln.sh
?
Leaving stuff at repo root unless absolutely necessary should be avoided.
And yes, we can add wget
to shell.nix
, though honestly I'd prefer curl
, as it's more extendable and has more option, like the combination of --silent --fail-with-body
.
This PR introduces a script,
build_rln.sh
that extracts the host triple, checks if a zerokit release asset exists for it, and if not, builds zerokit from scratch.Zerokit supports 6 target architectures at the moment, and it is possible that some users will need to build it manually when compiling nwaku with experimental features enabled. I propose that we continue to use zerokit as a submodule for this reason.