From 9226e3febf548f63f1a4dcad75db8912cb8fa720 Mon Sep 17 00:00:00 2001 From: "Ya-wen, Jeng" Date: Thu, 1 Feb 2024 14:15:01 +0800 Subject: [PATCH] fix: add target check, fix ci device type --- config-ci.toml | 20 ++++++++++++++++++++ scripts/prepare.sh | 2 +- scripts/prepare_ci.sh | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 config-ci.toml diff --git a/config-ci.toml b/config-ci.toml new file mode 100644 index 00000000..39bebafa --- /dev/null +++ b/config-ci.toml @@ -0,0 +1,20 @@ +# config-example.toml + +[build] +# For iOS device_type can be x86_64, simulator, device +# For Android device_type can be x86_64, arm, arm64 +device_type = "x86_64" # Options: x86_64, simulator, device, arm, arm64 + +# debug is for Rust library to be in debug mode and release for release mode +# We recommend release mode by default for performance +build_mode = "release" # Options: debug, release + +[circuit] +dir = "examples/circom/keccak256" # Directory of the circuit +name = "keccak256_256_test" # Name of the circuit + +[dylib] +# NOTE: Dylib support is experimental and requires some fiddling in iOS +# See https://github.com/oskarth/mopro/pull/37 and https://github.com/oskarth/mopro/pull/38 +use_dylib = false # Options: true, false +name = "keccak256.dylib" # Name of the dylib file, only used if use_dylib is true diff --git a/scripts/prepare.sh b/scripts/prepare.sh index 805dc557..4123d4c8 100755 --- a/scripts/prepare.sh +++ b/scripts/prepare.sh @@ -93,7 +93,7 @@ print_action "[core/circom] Generating arkzkey for rsa..." print_action "[ffi] Adding support for target architectures..." cd ${PROJECT_DIR}/mopro-ffi -for target in x86_64-apple-ios aarch64-apple-ios aarch64-apple-ios-sim; do +for target in x86_64-apple-ios aarch64-apple-ios aarch64-apple-ios-sim aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android; do if ! check_target_support $target; then rustup target add $target else diff --git a/scripts/prepare_ci.sh b/scripts/prepare_ci.sh index f21ae4f0..d0140186 100755 --- a/scripts/prepare_ci.sh +++ b/scripts/prepare_ci.sh @@ -114,7 +114,7 @@ download_files "rsa" "main" print_action "[ffi] Adding support for target architectures..." cd ${PROJECT_DIR}/mopro-ffi -for target in x86_64-apple-ios aarch64-apple-ios aarch64-apple-ios-sim; do +for target in x86_64-apple-ios aarch64-apple-ios aarch64-apple-ios-sim aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android; do if ! check_target_support $target; then rustup target add $target else