Skip to content

Commit 525f6d9

Browse files
authored
Build macOS binaries for testing in powersync (#12)
* Build macOS binaries for testing in powersync * Fix file names
1 parent 955e93f commit 525f6d9

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

Diff for: .github/workflows/release.yml

+21
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,24 @@ jobs:
158158
file: powersync_x64.dll
159159
asset_name: powersync_x64.dll
160160
tag: ${{ needs.draft_release.outputs.tag }}
161+
162+
publish_macOS:
163+
name: Publish macOS
164+
needs: [draft_release]
165+
runs-on: macos-latest
166+
steps:
167+
- uses: actions/checkout@v3
168+
with:
169+
submodules: true
170+
171+
- name: Build binary
172+
run: bash tool/build_macos.sh aarch64
173+
174+
- name: Upload binary aarch64
175+
uses: svenstaro/upload-release-action@v2
176+
with:
177+
repo_token: ${{ secrets.GITHUB_TOKEN }}
178+
overwrite: true
179+
file: libpowersync_aarch64.dylib
180+
asset_name: libpowersync_aarch64.dylib
181+
tag: ${{ needs.draft_release.outputs.tag }}

Diff for: tool/build_macos.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
if [ "$1" = "x64" ]; then
2+
#Note: x86_64-apple-darwin has not been tested.
3+
rustup target add target x86_64-apple-darwin
4+
cargo build -p powersync_loadable --release
5+
mv "target/release/libpowersync.dylib" "libpowersync_x64.dylib"
6+
else
7+
rustup target add aarch64-apple-darwin
8+
cargo build -p powersync_loadable --release
9+
mv "target/release/libpowersync.dylib" "libpowersync_aarch64.dylib"
10+
fi

0 commit comments

Comments
 (0)