Skip to content

Fix use of rust cache on CI #2169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Fix use of rust cache on CI #2169

wants to merge 3 commits into from

Conversation

DiegoCivi
Copy link
Contributor

@DiegoCivi DiegoCivi commented Aug 12, 2025

Fix rust cache on CI

Description

The rust-cache we are using on the CI was generating error because we were setting it up before doing the checkout. This generates the error since the cache tries to use the Cargo.toml to generate the cache key and is not able to find it.

Also, the job run-cairo-release for the cairo_programs/stwo_exclusive_programs was not being executed because of a misuse of the cache. These were removed from the CI job since they are already runned in the tests (here and here).

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.
    • CHANGELOG has been updated.

@DiegoCivi DiegoCivi added the pipelines This PR/issue is exclusively about improving our CI label Aug 12, 2025
Copy link

github-actions bot commented Aug 12, 2025

**Hyper Thereading Benchmark results**




hyperfine -r 2 -n "hyper_threading_main threads: 1" 'RAYON_NUM_THREADS=1 ./hyper_threading_main' -n "hyper_threading_pr threads: 1" 'RAYON_NUM_THREADS=1 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 1
  Time (mean ± σ):     24.402 s ±  0.064 s    [User: 23.547 s, System: 0.852 s]
  Range (min … max):   24.357 s … 24.447 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     24.338 s ±  0.031 s    [User: 23.479 s, System: 0.855 s]
  Range (min … max):   24.316 s … 24.360 s    2 runs
 
Summary
  hyper_threading_pr threads: 1 ran
    1.00 ± 0.00 times faster than hyper_threading_main threads: 1




hyperfine -r 2 -n "hyper_threading_main threads: 2" 'RAYON_NUM_THREADS=2 ./hyper_threading_main' -n "hyper_threading_pr threads: 2" 'RAYON_NUM_THREADS=2 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 2
  Time (mean ± σ):     13.157 s ±  0.005 s    [User: 23.513 s, System: 0.856 s]
  Range (min … max):   13.153 s … 13.161 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     13.185 s ±  0.031 s    [User: 23.572 s, System: 0.820 s]
  Range (min … max):   13.164 s … 13.207 s    2 runs
 
Summary
  hyper_threading_main threads: 2 ran
    1.00 ± 0.00 times faster than hyper_threading_pr threads: 2




hyperfine -r 2 -n "hyper_threading_main threads: 4" 'RAYON_NUM_THREADS=4 ./hyper_threading_main' -n "hyper_threading_pr threads: 4" 'RAYON_NUM_THREADS=4 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 4
  Time (mean ± σ):      9.878 s ±  0.269 s    [User: 35.793 s, System: 1.093 s]
  Range (min … max):    9.688 s … 10.068 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):     10.234 s ±  0.127 s    [User: 35.381 s, System: 1.032 s]
  Range (min … max):   10.144 s … 10.323 s    2 runs
 
Summary
  hyper_threading_main threads: 4 ran
    1.04 ± 0.03 times faster than hyper_threading_pr threads: 4




hyperfine -r 2 -n "hyper_threading_main threads: 6" 'RAYON_NUM_THREADS=6 ./hyper_threading_main' -n "hyper_threading_pr threads: 6" 'RAYON_NUM_THREADS=6 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 6
  Time (mean ± σ):      9.783 s ±  0.250 s    [User: 36.157 s, System: 1.051 s]
  Range (min … max):    9.607 s …  9.960 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):      9.685 s ±  0.225 s    [User: 35.919 s, System: 1.030 s]
  Range (min … max):    9.526 s …  9.843 s    2 runs
 
Summary
  hyper_threading_pr threads: 6 ran
    1.01 ± 0.03 times faster than hyper_threading_main threads: 6




hyperfine -r 2 -n "hyper_threading_main threads: 8" 'RAYON_NUM_THREADS=8 ./hyper_threading_main' -n "hyper_threading_pr threads: 8" 'RAYON_NUM_THREADS=8 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 8
  Time (mean ± σ):      9.914 s ±  0.279 s    [User: 36.339 s, System: 1.081 s]
  Range (min … max):    9.717 s … 10.111 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):      9.783 s ±  0.084 s    [User: 36.213 s, System: 1.051 s]
  Range (min … max):    9.724 s …  9.843 s    2 runs
 
