Skip to content

Build macOS binaries for testing in powersync #12

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

Merged
merged 2 commits into from
Jul 12, 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
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
Loading