Skip to content

Commit

Permalink
add _no_check targets
Browse files Browse the repository at this point in the history
  • Loading branch information
CblPOK-git committed Apr 2, 2024
1 parent e628d89 commit fff05f6
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ jobs:
- name: Build assignment tables(.tbl) of the C++ examples
run: |
cmake --build build -t cpp_examples_generate_tbl
cmake --build build -t cpp_examples_generate_tbl_no_check
ls -al ./build/examples/cpp
- name: Copy assigner output from separate generation mode
Expand All @@ -172,7 +172,7 @@ jobs:
- name: Run simultaneous .tbl and .crct generation of the C++ examples
run: |
cmake --build build -t cpp_examples_generate_both
cmake --build build -t cpp_examples_generate_both_no_check
ls -al ./build/examples/cpp
- name: Copy assigner output from simultaneous generation mode
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
- name: Build assignment tables(.tbl) of the C++ examples
run: |
cmake --build build -t cpp_examples_generate_tbl
cmake --build build -t cpp_examples_generate_tbl_no_check
ls -al ./build/examples/cpp
- name: Run size estimation for C++ examples
Expand Down
27 changes: 27 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,20 @@ function(assign_ir)
COMMAND_EXPAND_LISTS
VERBATIM)

add_custom_target(${target}_generate_both_no_check
COMMAND $<TARGET_FILE:assigner>
-b ${binary_name}
-i ${INPUTS_DIR}/${input}
${minus_p} ${private_input_string}
-c circuit_${target}.crct
-t assignment_${target}.tbl -e ${curve_type}
--generate-type circuit-assignment
${max_num_provers_flag} ${max_num_provers_amount}
${arithmetization_flag} ${arithmetization_amount}
DEPENDS ${target} ${INPUTS_DIR}/${input} $<TARGET_FILE:assigner>
COMMAND_EXPAND_LISTS
VERBATIM)

add_custom_target(${target}_generate_tbl
COMMAND $<TARGET_FILE:assigner>
-b ${binary_name}
Expand All @@ -69,6 +83,19 @@ function(assign_ir)
COMMAND_EXPAND_LISTS
VERBATIM)

add_custom_target(${target}_generate_tbl_no_check
COMMAND $<TARGET_FILE:assigner>
-b ${binary_name}
-i ${INPUTS_DIR}/${input}
${minus_p} ${private_input_string}
-t assignment_${target}.tbl -e ${curve_type}
--generate-type assignment
${max_num_provers_flag} ${max_num_provers_amount}
${arithmetization_flag} ${arithmetization_amount}
DEPENDS ${target} ${INPUTS_DIR}/${input} $<TARGET_FILE:assigner>
COMMAND_EXPAND_LISTS
VERBATIM)

add_custom_target(${target}_estimate_size
COMMAND $<TARGET_FILE:assigner>
-b ${binary_name}
Expand Down
4 changes: 4 additions & 0 deletions examples/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
add_custom_target(compile_cpp_examples)
add_custom_target(cpp_examples_generate_tbl)
add_custom_target(cpp_examples_generate_tbl_no_check)
add_custom_target(cpp_examples_generate_crct)
add_custom_target(cpp_examples_generate_both)
add_custom_target(cpp_examples_generate_both_no_check)
add_custom_target(prove_cpp_examples)
add_custom_target(cpp_examples_estimate_size)

Expand Down Expand Up @@ -68,8 +70,10 @@ function(add_example_without_proving example_target)
assign_ir(${example_target} ${binary_name} ${ARG_INPUT} ${ARG_PRIVATE_INPUT} ${ARG_CURVE_TYPE} ${ARG_ARITHMETIZARION} ${ARG_MAX_NUM_PROVERS})

add_dependencies(cpp_examples_generate_tbl ${example_target}_generate_tbl)
add_dependencies(cpp_examples_generate_tbl_no_check ${example_target}_generate_tbl_no_check)
add_dependencies(cpp_examples_generate_crct ${example_target}_generate_crct)
add_dependencies(cpp_examples_generate_both ${example_target}_generate_both)
add_dependencies(cpp_examples_generate_both_no_check ${example_target}_generate_both_no_check)
add_dependencies(cpp_examples_estimate_size ${example_target}_estimate_size)
endfunction()

Expand Down

0 comments on commit fff05f6

Please sign in to comment.