Skip to content

Commit 05d4cb8

Browse files
committed
Build iOS libraries as dylibs too
1 parent 638f0e1 commit 05d4cb8

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

.github/actions/macos/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ runs:
2323
retention-days: 14
2424
path: |
2525
*.dylib
26-
*.macos.a
26+
*.a

tool/build_macos.sh

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,27 @@ set -e
44
function compile() {
55
local triple=$1
66
local suffix=$2
7+
local os=$3
78

89
cargo build -p powersync_loadable -Z build-std=panic_abort,core,alloc --release --target $triple
910
cargo build -p powersync_static -Z build-std=panic_abort,core,alloc --release --target $triple
1011

11-
mv "target/$triple/release/libpowersync.dylib" "libpowersync_$suffix.dylib"
12-
mv "target/$triple/release/libpowersync.a" "libpowersync_$suffix.macos.a"
12+
mv "target/$triple/release/libpowersync.dylib" "libpowersync_$suffix.$os.dylib"
13+
mv "target/$triple/release/libpowersync.a" "libpowersync_$suffix.$os.a"
1314
}
1415

15-
if [ "$1" = "x64" ]; then
16-
compile x86_64-apple-darwin x64
17-
else
18-
compile aarch64-apple-darwin aarch64
19-
fi
16+
case "$1" in
17+
x64)
18+
compile x86_64-apple-darwin x64 macos
19+
compile x86_64-apple-ios x64 ios-sim
20+
;;
21+
aarch64)
22+
compile aarch64-apple-darwin aarch64 macos
23+
compile aarch64-apple-ios-sim aarch64 ios-sim
24+
compile aarch64-apple-ios aarch64 ios
25+
;;
26+
*)
27+
echo "Unknown architecture"
28+
exit 1;
29+
;;
30+
esac

0 commit comments

Comments
 (0)