Fix shared lib lookups.

This commit is contained in:
Roman Dmitrienko 2024-04-30 23:32:34 +02:00
parent 872e6fc457
commit b986aecb5f
2 changed files with 4 additions and 4 deletions

View file

@ -46,8 +46,8 @@ jobs:
- name: Find and copy shared libraries
run: |
mkdir lib
find `go env GOMODCACHE` -name 'libglalby_bindings.so' -exec cp {} lib/ \;
find `go env GOMODCACHE` -name 'libldk_node.so' -exec cp {} lib/ \;
find `go env GOMODCACHE` -name 'libglalby_bindings.so' | grep arm-unknown-linux-gnueabihf | xargs -I {} cp {} ./lib
find `go env GOMODCACHE` -name 'libldk_node.so' | grep arm-unknown-linux-gnueabihf | xargs -I {} cp {} ./lib
- name: Strip and patch RPATH in the executable
run: |

View file

@ -36,8 +36,8 @@ COPY --from=frontend /build/frontend/dist ./frontend/dist
RUN GOARCH=$(echo "$TARGETPLATFORM" | cut -d'/' -f2) go build -o main .
RUN cp `find /go/pkg/mod/github.com/breez/ |grep linux-amd64 |grep libbreez_sdk_bindings.so` ./
RUN cp `find /go/pkg/mod/github.com/get\!alby/ | grep libglalby_bindings.so` ./
RUN cp `find /go/pkg/mod/github.com/get\!alby/ | grep libldk_node.so` ./
RUN cp `find /go/pkg/mod/github.com/get\!alby/ | grep x86_64-unknown-linux-gnu | grep libglalby_bindings.so` ./
RUN cp `find /go/pkg/mod/github.com/get\!alby/ | grep x86_64-unknown-linux-gnu | grep libldk_node.so` ./
# Start a new, final image to reduce size.
FROM debian as final