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

feat: build bindings for aarch64-unknown-linux #34

Merged
merged 3 commits into from
Jun 21, 2024
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
1 change: 1 addition & 0 deletions .github/workflows/build-and-publish-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
rust_version: ${{ needs.setup.outputs.rust_version }}

publish-ldk-node-go:
if: github.ref_name == 'main' || github.head_ref == 'main'
needs:
- generate-bindings
- build-libraries
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-libraries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
matrix:
build: [
{ host: ubuntu-20.04, tool: cargo, target: x86_64-unknown-linux-gnu, output: libldk_node.so },
{ host: ubuntu-20.04, tool: cross, target: aarch64-unknown-linux-gnu, output: libldk_node.so },
{ host: ubuntu-20.04, tool: cross, target: arm-unknown-linux-gnueabihf, output: libldk_node.so },
{ host: windows-2019, tool: cargo, target: x86_64-pc-windows-msvc, output: ldk_node.dll },
{ host: macos-12, tool: cargo, target: x86_64-apple-darwin, output: libldk_node.dylib },
Expand Down
24 changes: 10 additions & 14 deletions .github/workflows/publish-bindings-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,18 @@ on:
LDK_NODE_GO_DEPLOY_KEY:
required: true

env:
LDK_BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
TARGET_BRANCH_PREFIX: "publish-"

jobs:
publish-ldk-node-go:
runs-on: ubuntu-20.04

steps:
- name: Set target branch name
run: |
if [ "${{ env.LDK_BRANCH_NAME }}" != "main" ]; then
echo "TARGET_BRANCH=${{ env.TARGET_BRANCH_PREFIX }}${{ env.LDK_BRANCH_NAME }}" >> $GITHUB_ENV
else
echo "TARGET_BRANCH=master" >> $GITHUB_ENV
fi
if: github.ref_name == 'main' || github.head_ref == 'main'

steps:
- name: Checkout ldk-node-go
uses: actions/checkout@v4
with:
repository: getAlby/ldk-node-go
ssh-key: ${{ secrets.LDK_NODE_GO_DEPLOY_KEY }}
ref: ${{ env.TARGET_BRANCH }}

- name: Download bindings
uses: actions/download-artifact@v4
Expand All @@ -42,6 +31,12 @@ jobs:
name: ldk-node-x86_64-unknown-linux-gnu
path: ldk_node/x86_64-unknown-linux-gnu

- name: Download Linux aarch64 libs
uses: actions/download-artifact@v4
with:
name: ldk-node-aarch64-unknown-linux-gnu
path: ldk_node/aarch64-unknown-linux-gnu

- name: Download Linux ARM libs
uses: actions/download-artifact@v4
with:
Expand All @@ -68,8 +63,9 @@ jobs:

git add ldk_node/ldk_node.go ldk_node/ldk_node.h ldk_node/ldk_node.c
git add ldk_node/x86_64-unknown-linux-gnu/libldk_node.so
git add ldk_node/aarch64-unknown-linux-gnu/libldk_node.so
git add ldk_node/arm-unknown-linux-gnueabihf/libldk_node.so
git add ldk_node/x86_64-pc-windows-msvc/ldk_node.dll
git add ldk_node/universal-macos/libldk_node.dylib
git commit -m "Update bindings."
git push origin ${{ env.TARGET_BRANCH }}
git push
Loading