build scripts

main
Ziyang Hu 2 years ago
parent d5dafcd8f2
commit 3dff07b6fb

@ -6,8 +6,8 @@ cd $THISDIR
export SWIFT_BRIDGE_OUT_DIR="$(pwd)/generated" export SWIFT_BRIDGE_OUT_DIR="$(pwd)/generated"
# Build the project for the desired platforms: # Build the project for the desired platforms:
cargo build -p cozo-swift -F storage-rocksdb --target x86_64-apple-darwin --release cargo build -p cozo-swift --target x86_64-apple-darwin --release
cargo build -p cozo-swift -F storage-rocksdb --target aarch64-apple-darwin --release cargo build -p cozo-swift --target aarch64-apple-darwin --release
mkdir -p ../target/universal-macos/release mkdir -p ../target/universal-macos/release
lipo \ lipo \

@ -25,11 +25,11 @@ for TARGET in x86_64-unknown-linux-gnu; do
cp target/$TARGET/release/cozoserver release/cozoserver_all-$VERSION-$TARGET # standalone cp target/$TARGET/release/cozoserver release/cozoserver_all-$VERSION-$TARGET # standalone
done done
#for TARGET in aarch64-unknown-linux-musl x86_64-unknown-linux-musl; do for TARGET in aarch64-unknown-linux-musl x86_64-unknown-linux-musl; do
# CARGO_PROFILE_RELEASE_LTO=fat cross build --release -p cozoserver -p cozo_c -F compact -F storage-rocksdb --target $TARGET CARGO_PROFILE_RELEASE_LTO=fat cross build --release -p cozoserver -F compact -F storage-rocksdb --target $TARGET
# cp target/$TARGET/release/cozoserver release/cozoserver-$VERSION-$TARGET # standalone cp target/$TARGET/release/cozoserver release/cozoserver-$VERSION-$TARGET # standalone
# cp target/$TARGET/release/libcozo_c.a release/libcozo_c-$VERSION-$TARGET.a # c static cp target/$TARGET/release/libcozo_c.a release/libcozo_c-$VERSION-$TARGET.a # c static
#done done
for TARGET in aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android; do for TARGET in aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android; do

@ -28,10 +28,11 @@ cp target/wheels/*.whl release/
# swift # swift
cargo clean cargo clean
cd cozo-lib-swift cd cozo-lib-swift
CARGO_PROFILE_RELEASE_LTO=fat ./build-rust.sh ./build-rust.sh
cd .. cd ..
# WASM # WASM
cargo clean
cd cozo-lib-wasm cd cozo-lib-wasm
CARGO_PROFILE_RELEASE_LTO=fat ./build.sh CARGO_PROFILE_RELEASE_LTO=fat ./build.sh
cd .. cd ..

Loading…
Cancel
Save