Skip to content

Commit

Permalink
Build macOS binaries for testing in powersync (#12)
Browse files Browse the repository at this point in the history
* Build macOS binaries for testing in powersync

* Fix file names
  • Loading branch information
mugikhan authored Jul 12, 2024
1 parent 955e93f commit 525f6d9
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,24 @@ jobs:
file: powersync_x64.dll
asset_name: powersync_x64.dll
tag: ${{ needs.draft_release.outputs.tag }}

publish_macOS:
name: Publish macOS
needs: [draft_release]
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Build binary
run: bash tool/build_macos.sh aarch64

- name: Upload binary aarch64
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
overwrite: true
file: libpowersync_aarch64.dylib
asset_name: libpowersync_aarch64.dylib
tag: ${{ needs.draft_release.outputs.tag }}
10 changes: 10 additions & 0 deletions tool/build_macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
if [ "$1" = "x64" ]; then
#Note: x86_64-apple-darwin has not been tested.
rustup target add target x86_64-apple-darwin
cargo build -p powersync_loadable --release
mv "target/release/libpowersync.dylib" "libpowersync_x64.dylib"
else
rustup target add aarch64-apple-darwin
cargo build -p powersync_loadable --release
mv "target/release/libpowersync.dylib" "libpowersync_aarch64.dylib"
fi

0 comments on commit 525f6d9

Please sign in to comment.