Skip to content

Commit e5bda06

Browse files
committed
Enable linux arm64 builds
1 parent 525f6d9 commit e5bda06

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

.github/workflows/linux.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ on:
22
push:
33
tags:
44
- "*"
5+
workflow_dispatch:
56
name: "linux"
67
jobs:
78
build_x86_64:
@@ -20,3 +21,40 @@ jobs:
2021

2122
- name: Build binaries
2223
run: bash tool/build_linux.sh x64
24+
25+
- name: Upload binary
26+
if: github.event_name == 'workflow_dispatch'
27+
uses: svenstaro/upload-release-action@v2
28+
with:
29+
repo_token: ${{ secrets.GITHUB_TOKEN }}
30+
overwrite: true
31+
file: libpowersync_x64.so
32+
asset_name: libpowersync_x64.so
33+
tag: ${{ github.ref_name }}
34+
35+
build_aarch64:
36+
name: Building Linux aarch64
37+
runs-on: ubuntu-arm64
38+
steps:
39+
- uses: actions/checkout@v3
40+
with:
41+
submodules: true
42+
43+
- name: Install Rust Nightly
44+
uses: dtolnay/rust-toolchain@stable
45+
with:
46+
toolchain: nightly-2024-05-18
47+
components: rust-src
48+
49+
- name: Build binaries
50+
run: bash tool/build_linux.sh aarch64
51+
52+
- name: Upload binary
53+
if: github.event_name == 'workflow_dispatch'
54+
uses: svenstaro/upload-release-action@v2
55+
with:
56+
repo_token: ${{ secrets.GITHUB_TOKEN }}
57+
overwrite: true
58+
file: libpowersync_aarch64.so
59+
asset_name: libpowersync_aarch64.so
60+
tag: ${{ github.ref_name }}

tool/build_linux.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ if [ "$1" = "x64" ]; then
33
cargo build -p powersync_loadable --release
44
mv "target/release/libpowersync.so" "libpowersync_x64.so"
55
else
6-
#Note: aarch64-unknown-linux-gnu has not been tested.
76
rustup target add aarch64-unknown-linux-gnu
87
cargo build -p powersync_loadable --release
98
mv "target/release/libpowersync.so" "libpowersync_aarch64.so"

0 commit comments

Comments
 (0)