Summary
  hyper_threading_pr threads: 8 ran
    1.01 ± 0.03 times faster than hyper_threading_main threads: 8




hyperfine -r 2 -n "hyper_threading_main threads: 16" 'RAYON_NUM_THREADS=16 ./hyper_threading_main' -n "hyper_threading_pr threads: 16" 'RAYON_NUM_THREADS=16 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 16
  Time (mean ± σ):      9.700 s ±  0.127 s    [User: 36.484 s, System: 1.141 s]
  Range (min … max):    9.610 s …  9.790 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):     10.052 s ±  0.019 s    [User: 36.157 s, System: 1.171 s]
  Range (min … max):   10.038 s … 10.065 s    2 runs
 
Summary
  hyper_threading_main threads: 16 ran
    1.04 ± 0.01 times faster than hyper_threading_pr threads: 16


Copy link

github-actions bot commented Aug 12, 2025

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.064 ± 0.024 2.042 2.107 1.00 ± 0.02
head big_factorial 2.062 ± 0.032 2.033 2.122 1.00
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 1.980 ± 0.007 1.969 1.996 1.00
head big_fibonacci 1.987 ± 0.018 1.969 2.028 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 7.039 ± 0.025 7.000 7.073 1.00
head blake2s_integration_benchmark 7.171 ± 0.435 6.984 8.402 1.02 ± 0.06
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.128 ± 0.011 2.109 2.149 1.01 ± 0.01
head compare_arrays_200000 2.112 ± 0.017 2.085 2.141 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.387 ± 0.011 1.377 1.417 1.00
head dict_integration_benchmark 1.407 ± 0.011 1.398 1.435 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.170 ± 0.004 1.164 1.175 1.00
head field_arithmetic_get_square_benchmark 1.186 ± 0.022 1.169 1.230 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 7.136 ± 0.029 7.084 7.176 1.00
head integration_builtins 7.140 ± 0.030 7.106 7.193 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 7.214 ± 0.041 7.153 7.294 1.01 ± 0.01
head keccak_integration_benchmark 7.176 ± 0.042 7.124 7.257 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.076 ± 0.021 2.066 2.136 1.00
head linear_search 2.083 ± 0.010 2.063 2.096 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.470 ± 0.007 1.460 1.482 1.00
head math_cmp_and_pow_integration_benchmark 1.474 ± 0.021 1.457 1.531 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.408 ± 0.005 1.402 1.415 1.00
head math_integration_benchmark 1.418 ± 0.017 1.404 1.464 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.186 ± 0.009 1.177 1.208 1.00 ± 0.01
head memory_integration_benchmark 1.186 ± 0.009 1.175 1.199 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.497 ± 0.007 1.484 1.508 1.00 ± 0.01
head operations_with_data_structures_benchmarks 1.496 ± 0.009 1.486 1.509 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 518.9 ± 1.7 517.3 523.1 1.00
head pedersen 519.7 ± 2.5 517.3 525.9 1.00 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 595.2 ± 3.7 591.2 601.5 1.00
head poseidon_integration_benchmark 599.0 ± 8.1 592.4 618.9 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.761 ± 0.011 1.746 1.777 1.01 ± 0.01
head secp_integration_benchmark 1.750 ± 0.006 1.744 1.763 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 617.3 ± 1.3 615.2 619.5 1.00
head set_integration_benchmark 617.7 ± 1.7 615.2 621.8 1.00 ± 0.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.004 ± 0.013 3.986 4.023 1.00
head uint256_integration_benchmark 4.030 ± 0.023 4.000 4.072 1.01 ± 0.01

Copy link

codecov bot commented Aug 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.67%. Comparing base (bf8967a) to head (4a38d8b).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2169   +/-   ##
=======================================
  Coverage   96.67%   96.67%           
=======================================
  Files         103      103           
  Lines       43944    43944           
=======================================
  Hits        42483    42483           
  Misses       1461     1461           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DiegoCivi DiegoCivi marked this pull request as ready for review August 12, 2025 20:56
Copy link
Contributor

@JulianGCalderon JulianGCalderon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pipelines This PR/issue is exclusively about improving our CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants