-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add shellcheck to CI and a progress bar for sed
'ing in genbindings.sh
#127
base: main
Are you sure you want to change the base?
Conversation
aa0536e
to
ac0c537
Compare
ac0c537
to
4188e53
Compare
./a.out | ||
fi | ||
fi | ||
# And run the C++ demo app |
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.
The indentation here is wrong now, we're still in a top-level if.
EXTRA_TARGETS=( $LDK_C_BINDINGS_EXTRA_TARGETS ) | ||
EXTRA_CCS=( $LDK_C_BINDINGS_EXTRA_TARGET_CCS ) | ||
EXTRA_LINK_LTO=( $LDK_C_BINDINGS_EXTRA_TARGET_LINK_LTO ) | ||
EXTRA_TARGETS=( "$LDK_C_BINDINGS_EXTRA_TARGETS" ) |
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.
No, this breaks the array expansion.
fi | ||
# Finally, sanity-check the generated C and C++ bindings with demo apps: | ||
# Naively run the C demo app: | ||
gcc "$LOCAL_CFLAGS" -Wall -g -pthread demo.c target/debug/libldk.a -ldl -lm |
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.
No, we want the arguments to expand, quoting restricts them to a single argument.
As running the C++
sed
step is insanely slow, we print a simple progress bar to allow checking if progress is made.We also run shellcheck on
genbindings.sh
and enforce it in CI.