Skip to content

Commit

Permalink
Merge pull request #34 from getAlby/build-linux-aarch64
Browse files Browse the repository at this point in the history
feat: build bindings for aarch64-unknown-linux
  • Loading branch information
rdmitr authored Jun 21, 2024
2 parents daf1ac3 + 9d30ea6 commit 27a7d2f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
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

0 comments on commit 27a7d2f

Please sign in to comment.