Skip to content

Fixed hash decomposition component. #700

Fixed hash decomposition component.

Fixed hash decomposition component. #700

Workflow file for this run

name: Run tests
on:
# Triggers the workflow on pull request events but only for the master branch
pull_request:
branches: [ master ]
push:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
SUITE_REPO: "NilFoundation/crypto3"
LIB_NAME: "blueprint"
CACHE_NAME: "blueprint-job-cache"
jobs:
handle-syncwith:
if: github.event_name == 'pull_request'
name: Call Reusable SyncWith Handler
uses: NilFoundation/ci-cd/.github/workflows/reusable-handle-syncwith.yml@v1
with:
ci-cd-ref: 'v1'
secrets: inherit
run_tests:
needs: [ handle-syncwith ]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [
blueprint_algebra_fields_plonk_field_operations_test,
blueprint_algebra_fields_plonk_exponentiation_test,
blueprint_algebra_curves_plonk_unified_addition_test,
blueprint_algebra_curves_plonk_variable_base_scalar_mul_test,
blueprint_verifiers_kimchi_sponge_oracles_test,
blueprint_hashes_plonk_poseidon_test,
blueprint_algebra_curves_plonk_endo_scalar_test,
blueprint_algebra_fields_plonk_range_check_test,
blueprint_algebra_fields_plonk_logic_and_flag_test,
blueprint_algebra_fields_plonk_logic_or_flag_test,
blueprint_algebra_fields_plonk_interpolation_test,
blueprint_algebra_fields_plonk_non_native_addition_test,
blueprint_algebra_fields_plonk_non_native_subtraction_test,
blueprint_algebra_fields_plonk_non_native_multiplication_test,
blueprint_algebra_fields_plonk_non_native_range_test,
blueprint_algebra_fields_plonk_non_native_reduction_test,
blueprint_algebra_fields_plonk_non_native_bit_decomposition_test,
blueprint_algebra_fields_plonk_non_native_bit_composition_test,
blueprint_algebra_fields_plonk_non_native_bit_shift_constant_test,
blueprint_algebra_fields_plonk_non_native_logic_ops_test,
blueprint_algebra_fields_plonk_non_native_lookup_logic_ops_test,
blueprint_algebra_fields_plonk_non_native_comparison_checked_test,
blueprint_algebra_fields_plonk_non_native_comparison_unchecked_test,
blueprint_algebra_fields_plonk_non_native_comparison_flag_test,
blueprint_algebra_fields_plonk_non_native_equality_flag_test,
blueprint_algebra_fields_plonk_non_native_division_remainder_test,
blueprint_non_native_plonk_scalar_non_native_range_test,
blueprint_non_native_plonk_bool_scalar_multiplication_test,
blueprint_non_native_plonk_add_mul_zkllvm_compatible_test,
blueprint_hashes_plonk_decomposition_test,
blueprint_verifiers_placeholder_fri_cosets_test,
blueprint_hashes_plonk_sha256_process_test,
blueprint_hashes_plonk_sha512_process_test,
blueprint_hashes_plonk_sha256_test,
blueprint_hashes_plonk_sha512_test,
blueprint_algebra_fields_plonk_sqrt_test,
blueprint_verifiers_placeholder_fri_lin_inter_test,
blueprint_verifiers_placeholder_fri_array_swap_test,
blueprint_manifest_test,
blueprint_detail_huang_lu_test,
blueprint_private_input_test,
blueprint_verifiers_placeholder_permutation_argument_verifier_test,
blueprint_verifiers_placeholder_gate_argument_verifier_test,
blueprint_verifiers_placeholder_lookup_argument_verifier_test,
blueprint_verifiers_placeholder_f1_loop_test,
blueprint_verifiers_placeholder_f3_loop_test,
blueprint_verifiers_placeholder_gate_component_test,
blueprint_proxy_test
] # Tests to execute
include: # Abused to enable proof generation for some tests; add more as needed
- target: blueprint_algebra_fields_plonk_non_native_logic_ops_test
add-args: "-DBLUEPRINT_PLACEHOLDER_PROOF_GEN=True"
- target: blueprint_algebra_fields_plonk_non_native_lookup_logic_ops_test
add-args: "-DBLUEPRINT_PLACEHOLDER_PROOF_GEN=True"
steps:
- uses: cachix/install-nix-action@v23
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/nix-installer-action@main
- name: Checkout suite
uses: actions/checkout@v3
with:
repository: ${{ env.SUITE_REPO }}
submodules: recursive
fetch-depth: 0
- name: Checkout submodules to specified refs
if: needs.handle-syncwith.outputs.prs-refs != ''
uses: NilFoundation/ci-cd/actions/recursive-checkout@v1
with:
paths: |
${{ github.workspace }}/**
!${{ github.workspace }}/**/.git/**
refs: ${{ needs.handle-syncwith.outputs.prs-refs }}
- name: Checkout source code
uses: actions/checkout@v3
with:
path: ./libs/${{ env.LIB_NAME }}
submodules: recursive
fetch-depth: 0
- name: Configure Nix
run: |
mkdir -p ~/.config/nix
echo "extra-experimental-features = nix-command flakes" > ~/.config/nix/nix.conf
- name: Cmake and build
env:
CMAKE_ARGS: "
-DCMAKE_CXX_STANDARD=17
-DCMAKE_BUILD_TYPE=Debug
-DBUILD_SHARED_LIBS=TRUE
-DBUILD_TESTS=TRUE
-DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++
${{ matrix.add-args || ''}}"
run: |
mkdir build
nix develop ./libs/blueprint -c cmake -B build ${{ env.CMAKE_ARGS }} .
- name: Build
working-directory: ./build
run: nix develop ../libs/blueprint -c cmake --build . -t ${{ matrix.target }}
- name: Run test
working-directory: ./build
run:
nix develop ../libs/blueprint -c bash -c "
cd libs/${{ env.LIB_NAME }}/test &&
COLOR='\033[0;33m' &&
echo -e "${COLOR}${{ matrix.target }}" &&
./${{ matrix.target }}"