RustCrypto / hybrid-array

Hybrid typenum/const generic arrays
Apache License 2.0
9 stars 8 forks source link

Long build times in CI on older compilers #47

Closed tarcieri closed 9 months ago

tarcieri commented 9 months ago

I just noticed hybrid-array takes 3m to build on 1.65: https://github.com/RustCrypto/hybrid-array/actions/runs/7923269699/job/21632628872

However, it takes 2s on stable (1.75): https://github.com/RustCrypto/hybrid-array/actions/runs/7923269699/job/21632630167

tarcieri commented 9 months ago

I wasn't able to reproduce this locally with an older compiler:

$ rustc --version
rustc 1.65.0 (897e37553 2022-11-02)
$ cargo clean
$ cargo build --no-default-features --target thumbv7em-none-eabi
   Compiling typenum v1.17.0
   Compiling hybrid-array v0.2.0-rc.5 (/Users/tarcieri/src/RustCrypto/hybrid-array)
    Finished dev [unoptimized + debuginfo] target(s) in 1.31s
tarcieri commented 9 months ago

I wonder if this has nothing to do with the crate itself and is in fact the time it takes to update the legacy Cargo index, since it's not using the sparse index

newpavlov commented 9 months ago

the time it takes to update the legacy Cargo index

In theory, this should be handled by cargo-cache which is used in the workflow.

tarcieri commented 9 months ago

Is the cache potentially stale?

tarcieri commented 9 months ago

It's definitely time spent updating the crates.io index. I just observed it watching the build:

Screenshot 2024-02-16 at 7 39 47 AM

Going to close this as I was primarily worried hybrid-array was doing something which caused actual time compiling the crate to last this long. Not too worried about the legacy crates.io index.