Skip to content

Commit

Permalink
Use reusable workflow in testing action
Browse files Browse the repository at this point in the history
  • Loading branch information
x-mass committed Dec 7, 2023
1 parent 306bc9a commit d122b9e
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 164 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/publish-results.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Needed to publish test results in fork
name: Testing Callback

on:
workflow_run:
workflows: ["PR Testing"]
types:
- completed

jobs:
call-reusable-workflow:
name: Call Reusable Testing Callback Workflow
uses: NilFoundation/ci-cd/.github/workflows/reusable-crypto3-publish-result.yml@v1
16 changes: 14 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,20 @@ jobs:
needs:
- handle-syncwith
uses: NilFoundation/ci-cd/.github/workflows/[email protected]
secrets: inherit
with:
submodules-refs: ${{ needs.handle-syncwith.outputs.prs-refs }}
concurrency: 2 # adjust if fails with OOM

secrets: inherit
targets: |
crypto3_zk_commitment_fold_polynomial_test
crypto3_zk_commitment_fri_test
crypto3_zk_commitment_lpc_test
crypto3_zk_commitment_kzg_test
crypto3_zk_systems_plonk_placeholder_placeholder_test
crypto3_zk_commitment_powers_of_tau_test
crypto3_zk_commitment_proof_of_knowledge_test
crypto3_zk_commitment_r1cs_gg_ppzksnark_mpc_test
crypto3_zk_math_expression_test
crypto3_zk_systems_plonk_plonk_constraint_test
crypto3_zk_commitment_proof_of_knowledge_test
crypto3_zk_transcript_transcript_test
145 changes: 0 additions & 145 deletions .github/workflows/run_tests.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,17 @@ namespace nil {
const std::size_t chunks = 1;
#endif

g_A = g_A + kc_multiexp_with_mixed_addition<algebra::policies::multiexp_method_BDLO12>(
g_A = g_A + commitments::kc_multiexp_with_mixed_addition<algebra::policies::multiexp_method_BDLO12>(
proving_key.A_query, 1, 1 + qap_wit.num_variables,
qap_wit.coefficients_for_ABCs.begin(),
qap_wit.coefficients_for_ABCs.begin() + qap_wit.num_variables + 1, chunks);

g_B = g_B + kc_multiexp_with_mixed_addition<algebra::policies::multiexp_method_BDLO12>(
asdf
g_B = g_B + commitments::kc_multiexp_with_mixed_addition<algebra::policies::multiexp_method_BDLO12>(
proving_key.B_query, 1, 1 + qap_wit.num_variables,
qap_wit.coefficients_for_ABCs.begin(),
qap_wit.coefficients_for_ABCs.begin() + qap_wit.num_variables + 1, chunks);

g_C = g_C + kc_multiexp_with_mixed_addition<algebra::policies::multiexp_method_BDLO12>(
g_C = g_C + commitments::kc_multiexp_with_mixed_addition<algebra::policies::multiexp_method_BDLO12>(
proving_key.C_query, 1, 1 + qap_wit.num_variables,
qap_wit.coefficients_for_ABCs.begin(),
qap_wit.coefficients_for_ABCs.begin() + qap_wit.num_variables + 1, chunks);
Expand Down
38 changes: 25 additions & 13 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,19 @@ if(ZK_PLACEHOLDER_PROFILING)
endif()

macro(define_zk_test test)
get_filename_component(name ${test} NAME)
string(REPLACE "/" "_" full_test_name ${CMAKE_WORKSPACE_NAME}_${CURRENT_PROJECT_NAME}_${test}_test)
cm_test(NAME ${full_test_name} SOURCES ${test}.cpp)

set(additional_args "")
if(ENABLE_JUNIT_TEST_OUTPUT)
set(TEST_RESULTS_DIR "${CMAKE_CURRENT_BINARY_DIR}/junit_results")
set(TEST_LOGS_DIR "${TEST_RESULTS_DIR}/logs")
file(MAKE_DIRECTORY ${TEST_LOGS_DIR})

set(additional_args "--log_format=JUNIT"
"--log_sink=${TEST_LOGS_DIR}/${full_test_name}.xml")
endif()

cm_test(NAME ${full_test_name} SOURCES ${test}.cpp ARGS ${additional_args})

target_include_directories(${full_test_name} PRIVATE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
Expand All @@ -59,16 +69,18 @@ macro(define_zk_test test)
endmacro()

set(TESTS_NAMES
# FIXME: these targets are disabled because they fail compilation. Either fix them or remove (if not needed)
# "commitment/lpc_performance" TODO try to enable
# "commitment/pedersen"
# "commitment/type_traits"

"commitment/lpc"
"commitment/fri"
"commitment/kzg"
"commitment/fold_polynomial"
"commitment/lpc_performance"
"commitment/pedersen"
"commitment/proof_of_knowledge"
"commitment/powers_of_tau"
"commitment/r1cs_gg_ppzksnark_mpc"
"commitment/type_traits"
"commitment/kimchi_pedersen"

"math/expression"
Expand All @@ -79,28 +91,28 @@ set(TESTS_NAMES
# "relations/numeric/sap"
# "relations/numeric/ssp"

"systems/plonk/pickles/pickles"
# "systems/plonk/pickles/pickles"
"systems/plonk/pickles/kimchi"
"systems/plonk/pickles/oracles"
# "systems/plonk/pickles/oracles"
"systems/plonk/pickles/to_field"
"systems/plonk/pickles/to_group"

"systems/plonk/placeholder/placeholder"
"systems/plonk/placeholder/performance"

# "systems/pcd/r1cs_pcd/r1cs_mp_ppzkpcd/r1cs_mp_ppzkpcd"
# "systems/pcd/r1cs_pcd/r1cs_sp_ppzkpcd/r1cs_sp_ppzkpcd"

# "systems/ppzksnark/bacs_ppzksnark/bacs_ppzksnark"
"systems/ppzksnark/r1cs_gg_ppzksnark/r1cs_gg_ppzksnark"
"systems/ppzksnark/r1cs_gg_ppzksnark/r1cs_gg_ppzksnark_marshalling"
"systems/ppzksnark/r1cs_gg_ppzksnark/r1cs_gg_ppzksnark_tvm_marshalling"
"systems/ppzksnark/r1cs_ppzksnark/r1cs_ppzksnark"
# "systems/ppzksnark/r1cs_gg_ppzksnark/r1cs_gg_ppzksnark"
# "systems/ppzksnark/r1cs_gg_ppzksnark/r1cs_gg_ppzksnark_marshalling"
# "systems/ppzksnark/r1cs_gg_ppzksnark/r1cs_gg_ppzksnark_tvm_marshalling"
# "systems/ppzksnark/r1cs_ppzksnark/r1cs_ppzksnark"
# "systems/ppzksnark/r1cs_se_ppzksnark/r1cs_se_ppzksnark"
# "systems/ppzksnark/ram_ppzksnark/ram_ppzksnark"
# "systems/ppzksnark/tbcs_ppzksnark/tbcs_ppzksnark"
# "systems/ppzksnark/uscs_ppzksnark/uscs_ppzksnark"
"systems/ppzksnark/r1cs_gg_ppzksnark/r1cs_gg_ppzksnark_aggregation_conformity"
# "systems/ppzksnark/r1cs_gg_ppzksnark/r1cs_gg_ppzksnark_aggregation_conformity"

"transcript/transcript"
"transcript/kimchi_transcript"
Expand Down

0 comments on commit d122b9e

Please sign in to comment.