Skip to content
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
9 changes: 7 additions & 2 deletions .github/workflows/ci3-external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,12 @@ jobs:
uses: actions/cache@v3
with:
path: ci-success.txt
key: ci-external-${{ env.TREE_HASH }}
key: ci-external-${{ env.CI_MERGE_QUEUE == '1' && 'merge-queue' }}-${{ env.CI_FULL == '1' && 'full' }}-${{ env.NO_CACHE == '1' && 'no-cache' }}-${{ env.NO_FAIL_FAST == '1' && 'no-fail-fast' }}-${{ env.TREE_HASH }}

- name: CI Cached
if: steps.ci_cache.outputs.cache-hit == 'true'
run: |
echo "Previous run: $(cat ci-success.txt)"

#############
# Run
Expand Down Expand Up @@ -123,7 +128,7 @@ jobs:

- name: Save CI Success
if: steps.ci_cache.outputs.cache-hit != 'true'
run: echo "success" > ci-success.txt
run: echo "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" > ci-success.txt

# If we have passed CI and labelled with ci-squash-and-merge, squash the PR.
# This will rerun CI on the squash commit - but is intended to be a no-op due to caching.
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/ci3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ jobs:
path: ci-success.txt
key: ci-${{ github.event_name == 'merge_group' && 'merge-queue' || env.CI_FULL == '1' && 'full' || env.CI_DOCS == '1' && 'docs' || env.CI_BARRETENBERG == '1' && 'barretenberg' || 'fast' }}-${{ env.TREE_HASH }}

- name: CI Cached
if: steps.ci_cache.outputs.cache-hit == 'true'
run: |
echo "Previous run: $(cat ci-success.txt)"

#############
# Run
#############
Expand Down Expand Up @@ -151,7 +156,7 @@ jobs:

- name: Save CI Success
if: steps.ci_cache.outputs.cache-hit != 'true'
run: echo "success" > ci-success.txt
run: echo "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" > ci-success.txt

# If we have passed CI and labelled with ci-squash-and-merge, squash the PR.
# This will rerun CI on the squash commit - but is intended to be a no-op due to caching.
Expand Down
32 changes: 15 additions & 17 deletions barretenberg/cpp/cmake/nlohmann_json.cmake
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
include(FetchContent)
# Download nlohmann_json at configure time
set(NLOHMANN_JSON_SOURCE_DIR "${CMAKE_BINARY_DIR}/_deps/nlohmann_json-src")
set(NLOHMANN_JSON_COMMIT_HASH "9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03")

set(NLOHMANN_JSON_INCLUDE "${CMAKE_BINARY_DIR}/_deps/nlohmann_json-src/include")

FetchContent_Declare(
nlohmann_json
GIT_REPOSITORY https://github.com/nlohmann/json.git
GIT_TAG v3.11.3
GIT_SHALLOW TRUE
FIND_PACKAGE_ARGS
execute_process(
COMMAND sh -c "mkdir -p ${NLOHMANN_JSON_SOURCE_DIR} && cd ${NLOHMANN_JSON_SOURCE_DIR} && git init . && (git remote add origin https://github.com/nlohmann/json.git || true) && git fetch --depth 1 origin ${NLOHMANN_JSON_COMMIT_HASH} && git checkout FETCH_HEAD"
RESULT_VARIABLE result
)
if(result)
message(FATAL_ERROR "Failed to download nlohmann_json")
endif()

# Set the same variables as FetchContent would have
set(NLOHMANN_JSON_INCLUDE "${NLOHMANN_JSON_SOURCE_DIR}/include")

# Set options (same as before)
set(JSON_BuildTests OFF CACHE INTERNAL "")
set(JSON_Install OFF CACHE INTERNAL "")

FetchContent_MakeAvailable(nlohmann_json)

if(NOT nlohmann_json_FOUND)
# FetchContent_MakeAvailable calls FetchContent_Populate if `find_package` is unsuccessful
# so these variables will be available if we reach this case
set_property(DIRECTORY ${nlohmann_json_SOURCE_DIR} PROPERTY EXCLUDE_FROM_ALL)
set_property(DIRECTORY ${nlohmann_json_BINARY_DIR} PROPERTY EXCLUDE_FROM_ALL)
endif()
# Add nlohmann_json as a subdirectory (same as FetchContent_MakeAvailable would do)
add_subdirectory(${NLOHMANN_JSON_SOURCE_DIR} ${CMAKE_BINARY_DIR}/_deps/nlohmann_json-build EXCLUDE_FROM_ALL)
26 changes: 15 additions & 11 deletions barretenberg/cpp/cmake/tracy.cmake
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
include(FetchContent)
# Download Tracy at configure time
set(TRACY_SOURCE_DIR "${CMAKE_BINARY_DIR}/_deps/tracy-src")
set(TRACY_COMMIT_HASH "5d542dc09f3d9378d005092a4ad446bd405f819a")

# Find the path where we will download the Tracy github repository
# we need this to find where the Tracy header files are for inclusion.
set(TRACY_INCLUDE "${CMAKE_BINARY_DIR}/_deps/tracy-src/public")
execute_process(
COMMAND sh -c "mkdir -p ${TRACY_SOURCE_DIR} && cd ${TRACY_SOURCE_DIR} && git init . && (git remote add origin https://github.com/wolfpld/tracy.git || true) && git fetch --depth 1 origin ${TRACY_COMMIT_HASH} && git checkout FETCH_HEAD"
RESULT_VARIABLE result
)
if(result)
message(FATAL_ERROR "Failed to download Tracy")
endif()

# Set the same variables as FetchContent would have
set(TRACY_INCLUDE "${TRACY_SOURCE_DIR}/public")

# Work around an issue finding threads.
set(CMAKE_THREAD_LIBS_INIT "-lpthread")

# Download the Tracy github project and do an add_subdirectory on it.
FetchContent_Declare(tracy
GIT_REPOSITORY https://github.com/wolfpld/tracy
GIT_TAG 5d542dc09f3d9378d005092a4ad446bd405f819a
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(tracy)
# Add Tracy as a subdirectory (same as FetchContent_MakeAvailable would do)
add_subdirectory(${TRACY_SOURCE_DIR} ${CMAKE_BINARY_DIR}/_deps/tracy-build EXCLUDE_FROM_ALL)
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ void SumcheckClientIVC::complete_kernel_circuit_logic(ClientCircuit& circuit)
PairingPoints points_accumulator;
std::optional<RecursiveVerifierAccumulator> current_stdlib_verifier_accumulator;
if (!is_init_kernel) {
current_stdlib_verifier_accumulator = RecursiveVerifierAccumulator(&circuit, recursive_verifier_native_accum);
current_stdlib_verifier_accumulator = RecursiveVerifierAccumulator::stdlib_from_native<RecursiveFlavor::Curve>(
&circuit, recursive_verifier_native_accum);
}
while (!stdlib_verification_queue.empty()) {
const StdlibVerifierInputs& verifier_input = stdlib_verification_queue.front();
Expand All @@ -298,7 +299,7 @@ void SumcheckClientIVC::complete_kernel_circuit_logic(ClientCircuit& circuit)
} else {
BB_ASSERT_NEQ(current_stdlib_verifier_accumulator.has_value(), false);
// Extract native verifier accumulator from the stdlib accum for use on the next round
recursive_verifier_native_accum = current_stdlib_verifier_accumulator->get_value();
recursive_verifier_native_accum = current_stdlib_verifier_accumulator->get_value<VerifierAccumulator>();

KernelIO kernel_output;
kernel_output.pairing_inputs = points_accumulator;
Expand Down
Loading
Loading