Skip to content
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

Fix: toml config #68

Merged
merged 2 commits into from
Feb 1, 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
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions config-ci.toml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion scripts/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this and prepare_ci line only diff?

if ! check_target_support $target; then
rustup target add $target
else
Expand Down
2 changes: 1 addition & 1 deletion scripts/prepare_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading