From 482c48867f6e5e6eba2d884c009a5b0ad29c38fd Mon Sep 17 00:00:00 2001 From: "Ya-wen, Jeng" Date: Thu, 1 Feb 2024 14:15:01 +0800 Subject: [PATCH 1/2] 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 From c5192a15df01b16682ee89015bfeeef2baad8fd1 Mon Sep 17 00:00:00 2001 From: "Ya-wen, Jeng" Date: Thu, 1 Feb 2024 18:02:32 +0800 Subject: [PATCH 2/2] fix: fix ci config toml --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 61ef08fe..11912928 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -32,7 +32,7 @@ jobs: - name: Prepare CI for iOS run: ./scripts/prepare_ci.sh - name: Build for iOS - run: ./scripts/build_ios.sh config-example.toml + run: ./scripts/build_ios.sh config-ci.toml - name: Run iOS tests run: | cd mopro-ios/MoproKit/Example