Skip to content

Commit

Permalink
fix: ci merge check (#4921)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludamad authored Mar 5, 2024
1 parent be5855c commit 46063da
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
17 changes: 16 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
generate-config:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: xlarge
resource_class: large
steps:
- *checkout
- *setup_env
Expand Down Expand Up @@ -1499,6 +1499,21 @@ workflows:
# Everything that must complete before deployment.
- end:
requires:
- barretenberg-x86_64-linux-gcc
- barretenberg-x86_64-linux-clang
- barretenberg-x86_64-linux-clang-assert
- barretenberg-x86_64-linux-clang-fuzzing
- barretenberg-wasm-linux-clang
- barretenberg-x86_64-linux-clang-sol
- barretenberg-bench
- barretenberg-proof-system-tests
- barretenberg-dsl-tests
- barretenberg-tests
- barretenberg-stdlib-tests
- barretenberg-stdlib-recursion-ultra-tests
- barretenberg-join-split-tests
- barretenberg-acir-tests-bb
- barretenberg-docs
- mainnet-fork
- e2e-2-pxes
- e2e-note-getter
Expand Down
15 changes: 7 additions & 8 deletions build-system/scripts/generate_circleci_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ def is_already_built_circleci_job(circleci_job, already_built_manifest_jobs):

def get_already_built_circleci_job_names(circleci_jobs):
already_built_manifest_jobs = list(get_already_built_manifest_job_names())
for key in already_built_manifest_jobs:
eprint("Detected cached manifest key:", key)
for job_name, circleci_job in circleci_jobs.items():
if is_already_built_circleci_job(circleci_job, already_built_manifest_jobs):
yield job_name
Expand All @@ -58,19 +56,20 @@ def _get_already_built_manifest_job_names(manifest_name):
content_hash = subprocess.check_output(['calculate_content_hash', manifest_name]).decode("utf-8")
completed = subprocess.run(["check_rebuild", f"cache-{content_hash}", manifest_name], stdout=subprocess.DEVNULL)
if completed.returncode == 0:
return manifest_name
return manifest_name, content_hash
else:
return None
return None, None

def get_already_built_manifest_job_names():
manifest_names = get_manifest_job_names()

with ProcessPoolExecutor() as executor:
with ProcessPoolExecutor(max_workers=8) as executor:
futures = {executor.submit(_get_already_built_manifest_job_names, key): key for key in manifest_names}
for future in as_completed(futures):
result = future.result()
if result is not None:
yield result
key, content_hash = future.result()
if key is not None:
eprint("Detected cached manifest key:", key, "with content hash", content_hash)
yield key

def remove_jobs_from_workflow(jobs, to_remove):
"""
Expand Down

0 comments on commit 46063da

Please sign in to comment.